Commit graph

18152 commits

Author SHA1 Message Date
Bastien b3da427ebb Update version numbers for the 9.6 release 2022-11-29 07:34:50 +01:00
Ihor Radchenko 9276219103
org-export--get-subtree-options: Do not jump to parent subtree
* lisp/ox.el: Never jump to parent heading even when point is at an
existing heading.
* testing/lisp/test-ox.el (test-org-export/get-subtree-options): Fix
test assuming that current subtree may include parent.

Reported-by: Kaushal Modi <kaushal.modi@gmail.com>
Link: https://orgmode.org/list/CAFyQvY3mxi4DRTS+W-AX7bFELVujqH4DODEYPy3hyGRRuMEPSw@mail.gmail.com
2022-11-27 16:48:44 +08:00
Ihor Radchenko eed4708b66
org-babel: Add new :results discard header argument
* lisp/ob-core.el (org-babel-result-cond): Unconditionally return nil
and suppress all the processing for :results discard.
(org-babel-common-header-args-w-values):
(org-babel-sha1-hash): Add the new value to know :results value list.
* doc/org-manual.org (Handling):
* etc/ORG-NEWS (New =:results discard= header argument): Document the
new value.

Reported-by: Daniel Ortmann <daniel.ortmann@oracle.com>
Link: https://orgmode.org/list/87tu2tjary.fsf@localhost
2022-11-27 08:32:51 +08:00
Ihor Radchenko b4e437f968
ob-core: Resolve named list references to simple lists
* lisp/ob-core.el (org-babel-read-list): Return a simple list instead
of list of lists.  Document this in the docstring.
* testing/lisp/test-ob-java.el (ob-java/read-return-list):
(ob-java/read-list-return-array):
(ob-java/read-return-list-with-package): Fix tests assuming previous
behavior.
* testing/lisp/test-ob.el (test-ob/simple-variable-resolution): Add
new tests.
* etc/ORG-NEWS (List references in source block variable assignments
are now proper lists): Document the change.

This commit fixes the broken promise in the manual section 16.4
Environment of a Code Block where the named references to lists should
be converted to simple lists consisting of the top-level items.

The inconsistency existed for a while and possibly lurked into some
third-party packages.  So, announcement in NEWS is required.

Reported-by: Alain.Cochard@unistra.fr
Link: https://orgmode.org/list/87pmdqfao4.fsf@localhost
2022-11-26 09:51:36 +08:00
Ihor Radchenko c72d5ee840
org-table-convert-refs-to-rc: Fix failing test
* lisp/org-table.el (org-table-convert-refs-to-an): Leave $0
references (current row) unchanged during conversion.
*
testing/lisp/test-org-table.el (test-org-table/org-table-convert-refs-to-an/2):
Re-enable the failing test.
2022-11-25 14:45:09 +08:00
Rudolf Adamkovič 5337a49f32
org.el: Use long option names when launching dvisvgm
* lisp/org.el (org-preview-latex-process-alist): Use long option names
when launching dvisvgm, optimizing for maintainability, instead of
brevity.  For example, use `--no-fonts' instead of `-n'.
2022-11-25 10:07:00 +08:00
Rudolf Adamkovič 52ebf6b45e
org.el: Compute bounds exactly when converting LaTeX output to SVG
* lisp/org.el (org-preview-latex-process-alist): Call `dvisvgm' with
`-e' (`--exact-bbox') instead of `-b min' (`--bbox=min') to measure
the exact bounds around visual glyphs, as opposed to using font
metrics, to avoid clipping at the edges.

Link: https://orgmode.org/list/m2v8n4w00w.fsf@me.com
2022-11-25 10:06:44 +08:00
Ihor Radchenko 670f68bea2
lisp/org-agenda.el: Obsolete unused org-let' and org-let2'
* lisp/org-agenda.el (org-let):
(org-let2):
* lisp/org-compat.el (org-let):
(org-let2): Move to org-compat and mark for removal.

P.S. Save the kittens!
2022-11-25 09:42:17 +08:00
Ihor Radchenko d4522dd4df
lisp/org.el: Fix toggling overlays in region
* lisp/org.el (org--inline-image-overlays): New function returning
overlays in region.
(org-toggle-inline-images): Respect BEG and END arguments when
determining presence of overlays.
(org-remove-inline-images): Clear up deleted overlays.

