0
0
Fork 1
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-08-25 16:02:52 +00:00

Merge branch 'bugfix'

This commit is contained in:
Kyle Meyer 2022-12-01 17:27:29 -05:00
commit 74df6e55c2
19 changed files with 88 additions and 84 deletions

View file

@ -13722,7 +13722,7 @@ A sample Org file with the above headers:
#+vindex: org-export-default-language #+vindex: org-export-default-language
LaTeX packages =babel= or =polyglossia= can also be loaded in a LaTeX packages =babel= or =polyglossia= can also be loaded in a
document. The "AUTO" string will be replaced in both cases by the document. The "AUTO" string will be replaced in both cases by the
appropiate value for the =LANGUAGE= keyword, if present in the appropriate value for the =LANGUAGE= keyword, if present in the
document, or by the value of ~org-export-default-language~. Let's see document, or by the value of ~org-export-default-language~. Let's see
some examples in one or another case. some examples in one or another case.
@ -18491,7 +18491,7 @@ options; they are mutually exclusive.
Ignore the results completely. This option is similar to =none=, Ignore the results completely. This option is similar to =none=,
but no processing is performed on the return value. Calling the but no processing is performed on the return value. Calling the
code block programatically (see [[*How to evaluate source code]]) or by code block programmatically (see [[*How to evaluate source code]]) or by
reference (see [[*Passing arguments]] and [[*Noweb Reference Syntax]]) will reference (see [[*Passing arguments]] and [[*Noweb Reference Syntax]]) will
always yield nil. always yield nil.
@ -18784,7 +18784,7 @@ a octal shorthand is defined, =oXXX= (=o= for octal). Using this, our
read-only example is =:tangle-mode o444=. Omitting the =o= prefix will read-only example is =:tangle-mode o444=. Omitting the =o= prefix will
cause the argument to be interpreted as an integer, which can lead to cause the argument to be interpreted as an integer, which can lead to
unexpected results (=444= is the same as =o674=). unexpected results (=444= is the same as =o674=).
Two other shorthands are recognised, ls-style strings like Two other shorthands are recognized, ls-style strings like
=rw-r--r--=, and chmod-style permissions like =g+w=. =rw-r--r--=, and chmod-style permissions like =g+w=.
Note that chmod-style permissions are based on Note that chmod-style permissions are based on
~org-babel-tangle-default-file-mode~, which is =#o544= by default. ~org-babel-tangle-default-file-mode~, which is =#o544= by default.
@ -18792,7 +18792,7 @@ Note that chmod-style permissions are based on
When =:tangle-mode= and =:shebang= are both specified, the give When =:tangle-mode= and =:shebang= are both specified, the give
=:tangle-mode= will override the permissions from =:shebang=. When =:tangle-mode= will override the permissions from =:shebang=. When
multiple source code blocks tangle to a single file with conflicting multiple source code blocks tangle to a single file with conflicting
=:tangle-mode= header arguments, Org's behaviour is undefined. =:tangle-mode= header arguments, Org's behavior is undefined.
#+cindex: @samp{no-expand}, header argument #+cindex: @samp{no-expand}, header argument
By default Org expands code blocks during tangling. The =no-expand= By default Org expands code blocks during tangling. The =no-expand=

View file

