Update to Org 9.5.4-17-g6e991f

This commit is contained in:
Kyle Meyer 2022-07-24 16:24:24 -04:00
parent f7fd7bf477
commit ba70d0f77c
18 changed files with 54 additions and 36 deletions

View file

@ -480,7 +480,7 @@ value. The value can either be a string or a closure that
evaluates to a string. The closure is evaluated when the source evaluates to a string. The closure is evaluated when the source
block is being evaluated (e.g. during execution or export), with block is being evaluated (e.g. during execution or export), with
point at the source block. It is not possible to use an point at the source block. It is not possible to use an
arbitrary function symbol (e.g. 'some-func), since org uses arbitrary function symbol (e.g. `some-func'), since org uses
lexical binding. To achieve the same functionality, call the lexical binding. To achieve the same functionality, call the
function within a closure (e.g. (lambda () (some-func))). function within a closure (e.g. (lambda () (some-func))).

View file

@ -250,8 +250,8 @@ end")
(defun org-babel-julia-evaluate-external-process (defun org-babel-julia-evaluate-external-process
(body result-type result-params column-names-p) (body result-type result-params column-names-p)
"Evaluate BODY in external julia process. "Evaluate BODY in external julia process.
If RESULT-TYPE equals 'output then return standard output as a If RESULT-TYPE equals `output' then return standard output as a
string. If RESULT-TYPE equals 'value then return the value of the string. If RESULT-TYPE equals `value' then return the value of the
last statement in BODY, as elisp." last statement in BODY, as elisp."
(cl-case result-type (cl-case result-type
(value (value
@ -274,8 +274,8 @@ last statement in BODY, as elisp."
(defun org-babel-julia-evaluate-session (defun org-babel-julia-evaluate-session
(session body result-type result-params column-names-p) (session body result-type result-params column-names-p)
"Evaluate BODY in SESSION. "Evaluate BODY in SESSION.
If RESULT-TYPE equals 'output then return standard output as a If RESULT-TYPE equals `output' then return standard output as a
string. If RESULT-TYPE equals 'value then return the value of the string. If RESULT-TYPE equals `value' then return the value of the
last statement in BODY, as elisp." last statement in BODY, as elisp."
(cl-case result-type (cl-case result-type
(value (value

View file

@ -395,7 +395,7 @@ fd:close()"
(org-babel-lua-table-or-string results))))) (org-babel-lua-table-or-string results)))))
(defun org-babel-lua-read-string (string) (defun org-babel-lua-read-string (string)
"Strip 's from around Lua string." "Strip \\=' characters from around Lua string."
(org-unbracket-string "'" "'" string)) (org-unbracket-string "'" "'" string))
(provide 'ob-lua) (provide 'ob-lua)

View file

@ -84,7 +84,7 @@ is the equivalent of the following source code block:
#+end_src #+end_src
NOTE: The quotation marks around the function name, NOTE: The quotation marks around the function name,
'source-block', are optional. `source-block', are optional.
NOTE: By default, string variable names are interpreted as NOTE: By default, string variable names are interpreted as
references to source-code blocks, to force interpretation of a references to source-code blocks, to force interpretation of a

View file

@ -581,7 +581,10 @@ which enable the original code blocks to be found."
(error "Not in tangled code")) (error "Not in tangled code"))
(setq body (buffer-substring body-start end))) (setq body (buffer-substring body-start end)))
;; Go to the beginning of the relative block in Org file. ;; Go to the beginning of the relative block in Org file.
(org-link-open-from-string link) ;; Explicitly allow fuzzy search even if user customized
;; otherwise.
(let (org-link-search-must-match-exact-headline)
(org-link-open-from-string link))
(setq target-buffer (current-buffer)) (setq target-buffer (current-buffer))
(if (string-match "[^ \t\n\r]:\\([[:digit:]]+\\)" block-name) (if (string-match "[^ \t\n\r]:\\([[:digit:]]+\\)" block-name)
(let ((n (string-to-number (match-string 1 block-name)))) (let ((n (string-to-number (match-string 1 block-name))))

View file

@ -73,6 +73,7 @@
(require 'seq) (require 'seq)
(declare-function org-open-at-point "org" (&optional arg)) (declare-function org-open-at-point "org" (&optional arg))
(declare-function org-open-file "org" (path &optional in-emacs line search))
(declare-function org-element-interpret-data "org-element" (data)) (declare-function org-element-interpret-data "org-element" (data))
(declare-function org-element-property "org-element" (property element)) (declare-function org-element-property "org-element" (property element))

View file

@ -1615,7 +1615,7 @@ alpha-down Sort headlines alphabetically, reversed.
The different possibilities will be tried in sequence, and testing stops The different possibilities will be tried in sequence, and testing stops
if one comparison returns a \"not-equal\". For example, the default if one comparison returns a \"not-equal\". For example, the default
'(time-up category-keep priority-down) `(time-up category-keep priority-down)'
means: Pull out all entries having a specified time of day and sort them, means: Pull out all entries having a specified time of day and sort them,
in order to make a time schedule for the current day the first thing in the in order to make a time schedule for the current day the first thing in the
agenda listing for the day. Of the entries without a time indication, keep agenda listing for the day. Of the entries without a time indication, keep
@ -4124,7 +4124,7 @@ dimming them." ;FIXME: The arg isn't used, actually!
If the header at `org-hd-marker' is blocked according to If the header at `org-hd-marker' is blocked according to
`org-entry-blocked-p', then if `org-agenda-dim-blocked-tasks' is `org-entry-blocked-p', then if `org-agenda-dim-blocked-tasks' is
'invisible and the header is not blocked by checkboxes, set the `invisible' and the header is not blocked by checkboxes, set the
text property `org-todo-blocked' to `invisible', otherwise set it text property `org-todo-blocked' to `invisible', otherwise set it
to t." to t."
(when (get-text-property 0 'todo-state entry) (when (get-text-property 0 'todo-state entry)
@ -7399,7 +7399,7 @@ Argument ARG is the prefix argument."
When in a restricted subtree, remove it. When in a restricted subtree, remove it.
The restriction will span over the entire file if TYPE is `file', The restriction will span over the entire file if TYPE is `file',
or if type is '(4), or if the cursor is before the first headline or if type is \\='(4), or if the cursor is before the first headline
in the file. Otherwise, only apply the restriction to the current in the file. Otherwise, only apply the restriction to the current
subtree." subtree."
(interactive "P") (interactive "P")

View file

@ -113,6 +113,11 @@ the symbol of the calling function, for example."
;;; Emacs < 27.1 compatibility ;;; Emacs < 27.1 compatibility
(if (version< emacs-version "27.1")
(defsubst org-replace-buffer-contents (source &optional _max-secs _max-costs)
(replace-buffer-contents source))
(defalias 'org-replace-buffer-contents #'replace-buffer-contents))
(unless (fboundp 'proper-list-p) (unless (fboundp 'proper-list-p)
;; `proper-list-p' was added in Emacs 27.1. The function below is ;; `proper-list-p' was added in Emacs 27.1. The function below is
;; taken from Emacs subr.el 200195e824b^. ;; taken from Emacs subr.el 200195e824b^.

View file

@ -280,7 +280,7 @@ When NORMALISE is non-nil, the count is divided by the number of values."
collect (cons n (/ (length m) normaliser))))) collect (cons n (/ (length m) normaliser)))))
(defun org--plot/prime-factors (value) (defun org--plot/prime-factors (value)
"Return the prime decomposition of VALUE, e.g. for 12, '(3 2 2)." "Return the prime decomposition of VALUE, e.g. for 12, \\='(3 2 2)."
(let ((factors '(1)) (i 1)) (let ((factors '(1)) (i 1))
(while (/= 1 value) (while (/= 1 value)
(setq i (1+ i)) (setq i (1+ i))
@ -682,9 +682,10 @@ line directly before or after the table."
(looking-at "[[:space:]]*#\\+")) (looking-at "[[:space:]]*#\\+"))
(setf params (org-plot/collect-options params)))) (setf params (org-plot/collect-options params))))
;; Dump table to datafile ;; Dump table to datafile
(if-let ((dump-func (plist-get type :data-dump))) (let ((dump-func (plist-get type :data-dump)))
(funcall dump-func table data-file num-cols params) (if dump-func
(org-plot/gnuplot-to-data table data-file params)) (funcall dump-func table data-file num-cols params)
(org-plot/gnuplot-to-data table data-file params)))
;; Check type of ind column (timestamp? text?) ;; Check type of ind column (timestamp? text?)
(when (plist-get params :check-ind-type) (when (plist-get params :check-ind-type)
(let* ((ind (1- (plist-get params :ind))) (let* ((ind (1- (plist-get params :ind)))

View file

@ -1235,7 +1235,7 @@ Throw an error if there is no such buffer."
(insert (with-current-buffer write-back-buf (buffer-string)))) (insert (with-current-buffer write-back-buf (buffer-string))))
(save-restriction (save-restriction
(narrow-to-region beg end) (narrow-to-region beg end)
(replace-buffer-contents write-back-buf 0.1 nil) (org-replace-buffer-contents write-back-buf 0.1 nil)
(goto-char (point-max)))) (goto-char (point-max))))
(when (and expecting-bol (not (bolp))) (insert "\n"))) (when (and expecting-bol (not (bolp))) (insert "\n")))
(kill-buffer write-back-buf) (kill-buffer write-back-buf)
@ -1283,7 +1283,7 @@ Throw an error if there is no such buffer."
(buffer-string)))) (buffer-string))))
(save-restriction (save-restriction
(narrow-to-region beg end) (narrow-to-region beg end)
(replace-buffer-contents write-back-buf 0.1 nil) (org-replace-buffer-contents write-back-buf 0.1 nil)
(goto-char (point-max)))) (goto-char (point-max))))
(when (and expecting-bol (not (bolp))) (insert "\n"))))) (when (and expecting-bol (not (bolp))) (insert "\n")))))
(when write-back-buf (kill-buffer write-back-buf)) (when write-back-buf (kill-buffer write-back-buf))