Reported-by: William Denton <wtd@pobox.com>
Link: https://orgmode.org/list/alpine.DEB.2.22.394.2211221559080.61289@shell3.miskatonic.org
2022-11-24 10:11:15 +08:00
Ihor Radchenko 1cdac8ef6a
* lisp/ob-eval.el (org-babel--get-shell-file-name): Update fixme 2022-11-24 09:49:09 +08:00
Kyle Meyer c75aec4e6c Merge branch 'km/from-emacs-master' 2022-11-23 15:13:24 -05:00
Stefan Kangas 529c2a3df1 Backport commit beaa2e495 from Emacs
; Fix typos (misspelled symbols)
beaa2e49530b8149d2c22cb5fa15b8d48f7937b6
Stefan Kangas
Mon Nov 21 15:20:11 2022 +0100
2022-11-23 15:09:24 -05:00
Rudolf Adamkovič 7f4d91040a
ox-html: Use accurate MathJax versions
* etc/ORG-NEWS (HTML export uses MathJax 3+ instead of MathJax 2):
* lisp/ox-html.el (org-html-mathjax-options): Mention Mathjax 4+
version support where applicable.

Reported-by: Rudolf Adamkovič <salutis@me.com>
Link: https://orgmode.org/list/m28rk2k8so.fsf@me.com
2022-11-23 19:08:27 +08:00
Ihor Radchenko 89af7b11a4
org-sbe: Fix when the macro is expanded outside Org file
* lisp/ob-table.el (org-sbe): Do not try to execute code block during
macro expansion.
* testing/lisp/test-ob-table.el (test-ob-table/sbe): Uncomment the
test.  Update the expected return value.
2022-11-23 17:26:55 +08:00
Ihor Radchenko 07eced3639
org-make-parameter-alist: Change the argument name
* lisp/org-macs.el (org-make-parameter-alist): Change the argument
name to conventional PLIST, as the FIXME suggests.
2022-11-22 11:09:53 +08:00
Ihor Radchenko f995425d06
org-table-convert-region: Update docstring
* lisp/org-table.el (org-table-convert-region): Mention when an error
can be thrown in the docstring.
2022-11-22 10:11:33 +08:00
Stefan Kangas f78dfea63d
Remove 'org-speed-commands-user' warning
* lisp/org-keys.el (org-speed-command-help): Remove
'org-speed-commands-user' warning.
2022-11-21 19:42:43 +08:00
Kyle Meyer aed55381bd Merge branch 'km/from-emacs-master' 2022-11-20 22:30:47 -05:00
Stefan Kangas 2e0fcc14e2 Backport commit ba485eb94 from Emacs
; Fix typos
ba485eb949ddec53b1d7b5d78f3fcfbe2be60d7d
Stefan Kangas
Fri Nov 18 16:02:19 2022 +0100
2022-11-20 22:26:22 -05:00
Juanma Barranquero c53d752e61 Backport commit 623db40dd from Emacs
* lisp/ol.el (org-link-search-must-match-exact-headline):
* lisp/org-faces.el (org-column): Fix typos in docstrings.

