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.
* 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
* (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}'
* 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/
* 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
* 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'.
* 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
* 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
* 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
* 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.
* 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
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.)
* 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
* 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
* 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
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
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
* 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
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
* lisp/ob-tangle.el (org-babel-tangle-single-block): Strip noweb tags
from block if :noweb has been set to "strip-tangle".
* lisp/ob-core.el (org-babel-common-header-args-w-values): Add
"strip-tangle" as new allowed value.
* lisp/ob-core.el (org-babel-noweb-p): Add "strip-tangle" at the
appropriate positions.
* testing/lisp/test-ob-tangle.el (ob-tangle/strip-tangle): Add new test
case for "strip-tangle".
* doc/org-manual.org (Noweb Reference Syntax): Adjust documentation for
the noweb header argument.
* etc/ORG-NEWS: Add entry for new header argument value.
This patch adds the "strip-tangle" option for the :noweb header
argument. This strips the noweb tags before tangling the block. This can
be useful for e.g. testing purposes where one wants to use a block as
test case that can be both run inline as well as tangled into a file for
automated testing.
TINYCHANGE
* lisp/org-macs.el (org-string-width): Do not err when current window
is dedicated. Force-remove dedicated status temporarily during the
call. This should be safe as we only need to take over the window
temporarily to hook into Emacs display and calculate the string
width.
Reported-by: Bruno BARBIER <brubar.cs@gmail.com>
Link: https://orgmode.org/list/63662793.5d0a0220.62647.3003@mx.google.com
* lisp/org-attach.el (org-attach-attach): Store link to the original
file location when `org-attach-store-link-p' is set to t, as promised
by the variable docstring.
* lisp/ob-eval.el (org-babel-eval-error-notify): Do not insert
superfluous whitespace.
* lisp/ob-eval.el (org-babel-eval): Show standard error even if the
command exits with a zero code.
* testing/lisp/test-ob-shell.el(
ob-shell/standard-output-after-success,
ob-shell/standard-output-after-failure,
ob-shell/error-output-after-success,
ob-shell/error-output-after-failure,
ob-shell/error-output-after-failure-multiple,
ob-shell/exit-code,
ob-shell/exit-code-multiple
): Add tests to avoid regressions.
* lisp/ob-latex.el (org-babel-latex-pdf-svg-process): Use descriptive
arguments, such as '--export-area-drawing' instead of '-D', to
optimize for readability and not brevity (which makes sense for
interactive use, which does not apply here).
* lisp/ob-latex.el (org-babel-latex-pdf-svg-process): Add the argument
-D (--export-area-drawing) to avoid sub-point cuts on hi-DPI screens,
where Inkscape sometimes cuts off a single physical pixel from the
exported drawing.
* lisp/ox-odt.el (org-odt-link): Append an extra "../" to relative
links. This is needed to conform with OpenOffice convention to treat
base path inside the odt archive. The path containing the odt file is
thus "../".
Reported-by: Ihor Radchenko <yantar92@posteo.net>
Link: https://orgmode.org/list/87ilkc30wd.fsf@localhost
* lisp/org-clock.el (org-clock-update-time-maybe): Update the
containing timestamps inside the clock, not only the clock sum.
Reported-by: Bruce E. Robertson <brucer42@gmail.com>
Link: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=53393
* lisp/ob-core.el (org-babel-execute-src-block): Handle no block at
point. Do not err when block info does not have position data.
Reported-by: Alan Schmitt <alan.schmitt@polytechnique.org>
Link: https://orgmode.org/list/87r0yol8kp.fsf@m4x.org
* etc/ORG-NEWS (Miscellaneous): Document the change.
* lisp/ob-sql.el (org-babel-find-db-connection-param): Make it
possible to overwrite parameters that are set from :dbconnection.
* lisp/org.el (org-kill-is-subtree-p): Allow `current-kill' to return
clipboard (even when `kill-ring' is empty). Do not throw error when
clipboard is also empty.
* lisp/org.el (org-paste-subtree): Do not check `kill-ring' before
calling `current-kill' since the latter can pull content of clipboard.
First call of `org-paste-subtree' failed if nothing had been yanked
before since Emacs start but system clipboard had text with valid
subtree originating from other application. The bug was where since
the commit adding `org-paste-subtree'.
If both `kill-ring' and system clipboard are empty then `current-kill'
generates meaningful error.
* lisp/ox-latex.el (org-latex-src-block--listings): Do not use global
\lstset to set options. Prefer optional argument to lstlisting
environment instead.
Reported-by: Denis Bitouzé <denis.bitouze@univ-littoral.fr>
Link: https://orgmode.org/list/87pmepvb7u.fsf@example.com