View file

@ -5465,7 +5465,7 @@ The table is taken from the parameter TXT, or from the buffer at point."
(nreverse table))))) (nreverse table)))))
(defun org-table-collapse-header (table &optional separator max-header-lines) (defun org-table-collapse-header (table &optional separator max-header-lines)
"Collapse the lines before 'hline into a single header. "Collapse the lines before `hline' into a single header.
The given TABLE is a list of lists as returned by `org-table-to-lisp'. The given TABLE is a list of lists as returned by `org-table-to-lisp'.
The leading lines before the first `hline' symbol are considered The leading lines before the first `hline' symbol are considered

View file

@ -11,7 +11,7 @@ Inserted by installing Org mode or when a release is made."
(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.5.4-3-g6dc785")) (let ((org-git-version "release_9.5.4-17-g6e991f"))
org-git-version)) org-git-version))
(provide 'org-version) (provide 'org-version)

View file

@ -1694,7 +1694,7 @@ OK to kill that hidden subtree. When nil, kill without remorse."
(const :tag "Never kill a hidden subtree with C-k" error))) (const :tag "Never kill a hidden subtree with C-k" error)))
(defcustom org-special-ctrl-o t (defcustom org-special-ctrl-o t
"Non-nil means, make `C-o' insert a row in tables." "Non-nil means, make `open-line' (\\[open-line]) insert a row in tables."
:group 'org-edit-structure :group 'org-edit-structure
:type 'boolean) :type 'boolean)
@ -3301,7 +3301,7 @@ Replace format-specifiers in the command as noted below and use
%i: The LaTeX fragment to be converted. %i: The LaTeX fragment to be converted.
For example, this could be used with LaTeXML as For example, this could be used with LaTeXML as
\"latexmlc 'literal:%i' --profile=math --preload=siunitx.sty 2>/dev/null\"." \"latexmlc \\='literal:%i\\=' --profile=math --preload=siunitx.sty 2>/dev/null\"."
:group 'org-latex :group 'org-latex
:package-version '(Org . "9.4") :package-version '(Org . "9.4")
:type '(choice :type '(choice

View file

@ -948,12 +948,18 @@ channel."
(when description (when description
(let ((dest (if (equal type "fuzzy") (let ((dest (if (equal type "fuzzy")
(org-export-resolve-fuzzy-link link info) (org-export-resolve-fuzzy-link link info)
(org-export-resolve-id-link link info)))) ;; Ignore broken links. On broken link,
(concat ;; `org-export-resolve-id-link' will throw an
(org-ascii--fill-string ;; error and we will return nil.
(format "[%s] %s" anchor (org-ascii--describe-datum dest info)) (condition-case nil
width info) (org-export-resolve-id-link link info)
"\n\n")))) (org-link-broken nil)))))
(when dest
(concat
(org-ascii--fill-string
(format "[%s] %s" anchor (org-ascii--describe-datum dest info))
width info)
"\n\n")))))
;; Do not add a link that cannot be resolved and doesn't have ;; Do not add a link that cannot be resolved and doesn't have
;; any description: destination is already visible in the ;; any description: destination is already visible in the
;; paragraph. ;; paragraph.

View file

@ -2909,7 +2909,7 @@ Starred and \"displaymath\" environments are not numbered."
(defun org-html--unlabel-latex-environment (latex-frag) (defun org-html--unlabel-latex-environment (latex-frag)
"Change environment in LATEX-FRAG string to an unnumbered one. "Change environment in LATEX-FRAG string to an unnumbered one.
For instance, change an 'equation' environment to 'equation*'." For instance, change an `equation' environment to `equation*'."
(replace-regexp-in-string (replace-regexp-in-string
"\\`[ \t]*\\\\begin{\\([^*]+?\\)}" "\\`[ \t]*\\\\begin{\\([^*]+?\\)}"
"\\1*" "\\1*"

View file

@ -193,11 +193,11 @@ of contents can refer to headlines."
;; A link refers internally to HEADLINE. ;; A link refers internally to HEADLINE.
(org-element-map (plist-get info :parse-tree) 'link (org-element-map (plist-get info :parse-tree) 'link
(lambda (link) (lambda (link)
(eq headline (equal headline
(pcase (org-element-property :type link) ;; Ignore broken links.
((or "custom-id" "id") (org-export-resolve-id-link link info)) (condition-case nil
("fuzzy" (org-export-resolve-fuzzy-link link info)) (org-export-resolve-id-link link info)
(_ nil)))) (org-link-broken nil))))
info t)))) info t))))
(defun org-md--headline-title (style level title &optional anchor tags) (defun org-md--headline-title (style level title &optional anchor tags)

View file

@ -839,7 +839,7 @@ in `org-export-options-alist' or in export back-ends. In the
latter case, optional argument BACKEND has to be set to the latter case, optional argument BACKEND has to be set to the
back-end where the option is defined, e.g., back-end where the option is defined, e.g.,
(org-publish-find-property file :subtitle 'latex) (org-publish-find-property file :subtitle \\='latex)
Return value may be a string or a list, depending on the type of Return value may be a string or a list, depending on the type of
PROPERTY, i.e. \"behavior\" parameter from `org-export-options-alist'." PROPERTY, i.e. \"behavior\" parameter from `org-export-options-alist'."

View file

@ -1908,8 +1908,10 @@ Return a string."
(org-element-property :archivedp data))) (org-element-property :archivedp data)))
(let ((transcoder (org-export-transcoder data info))) (let ((transcoder (org-export-transcoder data info)))
(or (and (functionp transcoder) (or (and (functionp transcoder)
(broken-link-handler (if (eq type 'link)
(funcall transcoder data nil info))) (broken-link-handler
(funcall transcoder data nil info))
(funcall transcoder data nil info)))
;; Export snippets never return a nil value so ;; Export snippets never return a nil value so
;; that white spaces following them are never ;; that white spaces following them are never
;; ignored. ;; ignored.