; * lisp/*.el: Fix typos in docstrings
623db40dd1cd21623c5cecdc0abbf3ce885f92b1
Juanma Barranquero
Thu Nov 17 08:48:02 2022 +0100
2022-11-20 22:20:12 -05:00
Rudolf Adamkovič 62e1513b5a
ox-html: Update from MathJax 2 to MathJax 3+
* lisp/ox-html.el (
org-html-mathjax-options,
org-html-mathjax-template,
org-html--build-mathjax-config
): Update from MathJax 2 to 3 while maintaining compatibility.  All
legacy options should continue to work, except for the 'path' option
which must now point to MathJax 3 or later.
* testing/lisp/test-ox-html.el (
ox-html/mathjax-path-none,
ox-html/mathjax-path-default,
ox-html/mathjax-path-custom,
ox-html/mathjax-path-in-buffer,
ox-html/mathjax-options-default,
ox-html/mathjax-options-custom,
ox-html/mathjax-options-in-buffer,
ox-html/mathjax-legacy-scale-default,
ox-html/mathjax-legacy-scale-custom,
ox-html/mathjax-legacy-scale-in-buffer,
ox-html/mathjax-legacy-scale-message,
ox-html/mathjax-legacy-scale-message-in-buffer,
ox-html/mathjax-legacy-scale-ignore,
ox-html/mathjax-legacy-autonumber-ams,
ox-html/mathjax-legacy-autonumber-ams-in-buffer,
ox-html/mathjax-legacy-autonumber-none,
ox-html/mathjax-legacy-autonumber-none-in-buffer,
ox-html/mathjax-legacy-autonumber-all,
ox-html/mathjax-legacy-autonumber-all-in-buffer,
ox-html/mathjax-legacy-autonumber-message,
ox-html/mathjax-legacy-autonumber-message-in-buffer,
ox-html/mathjax-legacy-font-tex,
ox-html/mathjax-legacy-font-tex-in-buffer,
ox-html/mathjax-legacy-font-stix-web,
ox-html/mathjax-legacy-font-stix-web-in-buffer,
ox-html/mathjax-legacy-font-asana-math,
ox-html/mathjax-legacy-font-asana-math-in-buffer,
ox-html/mathjax-legacy-font-neo-euler,
ox-html/mathjax-legacy-font-neo-euler-in-buffer,
ox-html/mathjax-legacy-font-gyre-pagella,
ox-html/mathjax-legacy-font-gyre-pagella-in-buffer,
ox-html/mathjax-legacy-font-gyre-termes,
ox-html/mathjax-legacy-font-gyre-termes-in-buffer,
ox-html/mathjax-legacy-font-latin-modern,
ox-html/mathjax-legacy-font-latin-modern-in-buffer,
ox-html/mathjax-legacy-line-breaks-true,
ox-html/mathjax-legacy-line-breaks-true-in-buffer,
ox-html/mathjax-legacy-line-breaks-false,
ox-html/mathjax-legacy-line-breaks-false-in-buffer,
ox-html/mathjax-legacy-line-breaks-message,
ox-html/mathjax-legacy-line-breaks-message-in-buffer): Test MathJax in
general and also the conversion of legacy options from MathJax 2 to 3.
* testing/org-test.el (org-test-capture-messages): Add a new macro
useful for testing the messages put in the echo area.
* etc/ORG-NEWS: Document MathJax 2 to 3 upgrade, highlighting the
benefits of the new version but also mentioning the fact that the user
may need to update the `path' option in `org-html-mathjax-options'.
* doc/org-manual.org (Math formatting in HTML export): Update the link
to the MathJax CDN and the example of how to use `+HTML_MATHJAX' with
MathJax 3.  Also, remove the note on MathJax extensions, as they did
not work (and do not work) as documented.

Link: https://list.orgmode.org/orgmode/m2a667n4ax.fsf@me.com/
2022-11-21 10:44:56 +08:00
Ihor Radchenko 1d985406d8
Revert "ob-core: Do not limit table size in babel output"
This reverts commit 5347f4c75a.

`org-table-convert-region-max-lines' has been introduced explicitly
for the problem of babel output.  Therefore the commit was against the
established logic.  A different approach needs to be used to tackle
the reported problem.
2022-11-20 13:19:43 +08:00
Ihor Radchenko 5347f4c75a
ob-core: Do not limit table size in babel output
* lisp/ob-core.el (org-babel-import-elisp-from-file): Do not limit the
maximum possible resulting table to
`org-table-convert-region-max-lines'.

Reported-by: Daniel Ortmann <daniel.ortmann@oracle.com>
Link: https://orgmode.org/list/b7021ff3-60d7-863a-5579-dff60f7e1337@oracle.com
2022-11-20 13:15:44 +08:00
Ihor Radchenko 4c40fc3d4d
org: Allow spaces in #+LINK abbreviation definitions
* lisp/org.el (org-set-regexps-and-options): Allow spaces when
defining link abbreviations via #+LINK keyword.
* testing/lisp/test-org-element.el (test-org-element/link-parser): Add
a new test.
* doc/org-manual.org (Link Abbreviations): Add example demonstrating
link abbreviation with spaces.

Reported-by: Rudolf Adamkovič <salutis@me.com>
Link: https://orgmode.org/list/87zgf7zujc.fsf@localhost
2022-11-20 13:15:02 +08:00
Juan Manuel Macias fcf63fb31e
lisp/ox-latex.el: fix `org-latex-guess-babel-language'
* (org-latex-guess-babel-language): If the user puts a string other
than AUTO as an argument to `\babelprovide', it gives an error when
exporting. For example:

`#+LaTeX_Header: \babelprovide[onchar=ids,import]{hebrew}'
2022-11-18 16:28:24 +08:00
Ihor Radchenko 70cee1810b
lisp/ox.el: Fix compiler warning
* lisp/ox.el (org-export--parse-option-keyword): Remove unused
variable.
2022-11-17 13:43:19 +08:00
Ihor Radchenko ad62379984
org-export: Allow "string with spaces" as #+OPTIONS: values
* lisp/ox.el (org-export--parse-option-keyword): Allow `read'ing the
option value as far as needed.  Do not restrict the value to the first
whitespace only.  This way, one can use Elisp strings with all the
escaping options as values.
* testing/lisp/test-ox.el (test-org-export/parse-option-keyword): Add
test for option value with a space inside.

Reported-by: Pierre Balayé <pierrebalaye@gmail.com>
Link: https://list.orgmode.org/orgmode/CANpQAF-n+4xhNvL8aaP8j2gJ70vbu80wmh9a4Oj0BxNHA5-yDA@mail.gmail.com/
2022-11-17 12:49:29 +08:00
Ihor Radchenko 5c247fb27b
org-html-postamble: Clarify that string value is format string
* lisp/ox-html.el (org-html-postamble): Clarify that string value of
the variable is not inserted verbatim, but used as format string.

Reported-by: Tim Cross <theophilusx@gmail.com>
Link: https://orgmode.org/list/86wn8gbvk0.fsf@gmail.com
2022-11-16 12:47:59 +08:00
Ihor Radchenko 84b4878680
ox-html: Do not allow `org-html-preamble' to be 'auto
* lisp/ox-html.el (org-html--build-pre/postamble): Avoid building
date/author/email info line when `org-html-preamble' is set to
'auto.  This is only meaningful in `org-html-postamble'.
2022-11-16 12:47:58 +08:00
Ihor Radchenko d094135388
ob-octave: Fix octave :results value parsing
* lisp/ob-octave.el (org-babel-octave-wrapper-method): Use fdisp
instead of fprintf.

Reported-by: Alexandre Duret-Lutz <adl@lrde.epita.fr>
Link: https://orgmode.org/list/217078597.347872.1639979694777@email.ionos.de
2022-11-16 12:42:58 +08:00
Kyrylo Simonov 00778ce2a6
Fix missing customization groups
* lisp/ob-tangle.el (org-babel-tangle): Add missing group definition.
(org-babel-post-tangle-hook):
(org-babel-pre-tangle-hook):
(org-babel-tangle-body-hook):
(org-babel-tangle-finished-hook):
(org-babel-tangle-comment-format-beg):
(org-babel-tangle-comment-format-end):
(org-babel-tangle-uncomment-comments):
(org-babel-process-comment-text):
(org-babel-tangle-default-file-mode): Move under `org-babel-tangle'
group.
* lisp/ol-bbdb.el (org-bbdb-anniversaries): Move under `org-agenda'
instead of a non-existent `org-bbdb'.
* lisp/ol-bibtex.el (org-bibtex): Add missing group definition.
* lisp/ol-gnus.el (org-gnus-no-server): Move under group
`org-link-follow' instead of a non-existent `org-gnus'.
* lisp/org-plot.el (org-plot): Add missing group definition.
* lisp/org.el (org-startup): Add missing group definition.
* lisp/ox-latex.el (org-latex-pdf-process): Move under
`org-export-latex' instead of a non-existent `org-export-pdf'.
* lisp/ox-man.el (org-man-pdf-process): Remove reference to
non-existent group `org-export-pdf'.

TINYCHANGE
2022-11-16 09:59:44 +08:00
Max Nikulin 08a8c9e678
org-attach.el: ID to path functions may return nil
* lisp/org-attach.el (org-attach-dir-from-id): Ignore nil values
returned by entries from `org-attach-id-to-path-function-list'.
(org-attach-dir-get-create): Signal an error suggesting customization
of `org-attach-id-to-path-function-list' if all ID-to-path functions
return nil.
(org-attach-id-to-path-function-list): Add to the docstring examples
how to handle unusual IDs.
(org-attach-id-uuid-folder-format, org-attach-id-ts-folder-format):
Return nil if ID is too short.
(org-attach-id-fallback-folder-format): New function that may be added
as the last element of `org-attach-id-path-function-list' to handle
unexpectedly short IDs.
* etc/ORG-NEWS: Advertise the change.

Earlier an obscure error like 'org-attach-id-ts-folder-format: Args out
of range: "ftt", 0, 6' was signalled in the case of unexpectedly short
ID.

Reported-by: Janek F <xerusx@pm.me>
Link: https://list.orgmode.org/KC8PcypJapBpJQtJxM0kX5N7Z0THL2Lq6EQjBMzpw1-vgQf72egZ2JOIlTbPYiqAVD4MdSBhrhBZr2Ykf5DN1mocm1ANvvuKKZShlkgzKYM=@pm.me
2022-11-16 09:47:03 +08:00
Ihor Radchenko 21413d3589
org-clock-report: Improve docstring
* lisp/org-clock.el (org-clock-report): Clarify :scope when called
from inside a heading or before first heading.  Separate :scope
description into a separate paragraph.

Reported-by: Uwe Brauer <oub@mat.ucm.es>
Link: https://orgmode.org/list/87h6z2c8pf.fsf@mat.ucm.es
2022-11-16 09:26:03 +08:00
Ihor Radchenko de2d2d928f
ob-python: Wait for session initialization on slow machines
* lisp/ob-python.el (org-babel-python--initialized): New internal flag
used to indicate that python session has been initialized in buffer.
(org-babel-python-initiate-session-by-key): Set
`org-babel-python--initialized' in `python-shell-first-prompt-hook'
when using built-in python.el.  Wait until the hook is fired before we
finish initiating the session.

This patch intends to fix CI test failures where the CPU allocation is
limited and python loading is extremely slow.
2022-11-15 11:39:04 +08:00
Ihor Radchenko 4f88116e52
org-fold-subtree: Hide blank lines at the end as well
* lisp/org-fold.el (org-fold-subtree): Hide blank lines before the
next subtree as well.  Add docstring.

Reported-by: Alexandros Prekates <aprekates@posteo.net>
Link: https://orgmode.org/list/20221114020008.03f40695@enous
2022-11-14 12:22:03 +08:00
Kyle Meyer 77d35c4eec Silence byte-compiler under 'make single'
The org-list and org-priority warnings would show up when these
changes made their way to the Emacs repo.  (The ob-eval warning
wouldn't because string-empty-p has been moved to simple.el in Emacs's
master branch.)
2022-11-13 18:01:00 -05:00
Kyle Meyer e4ed6c92b4 Merge branch 'km/from-emacs-master' 2022-11-13 17:37:11 -05:00
Stefan Kangas 801ca4c6d0 Backport commit 0f5352377 from Emacs
* lisp/org-ctags.el:
* lisp/org-protocol.el: Remove redundant installation instructions
for packages bundled with Emacs.

Remove redundant library installation instructions
0f5352377539bc2587b9bfd068de0f4b3bf8b248
Stefan Kangas
Fri Nov 11 04:29:29 2022 +0100
2022-11-13 17:32:10 -05:00
Ihor Radchenko 5a10517d02
Add missing :package-version tags in changed `defcustom'
* lisp/ob-clojure.el (ob-clojure-babashka-command):
(ob-clojure-nbb-command):
* lisp/ob-exp.el (org-babel-exp-code-template):
* lisp/ob-latex.el (org-babel-latex-pdf-svg-process):
* lisp/org-agenda.el (org-agenda-show-outline-path):
* lisp/org-capture.el (org-capture-templates):
* lisp/org-clock.el (org-clocktable-defaults):
* lisp/org-persist.el (org-persist-directory):
(org-persist-remote-files):
(org-persist-default-expiry):
* lisp/org-refile.el (org-refile-use-outline-path):
* lisp/org-src.el (org-src-lang-modes):
* lisp/org.el (org-resource-download-policy):
(org-safe-remote-resources):
(org-time-stamp-custom-formats):
(org-property-separators):
(org-preview-latex-process-alist):
(org-structure-template-alist):
* lisp/ox-latex.el (org-latex-inline-image-rules):
(org-latex-src-block-backend):
(org-latex-engraved-options):
(org-latex-engraved-theme):
* lisp/ox-md.el (org-md-toplevel-hlevel):
* lisp/ox-texinfo.el (org-texinfo-with-latex): Add :package-version
keywords to the new custom options, and those with the value or
meaning changed.
2022-11-13 15:29:15 +08:00
Ihor Radchenko f83e45526b
org-toggle-item: Move footnote-definitions out of the lists
* lisp/org-list.el (org-toggle-item): When headings contain
footnote-definitions, move them out of the list.  Footnote-definitions
must not be indented and hence cannot belong to the list.  Ensure that
definitions do not slurp the following element after the list.
Consider when the list created by `org-toggle-item' is continued by an
existing list.
* testing/lisp/test-org-list.el (test-org-list/toggle-item): Add
tests.

Reported-by: Ypo <ypuntot@gmail.com>
Link: https://orgmode.org/list/877d3k70lu.fsf@localhost
2022-11-11 13:19:01 +08:00
Ihor Radchenko 4517fba441
org-html-htmlize-output-type: Mark safe as buffer-local
* lisp/ox-html.el (org-html-htmlize-output-type): This variable is
safe to set buffer-locally as a symbol.

Reported-by: Rudolf Adamkovič <salutis@me.com>
Link: https://orgmode.org/list/m28ruxklo5.fsf@me.com
2022-11-11 11:31:58 +08:00
Ihor Radchenko 10e857d428
org-babel-read: Obey `org-confirm-babel-evaluate'
* lisp/ob-core.el (org-babel-read): Do not execute arbitrary Elisp
without prompt, according to `org-confirm-babel-evaluate'.

Reported-by: Max Nikulin <manikulin@gmail.com>
Link: https://orgmode.org/list/tjct9e$179u$1@ciao.gmane.io
2022-11-10 13:52:56 +08:00
Ihor Radchenko 51bb222260
ob-tangle: Update docstrings
* lisp/ob-tangle.el (org-babel-tangle-file):
* lisp/ob-tangle.el (org-babel-tangle): Clarify return values.
2022-11-10 13:36:01 +08:00
Ilya Chernyshov 6c285af9fb
ox-icalendar: Create export backend options for deadline/scheduled-summary-prefix defcustoms
ox-icalendar.el (org-export-define-derived-backend):

Add export backend options:
:deadline-summary-prefix
:scheduled-summary-prefix

ox-icalendar.el (org-icalendar-entry):

Use :deadline-summary-prefix export backend option instead of
`org-icalendar-deadline-summary-prefix'.  If the option is not
explicitly set, use the value of the custom variable.

Use :scheduled-summary-prefix export backend option instead of
`org-icalendar-scheduled-summary-prefix'.  If the option is not
explicitly set, use the value of the custom variable.

Convert `deadline/scheduled-summary-prefix' string to iCal-compatible
format via `(org-icalendar-cleanup-string)'

TINYCHANGE
2022-11-10 10:38:06 +08:00
Bruno BARBIER 620a96dd68
org-babel-insert-result: Avoid errors in `unwind-protect' unwindforms
lisp/ob-core.el (org-babel-insert-result): Don't reset the marker
`end' if it is not defined.  Such scenario happens when
`unwind-protect' BODY forms throw an error.

Reported-by: Bruno Barbier <perso.bruno.barbier@free.fr>
Link: https://orgmode.org/list/E1osecc-00046e-UI@lists.gnu.org
2022-11-09 14:40:37 +08:00
Bruno BARBIER 7f72807aea
lisp/ob-haskell.el: Fix org-babel-script-escape expects a string
* lisp/ob-haskell.el (org-babel-interpret-haskell): Don't call
`org-babel-script-escape' when the result is nil.
2022-11-09 10:34:03 +08:00
Ihor Radchenko 8a827437a5
org--at-headline-data-p: Fix when at :post-blank after heading
* lisp/org.el (org--at-headline-data-p): Fix infinite loop when within
blank lines after empty heading.

Reported-by: David Lukeš <dafydd.lukes@gmail.com>
Link: https://orgmode.org/list/CAEPTPEw9hugOWmzhNWCzCeXzV_qNePAdz4BbOp_sanTH9ZJ+AA@mail.gmail.com
2022-11-08 21:18:42 +08:00
Bruno BARBIER 0de063a521
org-babel-interpret-haskell: Don't remove outputs that match inputs
* lisp/ob-haskell.el (org-babel-interpret-haskell): Change the call to
`org-babel-comint-with-output'.
2022-11-07 15:23:05 +08:00
Ihor Radchenko e3a7c01874
Refactor org-time-stamp-custom-formats' and org-time-stamp-formats'
* lisp/org.el (org-time-stamp-formats):
* lisp/org.el (org-time-stamp-custom-formats): Change the default
values stripping leading "<" and trailing ">".  Update the docstring
explaining the format and that leading and trailing brackets are now
ignored.  Update the :type specification to more precise.
(org-time-stamp-format): Update the argument list and docstring
allowing to use the function more flexibly to find the time stamp
format for both `org-time-stamp-formats' and
`org-time-stamp-custom-formats'.  Rename `long' argument to more
accurate `with-time'.  Ignore brackets in the `org-time-stamp-formats'
and `org-time-stamp-custom-formats'.  Allow `inactive' argument to be
`no-brackets'
(org-format-timestamp):
(org-read-date-display):
(org-insert-time-stamp):
(org-display-custom-time):
(org-timestamp-translate):
* lisp/org-compat.el (org-timestamp-format): Rename
`org-timestamp-format' to `org-format-timestamp'.  The old variant is
too similar with other `org-time-stamp-format' function.  Also, use
`org-time-stamp-format' to determine the timestamp format instead of
using `org-time-stamp-formats' directly.
* lisp/ol.el (org-store-link):
* lisp/org-agenda.el (org-agenda-get-timestamps):
(org-agenda-get-progress):
* lisp/org-archive.el (org-archive-subtree):
(org-archive-to-archive-sibling):
* lisp/org-clock.el (org-clock-special-range):
* lisp/org-colview.el (org-colview-construct-allowed-dates):
* lisp/org-element.el (org-element-timestamp-interpreter):
* lisp/org-macro.el (org-macro--find-date):
* lisp/org-pcomplete.el (pcomplete/org-mode/file-option/date):
* lisp/ox-odt.el (org-odt--format-timestamp):
(org-odt-template):
* lisp/ox.el (org-export-get-date):
* testing/lisp/test-org.el (test-org/timestamp-format): Use
`org-time-stamp-format' instead of directly examining
`org-time-stamp-custom-formats' and `org-time-stamp-formats'.  Use the
new function name `org-format-timestamp'.
* etc/ORG-NEWS (Default values and interpretations of ~org-time-stamp-formats~ and ~org-time-stamp-custom-formats~ are changed):
(~org-timestamp-format~ is renamed to ~org-format-timestamp~):
(Updated argument list in ~org-time-stamp-format~): Document the
user-facing changes.

This commit documents and unifies previously undocumented assumptions
about the values of `org-time-stamp-formats' and
`org-time-stamp-custom-formats'.  Instead of fiddling with
leading/trailing brackets in the values, expedite the time format
calculation to `org-time-stamp-format'.  The undocumented assumption
about brackets in user option `org-time-stamp-custom-formats' is not
relaxed making the docstring correct.

Reported-by: Uwe Brauer <oub@mat.ucm.es>
Link: https://orgmode.org/list/87k04ppp1t.fsf@localhost
2022-11-07 15:05:37 +08:00
Adam Porter 155dc778e8
* lisp/org.el: (org-get-indirect-buffer) Allow indirect base buffers
Previously, calling this function on an indirect buffer would fail,
preventing the user from making a new indirect buffer based on an
indirect buffer (e.g. imagine the user makes an indirect buffer for a
large subtree, then wants to make another one for a subtree of that).
Now, the base buffer of the buffer is used, when applicable.

Also, the function is partially rewritten to be clearer, and a
docstring is added.

Link: https://orgmode.org/list/8b2c1814-2c6f-fdca-8ba7-63c415bfca5e@alphapapa.net
2022-11-07 11:16:08 +08:00