Update to Org 9.7.5-9-ga091ca

This commit is contained in:
Kyle Meyer 2024-06-27 23:55:35 -04:00
parent c477443ab8
commit 6cc8ffae9a
14 changed files with 38 additions and 28 deletions

View file

@ -23163,7 +23163,7 @@ specify a date December 1, 2005, the call might look like
=(diary-date 12 1 2005)= or =(diary-date 1 12 2005)= or =(diary-date =(diary-date 12 1 2005)= or =(diary-date 1 12 2005)= or =(diary-date
2005 12 1)=, depending on the settings. This has been the source of 2005 12 1)=, depending on the settings. This has been the source of
much confusion. Org mode users can resort to special versions of much confusion. Org mode users can resort to special versions of
these functions, namely ~org-date~, ~org-anniversary~, ~org-cyclic, and these functions, namely ~org-date~, ~org-anniversary~, ~org-cyclic~, and
~org-block~. These work just like the corresponding ~diary-~ ~org-block~. These work just like the corresponding ~diary-~
functions, but with stable ISO order of arguments (year, month, day) functions, but with stable ISO order of arguments (year, month, day)
wherever applicable, independent of the value of wherever applicable, independent of the value of

View file

@ -18,6 +18,9 @@ Please send Org bug reports to mailto:emacs-orgmode@gnu.org.
# Here, we list the *most important* changes and changes that _likely_ # Here, we list the *most important* changes and changes that _likely_
# require user action for most Org mode users. # require user action for most Org mode users.
# Sorted from most important to least important. # Sorted from most important to least important.
*** Arbitrary shell commands may no longer run when turning on Org mode
This is for security reasons, to avoid running malicious commands.
*** =python-mode.el (MELPA)= support in =ob-python.el= is removed *** =python-mode.el (MELPA)= support in =ob-python.el= is removed

View file

@ -1,5 +1,5 @@
% Reference Card for Org Mode % Reference Card for Org Mode
\def\orgversionnumber{9.7.4} \def\orgversionnumber{9.7.5}
\def\versionyear{2024} % latest update \def\versionyear{2024} % latest update
\input emacsver.tex \input emacsver.tex

View file

