emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

emacs-29 648a5e33e80: Update to Org 9.6.8-3-g21171d


From: Kyle Meyer
Subject: emacs-29 648a5e33e80: Update to Org 9.6.8-3-g21171d
Date: Sun, 27 Aug 2023 22:50:59 -0400 (EDT)

branch: emacs-29
commit 648a5e33e80417855b908693e36cba56cd2c796c
Author: Kyle Meyer <kyle@kyleam.com>
Commit: Kyle Meyer <kyle@kyleam.com>

    Update to Org 9.6.8-3-g21171d
---
 etc/refcards/orgcard.tex |  2 +-
 lisp/org/oc-basic.el     |  2 +-
 lisp/org/org-element.el  | 18 +++---------------
 lisp/org/org-version.el  |  4 ++--
 lisp/org/org.el          | 25 ++++++++++++++++---------
 5 files changed, 23 insertions(+), 28 deletions(-)

diff --git a/etc/refcards/orgcard.tex b/etc/refcards/orgcard.tex
index dd8cae5ce5e..23a2f73dba7 100644
--- a/etc/refcards/orgcard.tex
+++ b/etc/refcards/orgcard.tex
@@ -1,5 +1,5 @@
 % Reference Card for Org Mode
-\def\orgversionnumber{9.6.7}
+\def\orgversionnumber{9.6.8}
 \def\versionyear{2023}          % latest update
 \input emacsver.tex
 
diff --git a/lisp/org/oc-basic.el b/lisp/org/oc-basic.el
index 1c8c37aa941..5c9aad8f6a5 100644
--- a/lisp/org/oc-basic.el
+++ b/lisp/org/oc-basic.el
@@ -162,7 +162,7 @@ Return a hash table with citation references as keys and 
fields alist as values.
         (puthash (cdr (assq 'id item))
                  (mapcar (pcase-lambda (`(,field . ,value))
                            (pcase field
-                             ((or 'author 'editors)
+                             ((or 'author 'editor)
                               ;; Author and editors are arrays of
                               ;; objects, each of them designing a
                               ;; person.  These objects may contain
diff --git a/lisp/org/org-element.el b/lisp/org/org-element.el
index 296468eed1a..0debd1a6818 100644
--- a/lisp/org/org-element.el
+++ b/lisp/org/org-element.el
@@ -6705,20 +6705,8 @@ The function returns the new value of 
`org-element--cache-change-warning'."
        (setq org-element--cache-change-tic (buffer-chars-modified-tick))
        (setq org-element--cache-last-buffer-size (buffer-size))
        (goto-char beg)
-       (beginning-of-line)
-       (let ((bottom (save-excursion
-                       (goto-char end)
-                       (if (and (bolp)
-                                ;; When beg == end, still extent to eol.
-                                (> (point) beg))
-                           ;; FIXME: Potential pitfall.
-                           ;; We are appending to an element end.
-                           ;; Unless the last inserted char is not
-                           ;; newline, the next element is not broken
-                           ;; and does not need to be purged from the
-                           ;; cache.
-                           end
-                         (line-end-position)))))
+       (forward-line 0)
+       (let ((bottom (save-excursion (goto-char end) (line-end-position))))
          (prog1
              ;; Use the worst change warning to not miss important edits.
              ;; This function is called before edit and after edit by
@@ -7859,7 +7847,7 @@ element ending there."
     (setq cached-only nil))
   (let (element)
     (when (org-element--cache-active-p)
-      (if (not org-element--cache) (org-element-cache-reset)
+      (if (not (org-with-base-buffer nil org-element--cache)) 
(org-element-cache-reset)
         (unless cached-only (org-element--cache-sync (current-buffer) pom))))
     (setq element (if cached-only
                       (when (and (org-element--cache-active-p)
diff --git a/lisp/org/org-version.el b/lisp/org/org-version.el
index 57e406b24fc..3b58ea06818 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.6.7"))
+   (let ((org-release "9.6.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.6.7-13-g99cc96"))
+   (let ((org-git-version "release_9.6.8-3-g21171d"))
      org-git-version))
 
 (provide 'org-version)
diff --git a/lisp/org/org.el b/lisp/org/org.el
index c5c0808104f..750c8f97201 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.6.7
+;; Version: 9.6.8
 
 ;; This file is part of GNU Emacs.
 ;;
@@ -6323,7 +6323,10 @@ unconditionally."
        (if (not level) (outline-next-heading) ;before first headline
         (org-back-to-heading invisible-ok)
         (when (equal arg '(16)) (org-up-heading-safe))
-        (org-end-of-subtree)))
+        (org-end-of-subtree invisible-ok 'to-heading)))
+      ;; At `point-max', if the file does not have ending newline,
+      ;; create one, so that we are not appending stars at non-empty
+      ;; line.
       (unless (bolp) (insert "\n"))
       (when (and blank? (save-excursion
                           (backward-char)
@@ -6335,7 +6338,9 @@ unconditionally."
         (backward-char))
       (unless (and blank? (org-previous-line-empty-p))
        (org-N-empty-lines-before-current (if blank? 1 0)))
-      (insert stars " ")
+      (insert stars " " "\n")
+      ;; Move point after stars.
+      (backward-char)
       ;; When INVISIBLE-OK is non-nil, ensure newly created headline
       ;; is visible.
       (unless invisible-ok
@@ -14754,12 +14759,12 @@ is considered `day' (i.e. only `bracket', `day', and 
`after' return
 values are possible).
 
 When matching, the match groups are the following:
-  group 1: year, if any
-  group 2: month, if any
-  group 3: day number, if any
-  group 4: day name, if any
-  group 5: hours, if any
-  group 6: minutes, if any"
+  group 2: year, if any
+  group 3: month, if any
+  group 4: day number, if any
+  group 5: day name, if any
+  group 7: hours, if any
+  group 8: minutes, if any"
   (let* ((regexp
           (if extended
               (if (eq extended 'agenda)
@@ -17663,6 +17668,8 @@ If INDENT is non-nil, call `newline-and-indent' with 
ARG to
 indent unconditionally; otherwise, call `newline' with ARG and
 INTERACTIVE, which can trigger indentation if
 `electric-indent-mode' is enabled."
+  (when interactive
+    (org-fold-check-before-invisible-edit 'insert))
   (if indent
       (org-newline-and-indent arg)
     (newline arg interactive)))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]