From 75b37dda5b5a4535a932e729aa45c894b4318d80 Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Sun, 21 Jul 2024 23:01:45 -0400 Subject: [PATCH] Update to Org 9.7.8-5-gfdf0e0 (cherry picked from commit 46b192c04b162519a5e88bbf0f465a7c5e1171a9) --- etc/refcards/orgcard.tex | 2 +- lisp/org/org-version.el | 4 ++-- lisp/org/org.el | 21 +++++++++++---------- 3 files changed, 14 insertions(+), 13 deletions(-) diff --git a/etc/refcards/orgcard.tex b/etc/refcards/orgcard.tex index 112832e0074..b924aed8df5 100644 --- a/etc/refcards/orgcard.tex +++ b/etc/refcards/orgcard.tex @@ -1,5 +1,5 @@ % Reference Card for Org Mode -\def\orgversionnumber{9.7.7} +\def\orgversionnumber{9.7.8} \def\versionyear{2024} % latest update \input emacsver.tex diff --git a/lisp/org/org-version.el b/lisp/org/org-version.el index 75e792b74be..993e021f82e 100644 --- a/lisp/org/org-version.el +++ b/lisp/org/org-version.el @@ -5,13 +5,13 @@ (defun org-release () "The release version of Org. Inserted by installing Org mode or when a release is made." - (let ((org-release "9.7.7")) + (let ((org-release "9.7.8")) org-release)) ;;;###autoload (defun org-git-version () "The Git version of Org mode. Inserted by installing Org or when a release is made." - (let ((org-git-version "release_9.7.7-2-gf308d3")) + (let ((org-git-version "release_9.7.8-5-gfdf0e0")) org-git-version)) (provide 'org-version) diff --git a/lisp/org/org.el b/lisp/org/org.el index 7ace28571a5..69f9d758cb1 100644 --- a/lisp/org/org.el +++ b/lisp/org/org.el @@ -9,7 +9,7 @@ ;; URL: https://orgmode.org ;; Package-Requires: ((emacs "26.1")) -;; Version: 9.7.7 +;; Version: 9.7.8 ;; This file is part of GNU Emacs. ;; @@ -19622,7 +19622,7 @@ ELEMENT." (if level (1+ level) 0)))) ((item plain-list) (org-list-item-body-column post-affiliated)) (t - (goto-char start) + (when start (goto-char start)) (current-indentation)))) ((memq type '(headline inlinetask nil)) (if (org-match-line "[ \t]*$") @@ -19631,14 +19631,14 @@ ELEMENT." ((memq type '(diary-sexp footnote-definition)) 0) ;; First paragraph of a footnote definition or an item. ;; Indent like parent. - ((< (line-beginning-position) start) + ((and start (< (line-beginning-position) start)) (org--get-expected-indentation (org-element-parent element) t)) ;; At first line: indent according to previous sibling, if any, ;; ignoring footnote definitions and inline tasks, or parent's ;; contents. If `org-adapt-indentation' is `headline-data', ignore ;; previous headline data siblings. - ((= (line-beginning-position) start) + ((and start (= (line-beginning-position) start)) (catch 'exit (while t (if (= (point-min) start) (throw 'exit 0) @@ -19688,13 +19688,13 @@ ELEMENT." ;; Line above is the first one of a paragraph at the ;; beginning of an item or a footnote definition. Indent ;; like parent. - ((< (line-beginning-position) start) + ((and start (< (line-beginning-position) start)) (org--get-expected-indentation (org-element-parent element) t)) ;; Line above is the beginning of an element, i.e., point ;; was originally on the blank lines between element's start ;; and contents. - ((= (line-beginning-position) post-affiliated) + ((and post-affiliated (= (line-beginning-position) post-affiliated)) (org--get-expected-indentation element t)) ;; POS is after contents in a greater element. Indent like ;; the beginning of the element. @@ -19782,10 +19782,11 @@ Also align node properties according to `org-property-format'." (not (org--at-headline-data-p nil element)) ;; Not at headline data and previous is headline data/headline. (or (memq type '(headline inlinetask)) ; blank lines after heading - (save-excursion - (goto-char (1- (org-element-begin element))) - (or (org-at-heading-p) - (org--at-headline-data-p)))))) + (and element + (save-excursion + (goto-char (1- (org-element-begin element))) + (or (org-at-heading-p) + (org--at-headline-data-p))))))) (cond ((and (memq type '(plain-list item)) (= (line-beginning-position) (org-element-post-affiliated element))) -- 2.39.2