@ -484,7 +484,7 @@ Returns a placeholder string for insertion, to later be replaced
by `org-babel-comint-async-filter'." by `org-babel-comint-async-filter'."
(org-babel-comint-async-register (org-babel-comint-async-register
session (current-buffer) session (current-buffer)
"^\\(?:[>.+] \\)*\\[1\\] \"ob_comint_async_R_\\(.+?\\)_\\(.+\\)\"$" "^\\(?:[>.+] \\)*\\[1\\] \"ob_comint_async_R_\\(start\\|end\\|file\\)_\\(.+\\)\"$"
'org-babel-chomp 'org-babel-chomp
'ob-session-async-R-value-callback) 'ob-session-async-R-value-callback)
(cl-case result-type (cl-case result-type

View file

@ -2959,9 +2959,9 @@ used as a string to be appended to #+begin_example line."
(goto-char body-start) (goto-char body-start)
(insert body)))) (insert body))))
(defun org-babel-merge-params (&rest plists) (defun org-babel-merge-params (&rest alists)
"Combine all parameter association lists in PLISTS. "Combine all parameter association lists in ALISTS.
Later elements of PLISTS override the values of previous elements. Later elements of ALISTS override the values of previous elements.
This takes into account some special considerations for certain This takes into account some special considerations for certain
parameters when merging lists." parameters when merging lists."
(let* ((results-exclusive-groups (let* ((results-exclusive-groups
@ -2990,8 +2990,8 @@ parameters when merging lists."
;; Some keywords accept multiple values. We need to treat ;; Some keywords accept multiple values. We need to treat
;; them specially. ;; them specially.
vars results exports) vars results exports)
(dolist (plist plists) (dolist (alist alists)
(dolist (pair plist) (dolist (pair alist)
(pcase pair (pcase pair
(`(:var . ,value) (`(:var . ,value)
(let ((name (cond (let ((name (cond

View file

@ -537,7 +537,7 @@ Returns a placeholder string for insertion, to later be replaced
by `org-babel-comint-async-filter'." by `org-babel-comint-async-filter'."
(org-babel-comint-async-register (org-babel-comint-async-register
session (current-buffer) session (current-buffer)
"ob_comint_async_python_\\(.+\\)_\\(.+\\)" "ob_comint_async_python_\\(start\\|end\\|file\\)_\\(.+\\)"
'org-babel-chomp 'org-babel-python-async-value-callback) 'org-babel-chomp 'org-babel-python-async-value-callback)
(pcase result-type (pcase result-type
(`output (`output

View file

@ -92,10 +92,10 @@ variables."
name)) name))
(funcall (if (fboundp 'defvar-1) #'defvar-1 #'set) ;Emacs-29 (funcall (if (fboundp 'defvar-1) #'defvar-1 #'set) ;Emacs-29
(intern (concat "org-babel-default-header-args:" name)) (intern (concat "org-babel-default-header-args:" name))
nil) org-babel-default-header-args:shell)
(funcall (if (fboundp 'defvar-1) #'defvar-1 #'set) ;Emacs-29 (funcall (if (fboundp 'defvar-1) #'defvar-1 #'set) ;Emacs-29
(intern (concat "org-babel-header-args:" name)) (intern (concat "org-babel-header-args:" name))
nil))) org-babel-header-args:shell)))
(defcustom org-babel-shell-names (defcustom org-babel-shell-names
'("sh" "bash" "zsh" "fish" "csh" "ash" "dash" "ksh" "mksh" "posh") '("sh" "bash" "zsh" "fish" "csh" "ash" "dash" "ksh" "mksh" "posh")
@ -338,7 +338,7 @@ return the value of the last statement in BODY."
(org-babel-comint-async-register (org-babel-comint-async-register
session session
(current-buffer) (current-buffer)
"ob_comint_async_shell_\\(.+\\)_\\(.+\\)" "ob_comint_async_shell_\\(start\\|end\\|file\\)_\\(.+\\)"
'ob-shell-async-chunk-callback 'ob-shell-async-chunk-callback
nil) nil)
(org-babel-comint-async-delete-dangling-and-eval (org-babel-comint-async-delete-dangling-and-eval

View file

@ -1662,7 +1662,7 @@ definition."
;; Insert affiliated keywords before the table. ;; Insert affiliated keywords before the table.
(when content-lines (when content-lines
(while (string-match-p "\\`[ \t]*#\\+" (car content-lines)) (while (string-match-p "\\`[ \t]*#\\+" (car content-lines))
(insert (pop content-lines) "\n"))) (insert (string-trim-left (pop content-lines)) "\n")))
(save-excursion (save-excursion
;; Insert table at point. ;; Insert table at point.
(insert (insert
@ -1675,7 +1675,7 @@ definition."
(let ((case-fold-search t)) (let ((case-fold-search t))
(dolist (line content-lines) (dolist (line content-lines)
(when (string-match-p "\\`[ \t]*#\\+TBLFM:" line) (when (string-match-p "\\`[ \t]*#\\+TBLFM:" line)
(insert "\n" line) (insert "\n" (string-trim-left line))
(unless recalc (setq recalc t)))))) (unless recalc (setq recalc t))))))
(when recalc (org-table-recalculate 'all t)) (when recalc (org-table-recalculate 'all t))
(org-table-align) (org-table-align)

View file

@ -270,7 +270,7 @@ Return value is the containing property name, as a keyword, or nil."
"Dynamically computed value. "Dynamically computed value.
The value can be obtained by calling FUNCTION with containing syntax The value can be obtained by calling FUNCTION with containing syntax
node as first argument and ARGS list as remainting arguments. node as first argument and ARGS list as remaining arguments.
If the function throws `:org-element-deferred-retry' signal, assume If the function throws `:org-element-deferred-retry' signal, assume
that the syntax node has been modified by side effect and retry that the syntax node has been modified by side effect and retry

View file

@ -110,7 +110,7 @@
;; to current setup. ;; to current setup.
(defconst org-element-archive-tag "ARCHIVE" (defconst org-element-archive-tag "ARCHIVE"
"Tag marking a substree as archived.") "Tag marking a subtree as archived.")
(defconst org-element-citation-key-re (defconst org-element-citation-key-re
(rx "@" (group (one-or-more (any word "-.:?!`'/*@+|(){}<>&_^$#%~")))) (rx "@" (group (one-or-more (any word "-.:?!`'/*@+|(){}<>&_^$#%~"))))
@ -181,8 +181,7 @@ Drawer's name is located in match group 1.")
(rx line-start (0+ (any ?\s ?\t)) (rx line-start (0+ (any ?\s ?\t))
":" (1+ (any ?- ?_ word)) ":" ":" (1+ (any ?- ?_ word)) ":"
(0+ (any ?\s ?\t)) line-end) (0+ (any ?\s ?\t)) line-end)
"Regexp matching opening or closing line of a drawer. "Regexp matching opening or closing line of a drawer.")
Drawer's name is located in match group 1.")
(defconst org-element-dynamic-block-open-re (defconst org-element-dynamic-block-open-re
(rx line-start (0+ (any ?\s ?\t)) (rx line-start (0+ (any ?\s ?\t))
@ -4679,7 +4678,7 @@ element it has to parse."
;; ;;
;; In general, the checks below should be as efficient as ;; In general, the checks below should be as efficient as
;; possible, especially early in the `cond' form. (The ;; possible, especially early in the `cond' form. (The
;; early checks will contribute to al subsequent parsers as ;; early checks will contribute to all subsequent parsers as
;; well). ;; well).
(cond (cond
;; Item. ;; Item.
@ -5956,7 +5955,7 @@ better to remove the commands advised in such a way from this list.")
(defmacro org-element--cache-log-message (format-string &rest args) (defmacro org-element--cache-log-message (format-string &rest args)
"Add a new log message for org-element-cache. "Add a new log message for org-element-cache.
FORMAT-STRING and ARGS are the same arguments as in `foramt'." FORMAT-STRING and ARGS are the same arguments as in `format'."
`(when (or org-element--cache-diagnostics `(when (or org-element--cache-diagnostics
(eq org-element--cache-self-verify 'backtrace)) (eq org-element--cache-self-verify 'backtrace))
(let* ((format-string (concat (format "org-element-cache diagnostics(%s): " (let* ((format-string (concat (format "org-element-cache diagnostics(%s): "
@ -6226,7 +6225,7 @@ the cache."
;; children starting at the same pos. ;; children starting at the same pos.
(not (org-element-type-p hashed '(section org-data table)))) (not (org-element-type-p hashed '(section org-data table))))
hashed hashed
;; No appriate HASHED. Search the cache. ;; No appropriate HASHED. Search the cache.
(while node (while node
(let* ((element (avl-tree--node-data node)) (let* ((element (avl-tree--node-data node))
(begin (org-element-begin element))) (begin (org-element-begin element)))
@ -8323,7 +8322,7 @@ the cache."
limit-count)) limit-count))
(cache-walk-abort)) (cache-walk-abort))
;; Make sure that we have a cached ;; Make sure that we have a cached
;; element at the new STAR. ;; element at the new START.
(when start (element-match-at-point))) (when start (element-match-at-point)))
;; Check if the buffer or cache has been modified. ;; Check if the buffer or cache has been modified.
(unless (org-with-base-buffer nil (unless (org-with-base-buffer nil

View file

@ -666,7 +666,14 @@ When INNER is non-nil, do not try to match as list of containers."
(fboundp 'file-attribute-inode-number)) (fboundp 'file-attribute-inode-number))
(file-attribute-inode-number (file-attribute-inode-number
(file-attributes file)))) (file-attributes file))))
(setq hash (secure-hash 'md5 associated)) (setq hash
;; `secure-hash' may trigger interactive dialog when it
;; cannot determine the coding system automatically.
;; Force coding system that works reliably for any text
;; to avoid it. The has will be consistent anyway, as
;; long as we use the same coding system.
(let ((coding-system-for-write 'emacs-internal))
(secure-hash 'md5 associated)))
(puthash associated (puthash associated
(list (buffer-modified-tick associated) (list (buffer-modified-tick associated)
file inode hash) file inode hash)

View file

@ -666,12 +666,12 @@ this function appends the default value from
#'completing-read)) #'completing-read))
(extra (if org-refile-use-outline-path "/" "")) (extra (if org-refile-use-outline-path "/" ""))
(cbnex (concat (buffer-name) extra)) (cbnex (concat (buffer-name) extra))
(filename (and cfn (expand-file-name cfn))) (filename (and cfn (file-truename cfn)))
(tbl (mapcar (tbl (mapcar
(lambda (x) (lambda (x)
(if (and (not (member org-refile-use-outline-path (if (and (not (member org-refile-use-outline-path
'(file full-file-path title))) '(file full-file-path title)))
(not (equal filename (nth 1 x)))) (not (equal filename (file-truename (nth 1 x)))))
(cons (concat (car x) extra " (" (cons (concat (car x) extra " ("
(file-name-nondirectory (nth 1 x)) ")") (file-name-nondirectory (nth 1 x)) ")")
(cdr x)) (cdr x))

View file

@ -5,13 +5,13 @@
(defun org-release () (defun org-release ()
"The release version of Org. "The release version of Org.
Inserted by installing Org mode or when a release is made." Inserted by installing Org mode or when a release is made."
(let ((org-release "9.7.4")) (let ((org-release "9.7.5"))
org-release)) org-release))
;;;###autoload ;;;###autoload
(defun org-git-version () (defun org-git-version ()
"The Git version of Org mode. "The Git version of Org mode.
Inserted by installing Org or when a release is made." Inserted by installing Org or when a release is made."
(let ((org-git-version "release_9.7.4-7-g165319")) (let ((org-git-version "release_9.7.5-9-ga091ca"))
org-git-version)) org-git-version))
(provide 'org-version) (provide 'org-version)

View file

@ -9,7 +9,7 @@
;; URL: https://orgmode.org ;; URL: https://orgmode.org
;; Package-Requires: ((emacs "26.1")) ;; Package-Requires: ((emacs "26.1"))
;; Version: 9.7.4 ;; Version: 9.7.5
;; This file is part of GNU Emacs. ;; This file is part of GNU Emacs.
;; ;;
@ -4541,6 +4541,7 @@ directory."
;; Fake Org mode: `org-element-at-point' ;; Fake Org mode: `org-element-at-point'
;; doesn't need full set-up. ;; doesn't need full set-up.
(let ((major-mode 'org-mode)) (let ((major-mode 'org-mode))
(setq-local tab-width 8)
(setq alist (setq alist
(org--collect-keywords-1 (org--collect-keywords-1
keywords unique directory keywords unique directory