@ -56,7 +56,7 @@ The old folding backend used in Org is poorly scalable when the file
size increases beyond few Mbs. The symptoms usually include slow size increases beyond few Mbs. The symptoms usually include slow
cursor motion, especially in long-running Emacs sessions. cursor motion, especially in long-running Emacs sessions.
A new optimised folding backend is now available, and enabled by A new optimized folding backend is now available, and enabled by
default. To disable it, put the following to the Emacs config *before* default. To disable it, put the following to the Emacs config *before*
loading Org: loading Org:
@ -64,14 +64,14 @@ loading Org:
(setq org-fold-core-style 'overlays) (setq org-fold-core-style 'overlays)
#+end_src #+end_src
Even more performance optimisation can be enabled by customising Even more performance optimization can be enabled by customizing
=org-fold-core--optimise-for-huge-buffers=. However, this option may =org-fold-core--optimise-for-huge-buffers=. However, this option may
be dangerous. Please, read the variable docstring carefully to be dangerous. Please, read the variable docstring carefully to
understand the possible consequences. understand the possible consequences.
When =org-fold-core-style= is set to =text-properties=, several new When =org-fold-core-style= is set to =text-properties=, several new
features will become available and several notable changes will happen features will become available and several notable changes will happen
to the Org behaviour. The new features and changes are listed below. to the Org behavior. The new features and changes are listed below.
**** Hidden parts of the links can now be searched and revealed during isearch **** Hidden parts of the links can now be searched and revealed during isearch
@ -79,7 +79,7 @@ In the past, hidden parts of the links could not be searched using
isearch (=C-s=). Now, they are searchable by default. The hidden isearch (=C-s=). Now, they are searchable by default. The hidden
match is also revealed temporarily during isearch. match is also revealed temporarily during isearch.
To restore the old behaviour add the following core to your Emacs To restore the old behavior add the following core to your Emacs
config: config:
#+begin_src emacs-lisp #+begin_src emacs-lisp
@ -131,13 +131,13 @@ Now, it is not the case anymore. The drawer folding state is
preserved. The initial folding state of all the drawers in buffer is preserved. The initial folding state of all the drawers in buffer is
set according to the startup visibility settings. set according to the startup visibility settings.
To restore the old behaviour, add the following code to Emacs config: To restore the old behavior, add the following code to Emacs config:
#+begin_src emacs-lisp #+begin_src emacs-lisp
(add-hook 'org-cycle-hook #'org-cycle-hide-drawers) (add-hook 'org-cycle-hook #'org-cycle-hide-drawers)
#+end_src #+end_src
Note that old behaviour may cause performance issues when cycling Note that old behavior may cause performance issues when cycling
headline visibility in large buffers. headline visibility in large buffers.
**** =outline-*= functions may no longer work correctly in Org mode **** =outline-*= functions may no longer work correctly in Org mode
@ -339,7 +339,7 @@ This is done by adding =#+ATTR_LATEX: :mode tabbing= at the top
of the table. of the table.
The default column width is set to 1/n times the latex textwidth, The default column width is set to 1/n times the latex textwidth,
where n is the number of columns. where n is the number of columns.
This behaviour can be changed by supplying a =:align= parameter. This behavior can be changed by supplying a =:align= parameter.
The tabbing environment can be useful when generating simple tables which The tabbing environment can be useful when generating simple tables which
can be span multiple pages and when table cells are allowed to overflow. can be span multiple pages and when table cells are allowed to overflow.
@ -528,7 +528,7 @@ Diagnostic information about execution speed can be provided according
to ~org-element--cache-map-statistics~ and to ~org-element--cache-map-statistics~ and
~org-element--cache-map-statistics-threshold~. ~org-element--cache-map-statistics-threshold~.
~org-scan-tags~ and tag views in agenda utilise the new function. ~org-scan-tags~ and tag views in agenda utilize the new function.
*** New function ~org-element-at-point-no-context~ *** New function ~org-element-at-point-no-context~
This function is like ~org-element-at-point~, but it does not try to This function is like ~org-element-at-point~, but it does not try to
@ -553,10 +553,10 @@ argument.
This function is intended for us in the definition of a ~kbd~ macro in This function is intended for us in the definition of a ~kbd~ macro in
files that are exported to Texinfo. files that are exported to Texinfo.
*** =org-at-heading-p= now recognises optional argument. Its meaning is inverted. *** =org-at-heading-p= now recognizes optional argument. Its meaning is inverted.
=org-at-heading-p= now returns t by default on headings inside folds. =org-at-heading-p= now returns t by default on headings inside folds.
Passing optional argument will produce the old behaviour. Passing optional argument will produce the old behavior.
*** =org-babel-execute:plantuml= can output ASCII graphs in the buffer *** =org-babel-execute:plantuml= can output ASCII graphs in the buffer
@ -680,7 +680,7 @@ a function (called with the same arguments as
An example of a such function for =info:= links is An example of a such function for =info:= links is
~org-info-description-as-command~. To access a manual section outside ~org-info-description-as-command~. To access a manual section outside
of Org, description may be pasted to shell prompt or evaluated withing of Org, description may be pasted to shell prompt or evaluated within
Emacs using =M-:= (wrapped into parenthesis). For example, Emacs using =M-:= (wrapped into parenthesis). For example,
description of the =info:org#Tags= link is =info "(org) Tags"=. To description of the =info:org#Tags= link is =info "(org) Tags"=. To
restore earlier behavior add to your Emacs init file the following: restore earlier behavior add to your Emacs init file the following:

View file

@ -101,13 +101,13 @@
(defcustom ob-clojure-babashka-command (executable-find "bb") (defcustom ob-clojure-babashka-command (executable-find "bb")
"Path to the babashka executable." "Path to the babashka executable."
:type 'file :type '(choice file (const nil))
:group 'org-babel :group 'org-babel
:package-version '(Org . "9.6")) :package-version '(Org . "9.6"))
(defcustom ob-clojure-nbb-command (executable-find "nbb") (defcustom ob-clojure-nbb-command (executable-find "nbb")
"Path to the nbb executable." "Path to the nbb executable."
:type 'file :type '(choice file (const nil))
:group 'org-babel :group 'org-babel
:package-version '(Org . "9.6")) :package-version '(Org . "9.6"))

View file

@ -339,7 +339,7 @@ matching a regular expression."
(defun org-babel-interpret-file-mode (mode) (defun org-babel-interpret-file-mode (mode)
"Determine the integer representation of a file MODE specification. "Determine the integer representation of a file MODE specification.
The following forms are currently recognised: The following forms are currently recognized:
- an integer (returned without modification) - an integer (returned without modification)
- \"o755\" (chmod style octal) - \"o755\" (chmod style octal)
- \"rwxrw-r--\" (ls style specification) - \"rwxrw-r--\" (ls style specification)
@ -354,7 +354,7 @@ The following forms are currently recognised:
(user-error "%1$o is not a valid file mode octal. \ (user-error "%1$o is not a valid file mode octal. \
Did you give the decimal value %1$d by mistake?" mode))) Did you give the decimal value %1$d by mistake?" mode)))
((not (stringp mode)) ((not (stringp mode))
(error "File mode %S not recognised as a valid format." mode)) (error "File mode %S not recognized as a valid format." mode))
((string-match-p "^o0?[0-7][0-7][0-7]$" mode) ((string-match-p "^o0?[0-7][0-7][0-7]$" mode)
(string-to-number (replace-regexp-in-string "^o" "" mode) 8)) (string-to-number (replace-regexp-in-string "^o" "" mode) 8))
((string-match-p "^[ugoa]*\\(?:[+-=][rwxXstugo]*\\)+\\(,[ugoa]*\\(?:[+-=][rwxXstugo]*\\)+\\)*$" mode) ((string-match-p "^[ugoa]*\\(?:[+-=][rwxXstugo]*\\)+\\(,[ugoa]*\\(?:[+-=][rwxXstugo]*\\)+\\)*$" mode)
@ -365,7 +365,7 @@ Did you give the decimal value %1$d by mistake?" mode)))
",g=" (substring mode 3 6) ",g=" (substring mode 3 6)
",o=" (substring mode 6 9)) ",o=" (substring mode 6 9))
0)) 0))
(t (error "File mode %S not recognised as a valid format. See `org-babel-interpret-file-mode'." mode)))) (t (error "File mode %S not recognized as a valid format. See `org-babel-interpret-file-mode'." mode))))
(defun org-babel-tangle-clean () (defun org-babel-tangle-clean ()
"Remove comments inserted by `org-babel-tangle'. "Remove comments inserted by `org-babel-tangle'.

View file

@ -150,7 +150,7 @@ link.
called with two arguments: the link location (a string such as called with two arguments: the link location (a string such as
\"~/foobar\", \"id:some-org-id\" or \"https://www.foo.com\") \"~/foobar\", \"id:some-org-id\" or \"https://www.foo.com\")
and the description generated by `org-insert-link'. It should and the description generated by `org-insert-link'. It should
return the description to use (this reflects the behaviour of return the description to use (this reflects the behavior of
`org-link-make-description-function'). If it returns nil, no `org-link-make-description-function'). If it returns nil, no
default description is used, but no error is thrown (from the default description is used, but no error is thrown (from the
user's perspective, this is equivalent to a default description user's perspective, this is equivalent to a default description

View file

@ -5943,7 +5943,7 @@ displayed in agenda view."
(goto-char (point-min)) (goto-char (point-min))
(while (re-search-forward regexp nil t) (while (re-search-forward regexp nil t)
(catch :skip (catch :skip
;; We do not run `org-agenda-skip' righ away because every single sexp ;; We do not run `org-agenda-skip' right away because every single sexp
;; in the buffer is matched here, unlike day-specific search ;; in the buffer is matched here, unlike day-specific search
;; in ordinary timestamps. Most of the sexps will not match ;; in ordinary timestamps. Most of the sexps will not match
;; the agenda day and it is quicker to run `org-agenda-skip' only for ;; the agenda day and it is quicker to run `org-agenda-skip' only for

View file

@ -524,7 +524,7 @@ DIR-property exists (that is different from the unset one)."
"Attach URL." "Attach URL."
(interactive "MURL of the file to attach: \n") (interactive "MURL of the file to attach: \n")
(let ((org-attach-method 'url) (let ((org-attach-method 'url)
(org-safe-remote-resources ; Assume saftey if in an interactive session. (org-safe-remote-resources ; Assume safety if in an interactive session.
(if noninteractive org-safe-remote-resources '("")))) (if noninteractive org-safe-remote-resources '(""))))
(org-attach-attach url))) (org-attach-attach url)))

View file

@ -757,7 +757,7 @@ of the day at point (if any) or the current HH:MM time."
(_ "* Invalid capture template")))) (_ "* Invalid capture template"))))
(defun org-capture--run-template-functions (keyword &optional local) (defun org-capture--run-template-functions (keyword &optional local)
"Run funcitons associated with KEYWORD on template's plist. "Run functions associated with KEYWORD on template's plist.
For valid values of KEYWORD see `org-capture-templates'. For valid values of KEYWORD see `org-capture-templates'.
If LOCAL is non-nil use the buffer-local value of `org-capture-plist'." If LOCAL is non-nil use the buffer-local value of `org-capture-plist'."
;; Used in place of `run-hooks' because these functions have no associated symbol. ;; Used in place of `run-hooks' because these functions have no associated symbol.

View file

@ -1198,8 +1198,11 @@ If `only-dangling-p' is non-nil, only ask to resolve dangling
(string-to-number (shell-command-to-string "ioreg -c IOHIDSystem | perl -ane 'if (/Idle/) {$idle=(pop @F)/1000000000; print $idle; last}'"))) (string-to-number (shell-command-to-string "ioreg -c IOHIDSystem | perl -ane 'if (/Idle/) {$idle=(pop @F)/1000000000; print $idle; last}'")))
(defvar org-x11idle-exists-p (defvar org-x11idle-exists-p
;; Check that x11idle exists ;; Check that x11idle exists. But don't do that on DOS/Windows,
(and (eq 0 (call-process-shell-command ;; since the command definitely does NOT exist there, and invoking
;; COMMAND.COM on MS-Windows is a bad idea -- it hangs.
(and (null (memq system-type '(windows-nt ms-dos)))
(eq 0 (call-process-shell-command
(format "command -v %s" org-clock-x11idle-program-name))) (format "command -v %s" org-clock-x11idle-program-name)))
;; Check that x11idle can retrieve the idle time ;; Check that x11idle can retrieve the idle time
;; FIXME: Why "..-shell-command" rather than just `call-process'? ;; FIXME: Why "..-shell-command" rather than just `call-process'?

View file

@ -1543,7 +1543,7 @@ key."
"Run `org-fold-region' when in org-mode." "Run `org-fold-region' when in org-mode."
(if (derived-mode-p 'org-mode) (if (derived-mode-p 'org-mode)
(org-fold-region (max from (point-min)) (min to (point-max)) flag 'headline) (org-fold-region (max from (point-min)) (min to (point-max)) flag 'headline)
;; Apply EXTRA to avoid breakages if adviced function definition ;; Apply EXTRA to avoid breakages if advised function definition
;; changes. ;; changes.
(apply oldfun from to flag extra))) (apply oldfun from to flag extra)))
@ -1551,7 +1551,7 @@ key."
"Run `org-next-visible-heading' when in org-mode." "Run `org-next-visible-heading' when in org-mode."
(if (derived-mode-p 'org-mode) (if (derived-mode-p 'org-mode)
(org-next-visible-heading arg) (org-next-visible-heading arg)
;; Apply EXTRA to avoid breakages if adviced function definition ;; Apply EXTRA to avoid breakages if advised function definition
;; changes. ;; changes.
(apply oldfun arg extra))) (apply oldfun arg extra)))
@ -1571,7 +1571,7 @@ key."
(point))))) (point)))))
(goto-char found) (goto-char found)
found))) found)))
;; Apply EXTRA to avoid breakages if adviced function definition ;; Apply EXTRA to avoid breakages if advised function definition
;; changes. ;; changes.
(apply oldfun invisible-ok extra))) (apply oldfun invisible-ok extra)))
@ -1579,7 +1579,7 @@ key."
"Run `org-at-heading-p' when in org-mode." "Run `org-at-heading-p' when in org-mode."
(if (derived-mode-p 'org-mode) (if (derived-mode-p 'org-mode)
(org-at-heading-p (not invisible-ok)) (org-at-heading-p (not invisible-ok))
;; Apply EXTRA to avoid breakages if adviced function definition ;; Apply EXTRA to avoid breakages if advised function definition
;; changes. ;; changes.
(apply oldfun invisible-ok extra))) (apply oldfun invisible-ok extra)))
@ -1587,7 +1587,7 @@ key."
"Run `org-fold-hide-sublevels' when in org-mode." "Run `org-fold-hide-sublevels' when in org-mode."
(if (derived-mode-p 'org-mode) (if (derived-mode-p 'org-mode)
(org-fold-hide-sublevels levels) (org-fold-hide-sublevels levels)
;; Apply EXTRA to avoid breakages if adviced function definition ;; Apply EXTRA to avoid breakages if advised function definition
;; changes. ;; changes.
(apply oldfun levels extra))) (apply oldfun levels extra)))
@ -1600,7 +1600,7 @@ key."
(org-fold-hide-subtree) (org-fold-hide-subtree)
(org-fold-show-children) (org-fold-show-children)
(org-fold-show-entry 'hide-drawers))) (org-fold-show-entry 'hide-drawers)))
;; Apply EXTRA to avoid breakages if adviced function definition ;; Apply EXTRA to avoid breakages if advised function definition
;; changes. ;; changes.
(apply oldfun extra))) (apply oldfun extra)))

