* lisp/org-list.el (org-update-checkbox-count): Do not move point
before current heading when point is already on heading.
Reported-by: Bruno Cardoso <cardoso.bc@gmail.com>
Link: https://orgmode.org/list/878qz49an7.fsf@gmail.com
* lisp/org-compat.el (org-imenu-get-tree): Add the current headline to
the tree as a simple item even if it isn't a leaf.
With a file like this:
* headline 1
** headline 2
We currently produce an imenu tree that looks like this:
'(("headline 1" ("headline 2" . marker-2)))
imenu has no clue where "headline 1" is located and thus the user
can't navigate to it. With this patch installed imenu knows where
non-leaf headlines are as the tree will now look like this:
'(("headline 1" . marker-1)
("headline 1" ("headline 2" . marker-2)))
Quirks:
With the default `imenu-flatten' value of nil, it is still impossible
to visit non-leaf headlines and no change is perceived.
Setting `imenu-flatten' to 'group works as expected with the quirk
that top level headlines don't end up in the group.
Ex:
* Headline 1
Group is "*"
Setting the group to "Headline 1" somehow might be nice but would
require upstream changes in imenu.
** Headline 2
Group is "Headline 1"
*** Headline 3
Group is "Headline 1:Headline 2"
Everything seems to work as expected when `imenu-flatten' is set to
'prefix or 'annotation.
Link: https://orgmode.org/list/CH3PR84MB34241FF78D2A1D8653FE6056C5C22@CH3PR84MB3424.NAMPRD84.PROD.OUTLOOK.COM
(featurep 'org) is always non-nil here since we have a (require 'org)
further up. I suspect other `require's nearby could be removed or
moved to toplevel.
The CL library is deprecated and it's not needed here any more.
I suspect other `-l' could be removed here since `org-test' loads
those libraries anyway.
* lisp/org.el (org-funcall-in-calendar): Rename from `org-eval-in-calendar'.
Use `apply' rather than `eval'. Use `with-selected-window' rather than
cooking our own version of it. Update all callers.
(org-read-date): Use `with-current-buffer' to set `cursor-type' since
it's not affected by the selected window.
Move the `calendar-forward-day' call to `org-funcall-in-calendar' to
clarify the need to update `org-date-ovl'.
(org-eval-in-calendar): New backward compatibility function.
* lisp/org-keys.el (org-eval-in-calendar): Remove unused declaration.
* lisp/ob-lua.el (org-babel-execute:lua):
(org-babel-prep-session:lua):
(org-babel-load-session:lua):
(org-babel-lua-session-buffer):
(org-babel-lua-with-earmuffs):
(org-babel-session-buffer:lua):
(org-babel-lua-without-earmuffs):
(lua-default-interpreter):
(lua-which-bufname):
(lua-shell-buffer-name):
(org-babel-lua-initiate-session-by-key):
(org-babel-lua-initiate-session):
(org-babel-lua-evaluate):
(org-babel-lua-evaluate-external-process):
(org-babel-lua-evaluate-session):
(org-babel-lua-read-string): Remove all unfinished Lua and Emacs Lisp
code related to sessions and emit a user error when a Lua session is
requested.
* testing/lisp/test-ob-lua.el (test-ob-lua/no-sessions): Test the user
error emitted when requesting a Lua session.
Link: https://list.orgmode.org/87y192etb4.fsf@localhost/
`test-ob-lua/colnames-yes-header-argument-pp' fails intermittently due
to tabular results being returned from Lua to Emacs Lisp in different
order than expected. We fix the problem by sorting all tabular
results before returning them.
* lisp/ob-lua.el (org-babel-lua-wrapper-method): Sort all tabular
results, recursively, before returning them from Lua to Emacs Lisp.
* lisp/ob-lua.el (org-babel-lua-wrapper-method): Escape all double
quote characters in Lua before giving them to Org Babel.
* testing/lisp/test-ob-lua.el (test-ob-lua/escaping-quotes): Test
automatic escaping of double quote characters.
Reported-by: Max Nikulin <manikulin@gmail.com>
Link: https://list.orgmode.org/216278dc-075c-47d1-94dc-f5bde8346b3c@gmail.com/
* lisp/ol.el (org-link-make-regexps): Allow trailing ?- at the end of
the plain links.
* etc/ORG-NEWS (Trailing =-= is now allowed in plain links): Announce
the change.
Link: https://orgmode.org/list/87sexh9ddv.fsf@ice9.digital
* lisp/org-clock.el (org-clock-sum): Skip invalid CLOCK
lines (malformed or with times missing). Display a warning.
This brings back the old behavior with such CLOCK lines being silently
skipped. Now, we also display a warning.
Reported-by: Robert Nyman <RKNyman@NymanTechnology.com>
Link: https://list.orgmode.org/orgmode/0e2ed754-bc71-4558-9c46-f17d73981fe5@NymanTechnology.com/
* lisp/org.el (org--dnd-rmc): Add docstring. Fix the call to
`read-multiple-choice' when extended help ("?") is requested by the
user.
Reported-by: Johann Klähn <org-mode@web.jklaehn.de>
Link: https://orgmode.org/list/87ikyhg9qi.fsf@jklaehn.de
* lisp/org-num.el (org-num-skip-tags): Make sure that function used
for :safe `defcustom' slot does not require functions that are not
defined in org-loaddefs.el. This is because `org-num-skip-tags' is
autoloaded and cannot rely upon requires in org-num.el. Instead, it
may only use pre-loaded functions and other autoloaded Org mode
functions.
Reported-by: Eli Zaretskii <eliz@gnu.org>
Link: https://yhetil.org/emacs-devel/868qzd9hjg.fsf@gnu.org/
* lisp/org-capture.el (org-capture-templates): Remove "sexp" type from
allowed values of capture targets. S-exp support has been removed in
f5645675a3.
* lisp/org-attach.el (org-attach-dir-from-id): When current buffer
displays a symlinked file, search for existing attachments in the
original file dir.
* etc/ORG-NEWS (=org-attach= now considers symlinked files when
searching pre-existing attach dirs): Announce the change.
Reported-by: Karthik Chikmagalur <karthikchikmagalur@gmail.com>
Link: https://orgmode.org/list/87seyydnf7.fsf@localhost
* mk/org-fixup.el (org-make-manual):
(org-make-guide):
(org-make-manuals): Disable local ID db when building Org
documentation. This makes sure that local IDs on the build machine
can never influence the build process.
Reported-by: Eli Zaretskii <eliz@gnu.org>
Link: https://yhetil.org/emacs-devel/868qzd9hjg.fsf@gnu.org/
* lisp/org.el (org--dnd-attach-file): Make sure that target directory
is created before copying file when `org-yank-image-save-method' is
set to specific directory (not 'attach).
Reported-by: ISouthRain <isouthrain@qq.com>
Link: https://orgmode.org/list/tencent_AABB2DEBF7ABFBC795348C288E0EBFCFDD0A@qq.com
* lisp/ox.el (org-export--set-variables): Assume that variables are
listed as (var value) - as a list. Only use the second element of the
list as the value, following example in `org-export-get-environment'.
(org-export-get-environment): Use `org-export--set-variables'.
* testing/lisp/test-ox.el (test-org-export/bind-keyword): Add new
test.
Reported-by: Suhail Singh <suhailsingh247@gmail.com>
Link: https://orgmode.org/list/87cyonhuq3.fsf@gmail.com
* lisp/ob-sql.el (org-babel-sql-dbstring-mysql):
(org-babel-sql-dbstring-postgresql):
(org-babel-sql-dbstring-oracle):
(org-babel-sql-dbstring-mssql):
(org-babel-sql-dbstring-sqsh):
(org-babel-sql-dbstring-vertica):
(org-babel-sql-dbstring-saphana):
(org-babel-execute:sql): Quote all the shell arguments to avoid
unexpect shell expansion. Do not quote port as it is a number; make
sure that port is really demanded a number in the format strings.
Reported-by: Andrea <andrea-dev@hotmail.com>
Link: https://orgmode.org/list/DU2P193MB24225F623DBF8B3D254D3C0E88FA2@DU2P193MB2422.EURP193.PROD.OUTLOOK.COM
* lisp/ob-core.el (org-babel-execute-src-block): Make sure that point
remain on src block after evaluation. The function logic later
implicitly assumes that the point is on the block that has been
evaluated.
* lisp/org.el (org-image--align): Improve docstring. Do not try to
align when image is not inside a paragraph.
Reported-by: Lin Sun <sunlin7.mail@gmail.com>
Link: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=71484
* lisp/org-capture.el (org-capture-fill-template): Do not fix the
temporary *Capture* buffer name to be used for template expansion.
Instead, generate a throwaway buffer every time a new capture is
requested. This way, we can nest multiple captures even when a new
capture is requested while querying a %^{prompt}. Clear the buffer
upon completing/failing the template expansion.
(org-capture): Do not clear *Capture* buffer.
`org-capture-fill-template' not does it by itself.
Reported-by: Cletip Cletip <clement020302@gmail.com>
Link: https://orgmode.org/list/CAD6d+LUJ7St5_muvwqzE80EfHSoiMmZD+qDTAojeN0L7v+zsCQ@mail.gmail.com
* lisp/org.el (org--confirm-resource-safe): When asking about resource
safety in non-interactive mode throw an error rather than silently not
downloading the resource. The previous behavior may remote
#+include's seemingly being ignored.
* etc/ORG-NEWS (Org mode may throw an error when attempting to include
remote unsafe resource): Announce the change.
* lisp/ob-core.el (org-babel-execute-src-block): Fix indentation of
line.
Emacs's bd80717d8e7 (Re-enable TTY glyph production for batch mode
frames on Android, 2024-06-10) reverted all changes from 8d1d9798f77
(Fix bootstrap of org.texi, 2024-06-10) aside from an indentation fix.
Apply the indentation fix to avoid overwriting it on sync.
* lisp/org-agenda.el (org-agenda-get-blocks): Force
`org-agenda-default-appointment-duration' to be nil for time blocks -
they already have begin/end time, even if during different days.
* testing/examples/agenda-file2.org (five):
* testing/lisp/test-org-agenda.el (test-org-agenda/time-grid): New
test.
Reported-by: hrdl <git@hrdl.eu>
Link: https://orgmode.org/list/ZldNYYtvvQp0dILB@t490.localdomain