* lisp/org.el (org-resource-download-policy, org-safe-remote-resources):
Two new customisations to configure the policy for downloading remote
resources.
(org--should-fetch-remote-resource-p, org--safe-remote-resource-p,
org--confirm-resource-safe): Introduce the new function
`org--should-fetch-remote-resource-p' for internal use determining
whether a remote resource should be downloaded according to the download
policy. This function makes use of two helper functions,
`org--safe-remote-resource-p' and `org--confirm-resource-safe'.
(org-file-contents): Apply `org--safe-remote-resource-p' to file
downloading.
* lisp/org-persist.el (org-persist-write): Apply
`org--safe-remote-resource-p' to url downloading.
* lisp/org-attach.el (org-attach-attach, org-attach-url): Apply
`org--safe-remote-resource-p' to url downloading.
* lisp/org-fold-core.el (org-fold-core--fix-folded-region): Check
fragility in all the indirect buffers.
* lisp/org-fold.el (org-fold--reveal-headline-at-point): New function
revealing heading line or full heading when the heading only contains
blank lines.
(org-fold--reveal-outline-maybe): Check headline at the end of folded
region as well. Use `org-fold-core--fix-folded-region'.
* lisp/org.el (org-insert-heading): Make sure that the newline in
front of heading is revealed.
*
testing/lisp/test-org-fold.el (test-org-fold/org-fold-reveal-broken-structure):
Test `org-delete-char' instead of `delete-char'. The former is the
function used interactively.
* lisp/org-fold-core.el (org-fold-core-style): Explain that the new
folding with text properties can be problematic with third-party
packages, not with Org itself.
See https://orgmode.org/list/877d4jve13.fsf@gmail.com
* lisp/org.el (org-agenda-prepare-buffers): Call
`org-with-wide-buffer' for every buffer in the agenda, instead of
calling `save-excursion'/'`save-restrictions' just for the current
buffer, to save restrictions in all buffers. Use
`with-current-buffer' instead of `save-excursion'/'`set-buffer'.
See https://list.orgmode.org/orgmode/87y1x588rs.fsf@thinkpad.mail-host-address-is-not-set/
TINYCHANGE
* lisp/oc-basic.el (org-cite-basic--parse-bibtex): Validate the
bibliography before parsing. Display list of issues if any (via
`bibtex-validate`).
(org-cite-basic--parse-bibliography): Set buffer file name needed by
`bibtex-validate`. Empty the cache in case of error.
* lisp/ob-core.el (org-babel-default-header-args): Provide an example
illustrating one benefit of using closures as default header
arguments. Additionally, explain how to provide the same type of
header argument multiple times in the default alist.
* lisp/org-src.el (org-src-window-setup): Add plain to the list of
valid choices for `org-src-window-setup'.
A previous change added it to the documentation and to the pcase that
process this variable in `org-src-switch-to-buffer', but the defcustom
did not include it as a valid option.
TINYCHANGE
* lisp/oc-csl.el (org-cite-csl--rendered-citations): Collect nocite
style citations in a separate list as required by the citeproc-el
API. Set the output of all nocite citations to the empty string.
(org-cite-csl--nocite-p): New helper predicate for checking whether a
citation is a nocite.
* lisp/ob-core.el: Make sure that
`org-babel-temporary-stable-directory' is set to non-nil non-existent
directory. Non-existent directory is required to avoid clashes when
multiple Emacs processes are running.
Fixes https://yhetil.org/emacs-devel/87sfnfhm6v.fsf@yandex.com
* lisp/ob-core.el (org-babel-temporary-stable-directory): New variable
holding a temporary directory name that does not change between Emacs
sessions.
(org-babel-remove-temporary-stable-directory): New function removing
`org-babel-temporary-stable-directory' on Emacs shutdown.
(org-babel-temp-stable-file): Generate stable temporary file name for
object storage. The file name is constant for equal objects.
(org-babel-execute-src-block): Explicitly identify that if the result
is cached.
* lisp/ob-gnuplot.el (org-babel-gnuplot-process-vars): Make use of
`org-babel-stable-file' to make expanded body stable with respect to
:var assignments.
Fixes https://orgmode.org/list/87mtn1o5mn.fsf@ucl.ac.uk
* lisp/org.el (org-setup-filling): Set fill-forward-paragraph-function.
(org--single-lines-list-is-paragraph): New internal variable. Whether
a list with single lines items should be considered a single
paragraph.
(org--paragraph-at-point): use org--single-lines-list-is-paragraph.
(org-fill-paragraph): When an active region contains a list ensure
every item get filled.
* testing/lisp/test-org.el (test-org/fill-paragraph):
(test-org/fill-region): Test behaviour of fill-paragraph and
fill-region with an active region containing a list.
When filling paragraphs in a region, do not treat a list with single
lines items as a single paragraph.
Org mode supports Emacs 26 or newer:
https://orgmode.org/worg/org-maintenance.html#emacs-compatibility
* lisp/org-compat.el (org-set-transient-map)
(org-font-lock-ensure): Delete compat aliases. Update callers.
(org-define-error): Redefine as obsolete function alias for
`define-error'. Update callers.
(string-suffix-p): Delete compatibility definition.
* lisp/org-fold-core.el (org-fold-core--seq-partition): Delete private
function and update callers to use `seq-partition'.
* lisp/org-macs.el (org-without-partial-completion): Move from here...
* lisp/org-compat.el (org-without-partial-completion): ...to here.
Redefine as obsolete function alias for `progn'.
* lisp/org-agenda.el (org-agenda-block-separator)
(org-agenda-time-grid, org-agenda-current-time-string): Improve
default visual elements on graphical displays. Inspired by
org-modern.el by Daniel Mendler <mail@daniel-mendler.de>.
* lisp/ox-latex.el (org-latex-src-block): Fix an earlier oversight where
the custom environment was not passed on from `org-latex-src-block' to
`org-latex-src-block--custom'.
* lisp/org-element.el (org-element--cache-diagnostics-modifications):
(org-element--cache-silent-modification-check): Remove variables that
were introduced to deal with false positives. The new check is more
reliable.
(org-element--cache-last-buffer-size): New variable storing the last
known buffer size registered before/after handled buffer edits.
(org-element--cache-sync): Use `buffer-size' instead of
`buffer-chars-modified-tick' heuristics. `buffer-size' may not catch
all the modifications, but it does not cause numerous
false-positives triggered by quail. See Emacs Bug#51766 for the
detailed discussion.
(org-element--cache-before-change):
(org-element-cache-reset): Record buffer size before/after changes.
* lisp/org-macs.el (org-unique-local-variables): Do not carry over
buffer-local `org-element--cache-last-buffer-size' when cloning
buffer.
* lisp/org-persist.el (org-persist--read-cache): Remove variable.
(org-persist-read):
(org-persist-write): Do not use `org-persist--read-cache'. Using
`sx-hash-equal' as unique key indicating as-read data is not
reliable for deeply nested structures like `org-element--cache'. The
`sx-hash-equal' returns the same value regardless of the cache
contents. See Emacs Bug#56255.
Avoid treating number as an enum in the org manual
1f6750b53a872a5747dff92b8f61cfede0c5a6a6
Stefan Kangas
Fri Jun 24 19:18:50 2022 +0200
[km] This same change was sent to the Org list and applied to main in
db3870bfc.
Emacs now advises using "website" (instead of "homepage") and
consequently to use the "URL" comment header instead of "Homepage".
* README:
* README_ELPA:
* doc/org-guide.org (Creating Footnotes):
* doc/org-manual.org (Creating Footnotes):
* etc/styles/README (URL): Prefer "website" to "homepage".
* lisp/*.el:
* mk/org-fixup.el: Replace the "Homepage" header comment with "URL".
* lisp/org-element.el (org-element--cache-setup-change-functions): New
function setting up `org-element--cache-before-change' and
`org-element--cache-after-change'.
(org-element-cache-reset): Setup before/after-change-functions inside
indirect buffers.
* lisp/org-cycle.el (org-cycle-hide-drawer-startup):
* lisp/org-cycle.el (org-cycle-set-startup-visibility): Add new
customization to control initial folding state of the drawers.
* lisp/org.el (org-startup-options): Provide #+STARTUP option for the
new setting.
Fixes https://list.orgmode.org/m235gww8wg.fsf@ntnu.no/T/#u