View file

@ -87,7 +87,7 @@
(defvar-local org-cycle-subtree-status nil) (defvar-local org-cycle-subtree-status nil)
(put 'org-cycle-subtree-status 'org-state t) (put 'org-cycle-subtree-status 'org-state t)
;;;; Customisation: ;;;; Customization:
(defgroup org-cycle nil (defgroup org-cycle nil

View file

@ -713,11 +713,11 @@ is cleared and contents are removed in the process."
;; DATUM is i.e. a headline, it's property list (`:title' ;; DATUM is i.e. a headline, it's property list (`:title'
;; in case of headline) can contain parsed objects. The ;; in case of headline) can contain parsed objects. The
;; objects will contain `:parent' property set to the DATUM ;; objects will contain `:parent' property set to the DATUM
;; itself. When copied, these inner `:parent' propery ;; itself. When copied, these inner `:parent' property
;; values will contain incorrect object decoupled from ;; values will contain incorrect object decoupled from
;; DATUM. Changes to the DATUM copy will not longer be ;; DATUM. Changes to the DATUM copy will not longer be
;; reflected in the `:parent' properties. So, we need to ;; reflected in the `:parent' properties. So, we need to
;; reassign inner `:parent' propreties to the DATUM copy ;; reassign inner `:parent' properties to the DATUM copy
;; explicitly. ;; explicitly.
(org-element-map element-copy (cons 'plain-text org-element-all-objects) (org-element-map element-copy (cons 'plain-text org-element-all-objects)
(lambda (obj) (when (equal datum (org-element-property :parent obj)) (lambda (obj) (when (equal datum (org-element-property :parent obj))
@ -4780,7 +4780,7 @@ Elements are accumulated into ACC."
;; elements. Below code reassigns ;; elements. Below code reassigns
;; `:parent' property of the element and ;; `:parent' property of the element and
;; may interfere with cache ;; may interfere with cache
;; synchronisation if parent element is not ;; synchronization if parent element is not
;; yet in cache. Moreover, the returned ;; yet in cache. Moreover, the returned
;; structure may be altered by caller code ;; structure may be altered by caller code
;; arbitrarily. Hence, we return a copy of ;; arbitrarily. Hence, we return a copy of
@ -5434,14 +5434,14 @@ OFFSET and, if they belong to element PARENT, are adopted by it.
PHASE specifies the phase number, as an integer. PHASE specifies the phase number, as an integer.
For any synchronisation request, all the later requests in the cache For any synchronization request, all the later requests in the cache
must not start at or before END. See `org-element--cache-submit-request'.") must not start at or before END. See `org-element--cache-submit-request'.")
(defvar-local org-element--cache-sync-timer nil (defvar-local org-element--cache-sync-timer nil
"Timer used for cache synchronization.") "Timer used for cache synchronization.")
(defvar-local org-element--cache-sync-keys-value nil (defvar-local org-element--cache-sync-keys-value nil
"Id value used to identify keys during synchronisation. "Id value used to identify keys during synchronization.
See `org-element--cache-key' for more information.") See `org-element--cache-key' for more information.")
(defvar-local org-element--cache-change-tic nil (defvar-local org-element--cache-change-tic nil
@ -5468,9 +5468,9 @@ See `org-element--cache-key' for more information.")
This variable is used to determine when re-parsing buffer is not going This variable is used to determine when re-parsing buffer is not going
to slow down the command. to slow down the command.
If the commends end up modifying the cache, the worst case scenario is If the commands end up modifying the cache, the worst case scenario is
performance drop. So, advicing these commands is safe. Yet, it is performance drop. So, advicing these commands is safe. Yet, it is
better to remove the commands adviced in such way from this list.") better to remove the commands advised in such a way from this list.")
(defmacro org-element--request-key (request) (defmacro org-element--request-key (request)
"Get NEXT part of a `org-element--cache-sync-requests' REQUEST." "Get NEXT part of a `org-element--cache-sync-requests' REQUEST."
@ -6291,7 +6291,7 @@ completing the request."
(key (org-element--cache-key data))) (key (org-element--cache-key data)))
;; Traverse the cache tree. Ignore all the elements before ;; Traverse the cache tree. Ignore all the elements before
;; START. Note that `avl-tree-stack' would not bypass the ;; START. Note that `avl-tree-stack' would not bypass the
;; elements before START and thus would have beeen less ;; elements before START and thus would have been less
;; efficient. ;; efficient.
(if (and leftp (avl-tree--node-left node) (if (and leftp (avl-tree--node-left node)
(not (org-element--cache-key-less-p key start))) (not (org-element--cache-key-less-p key start)))
@ -6793,7 +6793,7 @@ By default (when this variable is nil), cache re-parses modified
headlines immediately after modification preserving all the unaffected headlines immediately after modification preserving all the unaffected
elements inside the headline. elements inside the headline.
The default behaviour works best when users types inside Org buffer of The default behavior works best when users types inside Org buffer of
when buffer modifications are mixed with cache requests. However, when buffer modifications are mixed with cache requests. However,
large automated edits inserting/deleting many headlines are somewhat large automated edits inserting/deleting many headlines are somewhat
slower by default (as in `org-archive-subtree'). Let-binding this slower by default (as in `org-archive-subtree'). Let-binding this
@ -7383,7 +7383,7 @@ the cache."
(save-excursion (save-excursion
(save-restriction (save-restriction
(unless narrow (widen)) (unless narrow (widen))
;; Synchronise cache up to the end of mapped region. ;; Synchronize cache up to the end of mapped region.
(org-element-at-point to-pos) (org-element-at-point to-pos)
(cl-macrolet ((cache-root (cl-macrolet ((cache-root
;; Use the most optimal version of cache available. ;; Use the most optimal version of cache available.
@ -7418,7 +7418,7 @@ the cache."
;; point. ;; point.
() `(progn () `(progn
;; Parsing is one of the performance ;; Parsing is one of the performance
;; bottlenecks. Make sure to optimise it as ;; bottlenecks. Make sure to optimize it as
;; much as possible. ;; much as possible.
;; ;;
;; Avoid extra staff like timer cancels et al ;; Avoid extra staff like timer cancels et al
@ -7737,7 +7737,7 @@ the cache."
;; longer trust STACK. ;; longer trust STACK.
(cache-walk-restart))) (cache-walk-restart)))
;; Second, move to the right branch of the tree or skip ;; Second, move to the right branch of the tree or skip
;; it alltogether. ;; it altogether.
(if continue-flag (if continue-flag
(setq continue-flag nil) (setq continue-flag nil)
(setq node (if (and (car stack) (setq node (if (and (car stack)

View file

@ -78,7 +78,7 @@
;; Similar to 'org-fold-visible, display of any arbitrary folding spec ;; Similar to 'org-fold-visible, display of any arbitrary folding spec
;; can be configured using folding spec properties. In particular, ;; can be configured using folding spec properties. In particular,
;; `:visible' folding spec proprety controls whether the folded text ;; `:visible' folding spec property controls whether the folded text
;; is visible or not. If the `:visible' folding spec property is nil, ;; is visible or not. If the `:visible' folding spec property is nil,
;; folded text is hidden or displayed as a constant string (ellipsis) ;; folded text is hidden or displayed as a constant string (ellipsis)
;; according to the value of `:ellipsis' folding spec property. See ;; according to the value of `:ellipsis' folding spec property. See
@ -91,7 +91,7 @@
;; If necessary, one can add or remove folding specs using ;; If necessary, one can add or remove folding specs using
;; `org-fold-core-add-folding-spec' and `org-fold-core-remove-folding-spec'. ;; `org-fold-core-add-folding-spec' and `org-fold-core-remove-folding-spec'.
;; If a buffer initialised with `org-fold-core-initialize' is cloned into indirect ;; If a buffer initialized with `org-fold-core-initialize' is cloned into indirect
;; buffers, it's folding state is copied to that indirect buffer. ;; buffers, it's folding state is copied to that indirect buffer.
;; The folding states are independent. ;; The folding states are independent.
@ -148,7 +148,7 @@
;; same spec can be used for fold different syntaxical structures. ;; same spec can be used for fold different syntaxical structures.
;; Any folding spec can be additionally referenced by a symbol listed ;; Any folding spec can be additionally referenced by a symbol listed
;; in the spec's `:alias' folding spec property. For example, Org ;; in the spec's `:alias' folding spec property. For example, Org
;; mode's `org-fold-outline' folding spec can be referened as any ;; mode's `org-fold-outline' folding spec can be referenced as any
;; symbol from the following list: '(headline heading outline ;; symbol from the following list: '(headline heading outline
;; inlinetask plain-list) The list is the value of the spec's `:alias' ;; inlinetask plain-list) The list is the value of the spec's `:alias'
;; property. ;; property.
@ -170,7 +170,7 @@
;; possible to control to unfold it temporarily during interactive ;; possible to control to unfold it temporarily during interactive
;; isearch session. ;; isearch session.
;; The isearch behaviour is controlled on per-folding-spec basis by ;; The isearch behavior is controlled on per-folding-spec basis by
;; setting `isearch-open' and `isearch-ignore' folding spec ;; setting `isearch-open' and `isearch-ignore' folding spec
;; properties. The the docstring of `org-fold-core--specs' for more details. ;; properties. The the docstring of `org-fold-core--specs' for more details.
@ -179,12 +179,12 @@
;; The visibility of the text inserted in front, rear, or in the ;; The visibility of the text inserted in front, rear, or in the
;; middle of a folded region is managed according to `:front-sticky' ;; middle of a folded region is managed according to `:front-sticky'
;; and `:rear-sticky' folding properties of the corresponding folding ;; and `:rear-sticky' folding properties of the corresponding folding
;; spec. The rules are the same with stickyness of text properties in ;; spec. The rules are the same with stickiness of text properties in
;; Elisp. ;; Elisp.
;; If a text being inserted into the buffer is already folded and ;; If a text being inserted into the buffer is already folded and
;; invisible (before applying the stickyness rules), then it is ;; invisible (before applying the stickiness rules), then it is
;; revealed. This behaviour can be changed by wrapping the insertion ;; revealed. This behavior can be changed by wrapping the insertion
;; code into `org-fold-core-ignore-modifications' macro. The macro will disable ;; code into `org-fold-core-ignore-modifications' macro. The macro will disable
;; all the processing related to buffer modifications. ;; all the processing related to buffer modifications.
@ -233,13 +233,13 @@
;; visible part of a buffer may cause noticeable lags (which is still ;; visible part of a buffer may cause noticeable lags (which is still
;; orders of magnitude better in comparison with overlays). If the ;; orders of magnitude better in comparison with overlays). If the
;; performance issues become critical while using this library, it is ;; performance issues become critical while using this library, it is
;; recommended to minimise the number of folding specs used in the ;; recommended to minimize the number of folding specs used in the
;; same buffer at a time. ;; same buffer at a time.
;; Alternatively, the library provides `org-fold-core--optimise-for-huge-buffers' ;; Alternatively, the library provides `org-fold-core--optimise-for-huge-buffers'
;; for additional speedup. This can be used as a file-local variable ;; for additional speedup. This can be used as a file-local variable
;; in huge buffers. The variable can be set to enable various levels ;; in huge buffers. The variable can be set to enable various levels
;; of extra optimisation. See the docstring for detailed information. ;; of extra optimization. See the docstring for detailed information.
;; It is worth noting that when using `org-fold-core--optimise-for-huge-buffers' ;; It is worth noting that when using `org-fold-core--optimise-for-huge-buffers'
;; with `grab-invisible' option, folded regions copied to other ;; with `grab-invisible' option, folded regions copied to other
@ -250,7 +250,7 @@
;; Another possible bottleneck is the fragility check after the change ;; Another possible bottleneck is the fragility check after the change
;; related to the folded text. The functions used in `:fragile' ;; related to the folded text. The functions used in `:fragile'
;; folding properties must be optimised. Also, ;; folding properties must be optimized. Also,
;; `org-fold-core-ignore-fragility-checks' or even `org-fold-core-ignore-modifications' may be ;; `org-fold-core-ignore-fragility-checks' or even `org-fold-core-ignore-modifications' may be
;; used when appropriate in the performance-critical code. When ;; used when appropriate in the performance-critical code. When
;; inserting text from within `org-fold-core-ignore-modifications' macro, it is ;; inserting text from within `org-fold-core-ignore-modifications' macro, it is
@ -302,7 +302,7 @@ be revealed.")
(defvar-local org-fold-core--optimise-for-huge-buffers nil (defvar-local org-fold-core--optimise-for-huge-buffers nil
"Non-nil turns on extra speedup on huge buffers (Mbs of folded text). "Non-nil turns on extra speedup on huge buffers (Mbs of folded text).
This setting is risky and may cause various artefacts and degraded This setting is risky and may cause various artifacts and degraded
functionality, especially when using external packages. It is functionality, especially when using external packages. It is
recommended to enable it on per-buffer basis as file-local variable. recommended to enable it on per-buffer basis as file-local variable.
@ -337,7 +337,7 @@ following symbols:
used. used.
- `merge-folds': Do not distinguish between different types of folding - `merge-folds': Do not distinguish between different types of folding
specs. This is the most aggressive optimisation with unforeseen and specs. This is the most aggressive optimization with unforeseen and
potentially drastic effects.") potentially drastic effects.")
(put 'org-fold-core--optimise-for-huge-buffers 'safe-local-variable 'listp) (put 'org-fold-core--optimise-for-huge-buffers 'safe-local-variable 'listp)
@ -355,7 +355,7 @@ following symbols:
"Folding specs defined in current buffer. "Folding specs defined in current buffer.
Each spec is a list (SPEC-SYMBOL SPEC-PROPERTIES). Each spec is a list (SPEC-SYMBOL SPEC-PROPERTIES).
SPEC-SYMBOL is the symbol respresenting the folding spec. SPEC-SYMBOL is the symbol representing the folding spec.
SPEC-PROPERTIES is an alist defining folding spec properties. SPEC-PROPERTIES is an alist defining folding spec properties.
If a text region is folded using multiple specs, only the folding spec If a text region is folded using multiple specs, only the folding spec
@ -600,7 +600,7 @@ unless RETURN-ONLY is non-nil."
(org-fold-core-folding-spec-list))) (org-fold-core-folding-spec-list)))
(remove (assq 'invisible char-property-alias-alist) (remove (assq 'invisible char-property-alias-alist)
char-property-alias-alist))) char-property-alias-alist)))
;; Set folding property stickyness according to ;; Set folding property stickiness according to
;; their `:font-sticky' and `:rear-sticky' ;; their `:font-sticky' and `:rear-sticky'
;; parameters. ;; parameters.
(let (full-prop-list) (let (full-prop-list)
@ -1185,7 +1185,7 @@ instead of text properties. The created overlays will be stored in
;; We do not want it here. ;; We do not want it here.
(with-silent-modifications (with-silent-modifications
(org-fold-core-region (car region) (cdr region) nil spec) (org-fold-core-region (car region) (cdr region) nil spec)
;; The overlay is modelled after `outline-flag-region' ;; The overlay is modeled after `outline-flag-region'
;; [2020-05-09 Sat] overlay for 'outline blocks. ;; [2020-05-09 Sat] overlay for 'outline blocks.
(let ((o (make-overlay (car region) (cdr region) nil 'front-advance))) (let ((o (make-overlay (car region) (cdr region) nil 'front-advance)))
(overlay-put o 'evaporate t) (overlay-put o 'evaporate t)
@ -1303,7 +1303,7 @@ property, unfold the region if the :fragile function returns non-nil."
(unless (org-fold-core-region-folded-p from to spec) (unless (org-fold-core-region-folded-p from to spec)
(let ((spec-to (org-fold-core-get-folding-spec spec (min to (1- (point-max))))) (let ((spec-to (org-fold-core-get-folding-spec spec (min to (1- (point-max)))))
(spec-from (org-fold-core-get-folding-spec spec (max (point-min) (1- from))))) (spec-from (org-fold-core-get-folding-spec spec (max (point-min) (1- from)))))
;; Reveal folds around undoed deletion. ;; Reveal folds around undone deletion.
(when undo-in-progress (when undo-in-progress
(let ((lregion (org-fold-core-get-region-at-point spec (max (point-min) (1- from)))) (let ((lregion (org-fold-core-get-region-at-point spec (max (point-min) (1- from))))
(rregion (org-fold-core-get-region-at-point spec (min to (1- (point-max)))))) (rregion (org-fold-core-get-region-at-point spec (min to (1- (point-max))))))
@ -1412,7 +1412,7 @@ property, unfold the region if the :fragile function returns non-nil."
;; To avoid the above situation, we simply clear all the properties, ;; To avoid the above situation, we simply clear all the properties,
;; unrealated to current buffer when a text is copied. ;; unrealated to current buffer when a text is copied.
;; FIXME: Ideally, we may want to carry the folding state of copied ;; FIXME: Ideally, we may want to carry the folding state of copied
;; text between buffer (probably via user customisation). ;; text between buffer (probably via user customization).
(defun org-fold-core--buffer-substring-filter (beg end &optional delete) (defun org-fold-core--buffer-substring-filter (beg end &optional delete)
"Clear folding state in killed text. "Clear folding state in killed text.
This function is intended to be used as `filter-buffer-substring-function'. This function is intended to be used as `filter-buffer-substring-function'.
@ -1421,7 +1421,7 @@ The arguments and return value are as specified for `filter-buffer-substring'."
;; The list will be used as an argument to `remove-text-properties'. ;; The list will be used as an argument to `remove-text-properties'.
props-list) props-list)
;; There is no easy way to examine all the text properties of a ;; There is no easy way to examine all the text properties of a
;; string, so we utilise the fact that printed string ;; string, so we utilize the fact that printed string
;; representation lists all its properties. ;; representation lists all its properties.
;; Loop over the elements of string representation. ;; Loop over the elements of string representation.
(unless (or (string= "" return-string) (unless (or (string= "" return-string)
@ -1481,7 +1481,7 @@ The arguments and return value are as specified for `filter-buffer-substring'."
return-string)) return-string))
(defun org-fold-core-update-optimisation (beg end) (defun org-fold-core-update-optimisation (beg end)
"Update huge buffer optimisation between BEG and END. "Update huge buffer optimization between BEG and END.
See `org-fold-core--optimise-for-huge-buffers'." See `org-fold-core--optimise-for-huge-buffers'."
(when (and (memql 'grab-invisible org-fold-core--optimise-for-huge-buffers) (when (and (memql 'grab-invisible org-fold-core--optimise-for-huge-buffers)
(eq org-fold-core-style 'text-properties)) (eq org-fold-core-style 'text-properties))
@ -1494,7 +1494,7 @@ See `org-fold-core--optimise-for-huge-buffers'."
(setq pos (org-fold-core-next-folding-state-change (caar org-fold-core--specs) pos end)))))) (setq pos (org-fold-core-next-folding-state-change (caar org-fold-core--specs) pos end))))))
(defun org-fold-core-remove-optimisation (beg end) (defun org-fold-core-remove-optimisation (beg end)
"Remove huge buffer optimisation between BEG and END. "Remove huge buffer optimization between BEG and END.
See `org-fold-core--optimise-for-huge-buffers'." See `org-fold-core--optimise-for-huge-buffers'."
(when (and (memql 'grab-invisible org-fold-core--optimise-for-huge-buffers) (when (and (memql 'grab-invisible org-fold-core--optimise-for-huge-buffers)
(eq org-fold-core-style 'text-properties)) (eq org-fold-core-style 'text-properties))

View file

@ -1082,7 +1082,7 @@ Return width in pixels when PIXELS is non-nil."
(setq-local buffer-invisibility-spec (setq-local buffer-invisibility-spec
(if (listp current-invisibility-spec) (if (listp current-invisibility-spec)
(mapcar (lambda (el) (mapcar (lambda (el)
;; Consider elipsis to have 0 width. ;; Consider ellipsis to have 0 width.
;; It is what Emacs 28+ does, but we have ;; It is what Emacs 28+ does, but we have
;; to force it in earlier Emacs versions. ;; to force it in earlier Emacs versions.
(if (and (consp el) (cdr el)) (if (and (consp el) (cdr el))

View file

@ -189,7 +189,7 @@
(defcustom org-persist-remote-files 100 (defcustom org-persist-remote-files 100
"Whether to keep persistent data for remote files. "Whether to keep persistent data for remote files.
When this variable is nil, never save persitent data associated with When this variable is nil, never save persistent data associated with
remote files. When t, always keep the data. When remote files. When t, always keep the data. When
`check-existence', contact remote server containing the file and only `check-existence', contact remote server containing the file and only
keep the data when the file exists on the server. When a number, keep keep the data when the file exists on the server. When a number, keep

View file

@ -1383,13 +1383,13 @@ For more examples, see the system specific constants
(defcustom org-resource-download-policy 'prompt (defcustom org-resource-download-policy 'prompt
"The policy applied to requests to obtain remote resources. "The policy applied to requests to obtain remote resources.
This affects keywords like #+setupfile and #+incude on export, This affects keywords like #+setupfile and #+include on export,
`org-persist-write:url',and `org-attach-url' in non-interactive `org-persist-write:url',and `org-attach-url' in non-interactive
Emacs sessions. Emacs sessions.
This recognises four possible values: This recognizes four possible values:
- t, remote resources should always be downloaded. - t, remote resources should always be downloaded.
- prompt, you will be prompted to download resources nt considered safe. - prompt, you will be prompted to download resources not considered safe.
- safe, only resources considered safe will be downloaded. - safe, only resources considered safe will be downloaded.
- nil, never download remote resources. - nil, never download remote resources.
@ -1408,7 +1408,7 @@ URI regexps are applied to both URLs and Org files requesting
remote resources." remote resources."
:group 'org :group 'org
:package-version '(Org . "9.6") :package-version '(Org . "9.6")
:type '(list regexp)) :type '(repeat regexp))
(defcustom org-open-non-existing-files nil (defcustom org-open-non-existing-files nil
"Non-nil means `org-open-file' opens non-existing files. "Non-nil means `org-open-file' opens non-existing files.
@ -4625,7 +4625,7 @@ returns non-nil if any of them match."
", which is not considered safe.\n\n" ", which is not considered safe.\n\n"
"Do you want to download this? You can type\n " "Do you want to download this? You can type\n "
(propertize "!" 'face 'success) (propertize "!" 'face 'success)
" to download this resource, and permanantly mark it as safe.\n " " to download this resource, and permanently mark it as safe.\n "
(if domain (if domain
(concat (concat
(propertize "d" 'face 'success) (propertize "d" 'face 'success)
@ -4636,7 +4636,7 @@ returns non-nil if any of them match."
(propertize "f" 'face 'success) (propertize "f" 'face 'success)
(if current-file (if current-file
(concat (concat
" to download this resource, and permanantly mark all resources in " " to download this resource, and permanently mark all resources in "
(propertize current-file 'face 'underline) (propertize current-file 'face 'underline)
" as safe.\n ") " as safe.\n ")
"") "")
@ -4764,7 +4764,7 @@ This is for getting out of special buffers like capture.")
(defvar org-element-cache-persistent); Defined in org-element.el (defvar org-element-cache-persistent); Defined in org-element.el
(defvar org-element-use-cache); Defined in org-element.el (defvar org-element-use-cache); Defined in org-element.el
(defvar org-mode-loading nil (defvar org-mode-loading nil
"Non-nil during Org mode initialisation.") "Non-nil during Org mode initialization.")
(defvar org-agenda-file-menu-enabled t (defvar org-agenda-file-menu-enabled t
"When non-nil, refresh Agenda files in Org menu when loading Org.") "When non-nil, refresh Agenda files in Org menu when loading Org.")
@ -5270,7 +5270,7 @@ This includes angle, plain, and bracket links."
(progn (progn
(add-face-text-property start end face-property) (add-face-text-property start end face-property)
(add-text-properties start end properties)) (add-text-properties start end properties))
;; Initialise folding when used outside org-mode. ;; Initialize folding when used outside org-mode.
(unless (or (derived-mode-p 'org-mode) (unless (or (derived-mode-p 'org-mode)
(and (org-fold-folding-spec-p 'org-link-description) (and (org-fold-folding-spec-p 'org-link-description)
(org-fold-folding-spec-p 'org-link))) (org-fold-folding-spec-p 'org-link)))
@ -5287,7 +5287,7 @@ This includes angle, plain, and bracket links."
(org-fold-core-set-folding-spec-property spec :visible t)) (org-fold-core-set-folding-spec-property spec :visible t))
(org-fold-region start end nil 'org-link) (org-fold-region start end nil 'org-link)
(org-fold-region start end nil 'org-link-description) (org-fold-region start end nil 'org-link-description)
;; We are folding the whole emphasised text with SPEC ;; We are folding the whole emphasized text with SPEC
;; first. It makes everything invisible (or whatever ;; first. It makes everything invisible (or whatever
;; the user wants). ;; the user wants).
(org-fold-region start end t spec) (org-fold-region start end t spec)
@ -6407,7 +6407,7 @@ Return nil before first heading."
"" h)) "" h))
(h h))) (h h)))
(tags (and (not no-tags) (match-string 5)))) (tags (and (not no-tags) (match-string 5))))
;; Restore cleared optimisation. ;; Restore cleared optimization.
(org-fold-core-update-optimisation (match-beginning 0) (match-end 0)) (org-fold-core-update-optimisation (match-beginning 0) (match-end 0))
(mapconcat #'identity (mapconcat #'identity
(delq nil (list todo priority headline tags)) (delq nil (list todo priority headline tags))

View file

@ -75,7 +75,7 @@ for timed events. If non-zero, alarms are created.
(defcustom org-icalendar-force-alarm nil (defcustom org-icalendar-force-alarm nil
"Non-nil means alarm will be created even if is set to zero. "Non-nil means alarm will be created even if is set to zero.
This overrides default behaviour where zero means no alarm. With This overrides default behavior where zero means no alarm. With
this set to non-nil and alarm set to zero, alarm will be created this set to non-nil and alarm set to zero, alarm will be created
and will fire at the event start." and will fire at the event start."
:group 'org-export-icalendar :group 'org-export-icalendar

View file

@ -928,7 +928,7 @@ The function should return the string to be exported."
(defcustom org-latex-src-block-backend 'verbatim (defcustom org-latex-src-block-backend 'verbatim
"Backend used to generate source code listings. "Backend used to generate source code listings.
This sets the behaviour for fontifying source code, possibly even with This sets the behavior for fontifying source code, possibly even with
color. There are four implementations of this functionality you may color. There are four implementations of this functionality you may
choose from (ordered from least to most capable): choose from (ordered from least to most capable):
1. Verbatim 1. Verbatim
@ -942,7 +942,7 @@ highlighting (listings), or none at all (verbatim).
When using listings, you also need to make use of LaTeX package When using listings, you also need to make use of LaTeX package
\"listings\". The \"color\" LaTeX package is also needed if you \"listings\". The \"color\" LaTeX package is also needed if you
would like color too. These can simply be added to would like color too. These can simply be added to
`org-latex-packages-alist', using customise or something like: `org-latex-packages-alist', using customize or something like:
(require \\='ox-latex) (require \\='ox-latex)
(add-to-list \\='org-latex-packages-alist \\='(\"\" \"listings\")) (add-to-list \\='org-latex-packages-alist \\='(\"\" \"listings\"))
@ -981,7 +981,7 @@ Emacs' font-lock information. This requires the Emacs package
engrave-faces (available from ELPA), and the LaTeX package engrave-faces (available from ELPA), and the LaTeX package
fvextra be installed. fvextra be installed.
The styling of the engraved result can be customised with The styling of the engraved result can be customized with
`org-latex-engraved-preamble' and `org-latex-engraved-options'. `org-latex-engraved-preamble' and `org-latex-engraved-options'.
The default preamble also uses the LaTeX package tcolorbox in The default preamble also uses the LaTeX package tcolorbox in
addition to fvextra." addition to fvextra."
@ -1202,11 +1202,11 @@ as long as it:
\"Verbatim\" environments (provided by fvextra) will be wrapped with. \"Verbatim\" environments (provided by fvextra) will be wrapped with.
In the default value the colors \"EFD\" and \"EfD\" are provided In the default value the colors \"EFD\" and \"EfD\" are provided
as they are respectively the foreground and background colours, as they are respectively the foreground and background colors,
just in case they aren't provided by the generated preamble, so just in case they aren't provided by the generated preamble, so
we can assume they are always set. we can assume they are always set.
Within this preamble there are two recognised macro-like placeholders: Within this preamble there are two recognized macro-like placeholders:
[FVEXTRA-SETUP] [FVEXTRA-SETUP]

View file

@ -87,7 +87,8 @@ included into another document or application that reserves top-level
headings for its own use." headings for its own use."
:group 'org-export-md :group 'org-export-md
:package-version '(Org . "9.6") :package-version '(Org . "9.6")
:type 'string) ;; Avoid `natnum' because that's not available until Emacs 28.1.
:type 'integer)