Commit graph

19318 commits

Author SHA1 Message Date
Ihor Radchenko 41726d408b
lisp/oc-basic.el (org-cite-basic--shorten-names): Fix typo
Use normalized NAMES-STRING to shorten names.

Reported-by: William Denton <wtd@pobox.com>
Link: https://orgmode.org/list/alpine.DEB.2.22.394.2312181114040.123851@shell3.miskatonic.org
2023-12-18 18:13:15 +01:00
Ihor Radchenko 1d72973efa
org-clock-history-push: Improve docstring. Raise error for illegal args
* lisp/org-clock.el (org-clock-history-push): Document all the
function arguments.  Throw an error when BUFFER is provided, but POS
is not.
2023-12-18 11:37:35 +01:00
Ihor Radchenko 5a5ec1b320
lisp/org-persist.el: Do not GC orphan files when another Emacs is running
* lisp/org-persist.el (org-persist-gc-lock-file): New constant naming
the lock file to store active sessions in.
(org-persist-gc-lock-interval): New variable defining session lock
refresh frequency.
(org-persist-gc-lock-expiry): New variable defining which sessions are
considered expired.
(org-persist--refresh-gc-lock): New function refreshing session
timestamp in `org-persist-gc-lock-file'.
(org-persist--gc-orphan-p): New function checking whether orphan files
should be garbage collected.
(org-persist-gc): Use `org-persist--gc-orphan-p'.
(org-persist--refresh-gc-lock-timer): New variable holding timer
refreshing GC lock file.  Run the timer every
`org-persist-gc-lock-interval'.

This patch prevents files created in the other running Emacs sessions
from being garbage-collected.
2023-12-18 11:32:54 +01:00
Ihor Radchenko 2df9642f1d
lisp/ob-maxima.el (org-babel-header-args:maxima): Fix value
The value should be a lists, as in
`org-babel-common-header-args-w-values'.

Reported-by: gerard.vermeulen@posteo.net
Link: https://orgmode.org/list/3e1e1479365794e2cb3b6d1979e6c98c@posteo.net
2023-12-17 21:03:25 +01:00
Ihor Radchenko 92fec81e2e
lisp/org.el (org-sort-entries): Fix sorting partially selected subtree
* lisp/org.el (org-sort-entries): Make sure that we extend sorted
region to the full subtree if it spans beyond end of region.
* testing/lisp/test-org.el (test-org/sort-entries): Add test.
2023-12-17 14:58:44 +01:00
Ihor Radchenko 67ce9386ad
lisp/org.el (org-sort-entries): Fix when end of region is not a bol
* lisp/org.el (org-sort-entries): Avoid putting a heading not at bol
when end of selected region is not at bol.

Reported-by: Zelphir Kaltstahl <zelphirkaltstahl@posteo.de>
Link: https://orgmode.org/list/8d637a8a-6cbc-4158-bded-f9182716a1fc@posteo.de
2023-12-17 14:57:11 +01:00
Ihor Radchenko bf1d45f9ba
org-lint: Remove checker for #+name with colon
* lisp/org-lint.el (org-lint-colon-in-name):
(colon-in-name): Remove the checker.  It is no longer a problem after
b5cfc311d that allows referring to named elements with name containing
colon.
* testing/lisp/test-org-lint.el (test-org-lint/colon-in-name): Remove
test.
2023-12-17 14:57:03 +01:00
Ihor Radchenko de9f1169d2
lisp/org-element.el (org-src-preserve-indentation-p): Fix declare form 2023-12-16 18:42:23 +01:00
Ihor Radchenko d2ce1c6ec1
lisp/ox-texinfo.el: Fix @menu in headlines without contents
* lisp/ox-texinfo.el (org-texinfo--normalize-headlines): Do not rely
upon undocumented implementation side-effects in `org-element-create'
that have been changed.

*
testing/lisp/test-ox-texinfo.el (test-ox-texinfo/normalize-headlines):
New test.

Reported-by: Jonas Bernoulli <jonas@bernoul.li>
Link: https://orgmode.org/list/87zfybnqwf.fsf@bernoul.li
2023-12-16 15:10:29 +01:00
Ihor Radchenko 8fd21d04ce
lisp/ob-sqlite.el (org-babel-sqlite-table-or-scalar): Improve docstring 2023-12-16 12:47:54 +01:00
Ihor Radchenko 31caf84bb7
lisp/oc-basic.el (org-cite-basic--shorten-names): Fix NAMES being raw pseudo-object
NAMES-STRING should be a string, while `org-element-contents' returns
a list.

Reported-by: William Denton <wtd@pobox.com>
Link: https://orgmode.org/list/alpine.DEB.2.22.394.2312150948490.84946@shell3.miskatonic.org
2023-12-15 16:06:43 +01:00
Ihor Radchenko 15cf8c3fcd
Merge branch 'bugfix' 2023-12-15 15:02:45 +01:00
Ihor Radchenko 6e72a4c7f0
lisp/ox-md.el (org-md--footnote-section): Honor `org-md-toplevel-hlevel'
* testing/lisp/test-ox-md.el (ox-md/footnotes-level): New test file
and new test for the bug.

Reported-by: Pablo Padilla <pgpb.padilla@gmail.com>
Link: https://orgmode.org/list/AC5BC3B4-33F9-487E-877E-EA9A829608A5@gmail.com
2023-12-15 15:01:57 +01:00
Ihor Radchenko 63ef7b9242
org-lint-wrong-include-link-parameter: Ignore narrowing when verifying
It is implied that we ignore narrowing when searching for included
part .  But `org-link-search' does not.  Widen the included before
around its call.
2023-12-15 13:52:59 +01:00
Ihor Radchenko cb71bde7cb
lisp/org-macro.el (org-macro--get-property): Ignore narrowing
It is implied that we ignore narrowing when searching for property
value.  But `org-link-search' does not.  Widen around its call.
2023-12-15 13:52:07 +01:00
Ihor Radchenko 5c543cd9d9
lisp/ol.el (org-link-search): Clarify that narrowing is respected 2023-12-15 13:46:42 +01:00
Ihor Radchenko 89164e6054
lisp/ol.el (org-store-link): Use non-obsolete variable name in docstring 2023-12-15 13:45:48 +01:00
Ihor Radchenko 23291840b2
org-clock-auto-clockout: Honor system idle time. Do not spawn multiple timers
* lisp/org-clock.el (org-clock--auto-clockout-timer-obj): New internal
variable holding the auto-clockout timer.
(org-clock--auto-clockout-maybe): New function to be used in timer.
Use `org-user-idle-seconds' to check for idleness.  Make sure that we
correctly handle system idle time, which may be lesser than Emacs idle
time.
(org-clock-auto-clockout): Do not create duplicate timers.  Use the
new internal helper function.

Reported-by: Vladimir Nikishkin <lockywolf@gmail.com>
Link: https://orgmode.org/list/87ttqv6l2g.fsf@laptop.lockywolf.net
2023-12-15 12:26:44 +01:00
Ihor Radchenko 3be87f15d5
lisp/ol-man.el (Man-completion-cache): Declare variable 2023-12-15 12:25:35 +01:00
Ihor Radchenko fbcd71e856
org-babel-tangle: Do note erase the existing tangle target before overwriting
* lisp/ob-tangle.el (org-babel-tangle): Do not remove the existing
tangle target file, if any.  `write-region' later will overwrite it
anyway, while removing may be unexpected if the existing target is a
symlink.

Reported-by: Cletip Cletip <clement020302@gmail.com>
Link: https://list.orgmode.org/orgmode/CAPHku6O9NfVMAfmE3_ahmpJea_2Qm0mJMFX6qPpT8uiQ94KMZA@mail.gmail.com/
2023-12-15 12:23:22 +01:00
Ihor Radchenko d6924212bd
lisp/org-macs.el: Fix some checkdoc warnings
* lisp/org-macs.el (org-with-remote-undo): Avoid using Elisp symbol
without quotes.
(org-with-wide-buffer): Mark the argument in docstring.
2023-12-15 12:21:10 +01:00
Max Nikulin b8d27bb4ec
ol-man.el: Mark WoMan link handler as obsolete
lisp/ol-man.el (org-man-command): Add label suggesting against
the WoMan package as a viewer for man pages.  It has enough bugs.

Eli Zaretskii to emacs-orgmode. Re: Completion of links to man pages.
Thu, 05 Oct 2023 19:33:26 +0300.
<https://list.orgmode.org/orgmode/83sf6p2fgu.fsf@gnu.org>
2023-12-14 16:02:25 +01:00
Max Nikulin 7c9a5216bb
ol-man.el: Enable completion
* lisp/ol-man.el (org-man-complete): New function implementing
completion for man pages using `Man-completion-table'.  Set this
function as the `:complete' property of "man" links.

Ihor Radchenko. Re: Completion of links to man pages.
Sat, 09 Dec 2023 11:32:39 +0000.
<https://list.orgmode.org/877clnsjag.fsf@localhost>
2023-12-14 16:02:24 +01:00
Ihor Radchenko d6c392b020
lisp/org-refile.el (org-refile-marker): Update docstring
Document the header argument and what "caching" means.
2023-12-14 14:11:50 +01:00
Ihor Radchenko 7c4a02f868
lisp/ox-ascii.el (org-ascii-format-inlinetask-default): Fix checkdoc warning 2023-12-13 15:47:11 +01:00
Ihor Radchenko b9778ed5ad
Merge branch 'bugfix' 2023-12-12 16:15:08 +01:00
Aaron Madlon-Kay 1ec18b8ebc
lisp/org-entities.el: Fix safe value predicate for org-entities-user
* lisp/org-entities.el (org-entities--user-safe-p): Fix logic to
validate a list of entries, rather than a single entry.

Reported-by: "Aaron Madlon-Kay" <aaron@madlon-kay.com>
Link: https://list.orgmode.org/874jgn7f7s.fsf@localhost/

TINYCHANGE
2023-12-12 16:09:31 +01:00
Kenny Ballou ac8b925407
lisp/org-capture.el: use `org-store-link' for %K values
* org-capture.el (org-capture-fill-template): fill %K values using link
value from `org-store-link', which respects `org-id-link-to-use-id'.
* doc/ORG-NEWS: (Template variable expansion %K) Document new behavior.

Reported-by: Nathaniel W Griswold <nate@manicmind.earth>
Signed-off-by: Kenny Ballou <kb@devnulllabs.io>
Link: https://list.orgmode.org/EF459D47-FCA4-4A18-AFC7-3E62159F186C@manicmind.earth/

TINYCHANGE
2023-12-12 13:43:03 +01:00
Ihor Radchenko 676f46b7e2
lisp/ox-beamer.el (org-beamer-bold): Fix typo in the docstring 2023-12-12 13:01:39 +01:00
Ihor Radchenko 7505055f58
org-agenda-to-appt: Do not hard-code not-done todo keywords
* lisp/org-agenda.el (org-agenda-to-appt): Use org-todo-regexp and
org-not-done-regexp to determine whether an even is already done.

Reported-by: Raffael Stocker <r.stocker@mnet-mail.de>
Link: https://orgmode.org/list/yplmsf4ac6va.fsf@mnet-mail.de
2023-12-12 12:55:11 +01:00
Ihor Radchenko 420ed4e033
lisp/org.el (org-skip-over-state-notes): Improve docstring 2023-12-11 14:47:02 +01:00
Ihor Radchenko 0c4358b4ac
lisp/ox-html.el: Fix some checkdoc warnings
* lisp/ox-html.el (org-html-format-list-item): Document some function
arguments.
(org-html--latex-environment-numbered-p): Suppress checkdoc heuristics.
(org-html-image-link-filter): Add docstring.
(org-html-table--table.el-table):
(org-html-final-function):  Document the function arguments.
2023-12-11 12:59:27 +01:00
Rudolf Adamkovič 664ffde149
org-link: Improve UX of 'org-insert-link'
* lisp/ol.el (org-insert-link): Shorten the text in the *Org Links*
buffer to avoid unnecessary line breaks, reword it to better align
with the rest of Emacs, and propertize its key bindings to improve
readability.  Further, move the default link to the minibuffer, as
seen elsewhere in Emacs, and make the *Org Links* buffer read-only.
2023-12-11 12:28:32 +01:00
Visuwesh b77f991c02
Add support for yank-media and DND
* lisp/org.el (org-mode): Call the setup function for yank-media and
DND.
(org-setup-yank-dnd-handlers): Register yank-media-handler and DND
handler.
(org-yank-image-save-method, org-yank-image-file-name-function)
(org-yank-dnd-method, org-yank-dnd-default-attach-method): New
defcustoms.
(org--image-yank-media-handler, org--copied-files-yank-media-handler)
(org--dnd-rmc, org--dnd-multi-local-file-handler)
(org--dnd-local-file-handler, org--dnd-attach-file, org--dnd-xds-method)
(org--dnd-xds-function): Add yank-media and DND handlers.

* doc/org-manual.org: (Drag and Drop & ~yank-media~): Describe the new
feature in the manual.

* etc/ORG-NEWS: Advertise the new features.
2023-12-10 16:04:02 +01:00
Ihor Radchenko b1cb3b724a
Revert "org-element: Simplify drawer and property drawer regexps"
This reverts commit 2b96501070.

The regexp was actually incorrect and correcting it is not trivial.
2023-12-10 16:03:53 +01:00
Ihor Radchenko 1e8081aeec
Revert "lisp/org.el (org-property-drawer-re): Fix regexp"
This reverts commit 6003637a4d.

The new accurate regexp is making the parser horribly slow.  The
regexp should be fix some other way.
2023-12-10 15:59:23 +01:00
Ihor Radchenko 5e809903d5
lisp/ol.el (org-store-link): Clarify the return value when INTERACTIVE? is nil 2023-12-10 13:18:28 +01:00
Ihor Radchenko 4f92738774
lisp/ox-html.el: Fix some checkdoc warnings
* lisp/ox-html.el (org-html-mathjax-options): Use two spaces between
sentences and remove trailing newline in the docstring.
(org-html--container):
(org-html-xhtml-p):
(org-html-html5-p): Add docstring.
(org-html--anchor):
(org-html--todo):
(org-html-format-headline-default-function):
(org-html-format-inlinetask-default-function): Document all the
function arguments.
2023-12-10 12:52:16 +01:00
Ihor Radchenko 74006c7ab2
Update version number for the 9.6.13 release 2023-12-10 12:13:40 +01:00
Ihor Radchenko 282c0fb6d1
lisp/ox-icalendar.el (org-icalendar--vtodo): Document CLASS argument 2023-12-09 12:14:24 +01:00
Ihor Radchenko 73617ff586
lisp/ox-icalendar.el (org-icalendar--vevent): Escape ( in the docstring 2023-12-09 12:14:11 +01:00
Ihor Radchenko 3c714d7b32
lisp/ox-icalendar.el (org-icalendar--rrule): Add docstring 2023-12-09 12:14:00 +01:00
Antero Mejr 478576749d
Move files when using `org-babel-tangle-publish'
* lisp/ob-tangle.el (org-babel-tangle-publish): Use `rename-file'
instead of `copy-file' on tangled files.

Fixes `copy-file' error when publishing to the current directory.
Don't leave behind the old tangled files when publishing.

Link: https://orgmode.org/list/87v898mgx4.fsf@mailbox.org
2023-12-09 11:26:03 +01:00
Ihor Radchenko 3280f2f8bd
lisp/ox-koma-letter.el: Fix checkdoc warnings
* lisp/ox-koma-letter.el (org-koma-letter-use-foldmarks): Do not quote
t.
(org-koma-letter--special-contents-inline): Document INFO argument.
(org-koma-letter--add-latex-newlines): Mention STRING argument.
Clarify that the return value is a new string.
2023-12-08 14:15:20 +01:00
Ihor Radchenko 3b71939903
lisp/org-src.el: Suppress compiler warnings for obsolete code
* lisp/org-src.el (org-src-babel-configure-edit-buffer):
(add-hook): Suppress obsolete call warning - this code is also
obsolete and is to be removed in future.
2023-12-07 15:15:44 +01:00
Ihor Radchenko a8a0a45d24
lisp/org-lint.el (misplaced-heading): New linter
* lisp/org-lint.el (org-lint-misplaced-heading): Add new linter
function to detect heading lines accidentally merged with the line
above.
2023-12-07 15:13:49 +01:00
Ihor Radchenko 6003637a4d
lisp/org.el (org-property-drawer-re): Fix regexp
`org-property-re' demands whitespace after property name when the
value is present.  Do the same for property drawer detection.
2023-12-07 15:11:41 +01:00
Ihor Radchenko ac9acb2113
lisp/ox-latex.el (org-latex--format-spec): Fix checkdoc warning 2023-12-07 11:52:25 +01:00
Ihor Radchenko a59193e47d
fixup! lisp/oc-basic.el: Consider that author/title fields may be raw string objects
* lisp/oc.el (org-cite-capitalize): Should use `capitalize', not `upcase'.
2023-12-07 11:31:07 +01:00
Ihor Radchenko fdd9b6d330
org-cite-capitalize: Fix when STR is a raw string pseudo-object
* lisp/oc.el (org-cite-capitalize): Assure that `upcase' is passed a
string.

Link: https://orgmode.org/list/alpine.DEB.2.22.394.2311290957360.107158@shell3.miskatonic.org
2023-12-06 15:52:34 +01:00
Ihor Radchenko 29d5b2573b
lisp/ox-latex.el (org-latex--make-option-string): Document all the arguments 2023-12-06 15:18:46 +01:00
Ihor Radchenko 7926045ff5
Obsolete `org-src-associate-babel-session' and related functionality
* etc/ORG-NEWS (~org-src-associate-babel-session~ and
~org-babel-<lang>-associate-session~ are now obsolete): Announce the
change.
* lisp/org-compat.el (org-src-associate-babel-session):
(org-src-babel-configure-edit-buffer): Mark obsolete.
* lisp/org-src.el: Add comment to remove "Babel related functions"
block in the next release.

Link: https://orgmode.org/list/CAOQTW-OMeyWYcLq8hDJ4MB10_4dOkvoNjKnFedLYP2z+-M6BAg@mail.gmail.com
2023-12-06 14:21:01 +01:00
Ihor Radchenko e3dec7fe6a
fixup! org-buffer-text-pixel-width: Fix measuring lines beyond window width 2023-12-05 20:40:28 +01:00
Ihor Radchenko 1fe051fa19
fixup! org-string-width: Fix measuring lines beyond window width 2023-12-05 20:38:32 +01:00
Ihor Radchenko f2cb64579b
org-buffer-text-pixel-width: Fix measuring lines beyond window width
* lisp/org-compat.el (org-buffer-text-pixel-width): Pass non-nil
X-LIMIT argument to `window-text-pixel-size' to not limit the maximum
width to window pixel width.

Reported-by: Raffael Stocker <r.stocker@mnet-mail.de>
Link: https://orgmode.org/list/yplmr0k4bv9d.fsf@mnet-mail.de
2023-12-05 16:42:17 +01:00
Ihor Radchenko 4a7a1f2fe7
org-string-width: Fix measuring lines beyond window width
* lisp/org-macs.el (org-string-width): Pass non-nil X-LIMIT argument
to `window-text-pixel-size' to not limit the maximum width to window
pixel width.

Reported-by: Raffael Stocker <r.stocker@mnet-mail.de>
Link: https://orgmode.org/list/yplmr0k4bv9d.fsf@mnet-mail.de
2023-12-05 16:40:37 +01:00
Ihor Radchenko 5e946d3673
org-print-speed-command: Rename and mark for internal use
* etc/ORG-NEWS (~org-print-speed-command~ is now an internal
function): Announce the change.
* lisp/org-compat.el (org-print-speed-command): Mark obsolete.
* lisp/org-keys.el (org--print-speed-command): Rename as internal
function.  Add docstring.  Rename the argument to be more clear.
(org-speed-command-help): Use the new function name.
2023-12-05 14:30:55 +01:00
Ihor Radchenko a0ee5d4c33
lisp/org-keys.el (org-mouse-1-follows-link): Fix checkdoc warning
This change is just suppressing it, following what
`mouse-1-click-follows-link' docstring does.
2023-12-05 14:28:05 +01:00
Ihor Radchenko f4b9f3f7b9
lisp/org-keys.el: Document all the function arguments
* lisp/org-keys.el (org-key):
(org-defkey):
(org-babel-speed-command-activate):
(org-speed-command-activate):
2023-12-05 14:27:44 +01:00
Ihor Radchenko 315417582f
lisp/org.el (org-mode): Force `tab-width' to be 8
* lisp/org-macs.el (org-current-text-column): Assert `tab-width' to be
8 to ensure consistency of the parser across user configurations.
* etc/ORG-NEWS (~tab-width~ value is now assumed to be 8): Document
the breaking change.

This breaking change is made to standardize Org mode format for list
items.  With variable `tab-width', indentation in lists may depend on
user settings leading to inconsistent Org documents when open by
different users.

Link: https://orgmode.org/list/2c9a6cbd-21c0-45bf-8fbb-4f7eccac4ae7@app.fastmail.com
2023-12-05 14:11:23 +01:00
Ihor Radchenko 23378177c2
lisp/oc-basic.el: Consider that author/title fields may be raw string objects
* lisp/oc-basic.el (org-cite-basic--get-field): Clarify that raw
string object may be returned.
(org-cite-basic--shorten-names): Clarify NAMES type.  Allow NAMES to
be a raw string object.
(org-cite-basic--get-year):
(org-cite-basic--key-completion-table): Use a more clear RAW argument
value in the call to make it explicit that we request raw return value.
(org-cite-basic-export-citation): Allow AUTHOR to be raw string object.
* lisp/oc.el (org-cite-capitalize): New function to capitalize string
or raw string object.

Reported-by: William Denton <wtd@pobox.com>
Link: https://orgmode.org/list/alpine.DEB.2.22.394.2311230124110.19367@shell3.miskatonic.org
2023-12-05 12:08:14 +01:00
Ihor Radchenko 36f61a9c8b
lisp/oc.el (org-cite-parse-elements): Use org-mode buffer for parsing 2023-12-05 12:08:13 +01:00
Kyle Meyer 1e353648ef Merge branch 'bugfix' 2023-12-04 23:33:47 -05:00
Kyle Meyer 3cdb637fcf Merge branch 'km/from-emacs-29' into bugfix 2023-12-04 23:27:04 -05:00
Stefan Kangas dc1230a3b5 Backport commit 5f923ff1a from Emacs
; Fix typos
5f923ff1a6a8a9ff6f06dc49c8e0e2ceee111567
Stefan Kangas
Sun Dec 3 23:31:30 2023 +0100
2023-12-04 23:23:45 -05:00
Ihor Radchenko 08c9664a42
Merge branch 'bugfix' 2023-12-04 15:52:16 +01:00
Ihor Radchenko a5e3a06b2e
org-element--cache-process-request: Fix edge case
* lisp/org-element.el (org-element--cache-process-request): Avoid
applying OFFSET during Phase 3 twice in already offseted elements that
are before an obsolete element.

Reported-by: Sharon Kimble
2023-12-04 15:51:43 +01:00
Bastien Guerry 4d72f3a0d2 Merge branch 'bugfix' 2023-12-02 10:03:02 +01:00
Bastien Guerry 65def05f6c lisp/ox-beamer.el: Fix face definition
* lisp/ox-beamer.el (org-beamer-tag): Fix face definition.
2023-12-02 10:02:12 +01:00
Ihor Radchenko 57b94f3447
lisp/org.el (org-in-src-block-p): Fix when post-blank has spaces
Reported-by: Jens Schmidt <jschmidt4gnu@vodafonemail.de>
Link: https://orgmode.org/list/c286709d-5981-41ba-ac3f-f628f2b0ce34@vodafonemail.de
2023-11-29 11:05:41 +01:00
Ihor Radchenko 6d7c7917a0
lisp/org.el (org-in-src-block-p): Fix when on affiliated or post-blank
* lisp/org.el (org-in-src-block-p): When INSIDE is non-nil, do not
return t for affiliated keywords and post-blank.

Reported-by: No Wayman <iarchivedmywholelife@gmail.com>
Link: https://orgmode.org/list/87msuzdkcu.fsf@gmail.com
2023-11-27 21:26:28 +01:00
Ihor Radchenko bd7fab2129
lisp/org.el (org-in-src-block-p): Improve docstring
* lisp/org.el (org-in-src-block-p):

Reported-by: No Wayman <iarchivedmywholelife@gmail.com>
Link: https://orgmode.org/list/87il5n9owq.fsf@gmail.com
2023-11-27 21:25:56 +01:00
Ihor Radchenko 4b1154e32d
lisp/org-element.el: Use consistent warning types for warnings
(org-element--cache-log-message):
(org-element--cache-warn): Use org-element warning type.
(org-element-at-point): Assign warning type.
2023-11-23 13:09:51 +02:00
Ihor Radchenko bfa4f9d5aa
* lisp/ox-latex.el: Document some undocumented function arguments
(org-latex-generate-engraved-preamble):
(org-latex--remove-packages): Document INFO argument.
2023-11-18 13:18:53 +02:00
Ihor Radchenko ad1aff1722
lisp/ox-latex.el (org-latex-src-block-backend): Fix double space in docstring 2023-11-18 13:18:37 +02:00
Ihor Radchenko a1fa521975
org-agenda-format-item: Do not call `org-get-outline-path' in non-Org buffer
* lisp/org-agenda.el (org-agenda-format-item): Avoid invoking Org
parser when we are not actually in Org buffer.  Add commentary
explaining when it can happen.

Reported-by: Will O'Brien <will.08rien@gmail.com>
Link: https://orgmode.org/list/m2leawo9zo.fsf@hazy.com
2023-11-17 15:04:28 +02:00
Ihor Radchenko 0740e62df8
lisp/ox-ascii.el: Fix justification of special blocks
* lisp/ox-ascii.el (org-ascii--current-justification): Fix typos in
the code.
* testing/lisp/test-ox-ascii.el (test-ox-ascii/justify): Add test.

Reported-by: Gregor Zattler <telegraph@gmx.net>
Link: https://orgmode.org/list/87o7ft8gxo.fsf@no.lan
2023-11-17 10:28:32 +02:00
Ihor Radchenko 819cd73cb4
lisp/ox-publish.el (org-publish-timestamp-filename): Document function arguments 2023-11-15 11:20:33 +02:00
Ihor Radchenko 4758255035
lisp/ox-texinfo.el (org-element-ast): Fix checkdoc warnings
Require org-element-ast explicitly to avoid checkdoc warnings for its
functions.  org-element-ast is indirectly loaded by ox->org-element,
but requiring it directly is indeed more clear.
2023-11-14 20:07:47 +02:00
Ihor Radchenko 5bbd58d34f
* lisp/org-element.el: Fix checkdoc warnings
(org-element--cache-persist-after-read): Make docstring less than 80
columns wide.
* lisp/org-persist.el (org-persist-load): Document all the function
arguments.
2023-11-13 11:28:55 +02:00
Ihor Radchenko d285f72f9d
* lisp/org-persist.el (org-persist-write:url): Do not end error with "." 2023-11-13 11:28:40 +02:00
Ihor Radchenko b55e388631
Update version number for the 9.6.12 release 2023-11-13 10:23:02 +02:00
Ihor Radchenko 6f960f3c6a
* lisp/org-element.el: Fix checkdoc warnings
(org-element-inlinetask-parser): Document LIMIT function argument.
(org-element--list-struct): Add docstring.
(org-element-map): Capitalize Lisp.
(org-element--cache-diagnostics-ring): Make docstring 80 chars wide
with single sentence as the first line.
(org-element--cache-log-message):
(org-element--cache-warn):
(org-element--cache-active-p):
(org-element--cache-after-change):  Document the function arguments.
(org-element--parse-to):
(org-element-cache-map): Do not put "." at the end of error messages.
(org-element--cache-avoid-synchronous-headline-re-parsing): Escape (
at bol in the docstring.
(org-element--cache-persist-before-write):
(org-element--cache-persist-before-read):
(org-element--cache-persist-after-read): Add detailed docstring and
document all the function arguments.
2023-11-11 13:34:47 +02:00
Ihor Radchenko 6af71d6f2f
Merge branch 'bugfix' 2023-11-11 13:05:03 +02:00
Ihor Radchenko 866e638c21
org-persist--normalize-associated: Avoid TRAMP connection for remote files
* lisp/org-persist.el (org-persist--normalize-associated): Never try
to store inode association for remote TRAMP files.

Reported-by: Fabio Natali <me@fabionatali.com>
Link: https://orgmode.org/list/87jzqthdge.fsf@fabionatali.com
2023-11-11 13:02:23 +02:00
Ihor Radchenko b5cfc311db
org-babel-ref-resolve: Search current buffer when FILE in FILE:REF does not exist
* lisp/ob-ref.el (org-babel-ref-resolve): Only search in other file
when FILE in FILE:REF exists.
* doc/org-manual.org (Passing arguments):
* etc/ORG-NEWS (Babel references =FILE:REFERENCE= now search current
buffer when =FILE= does not exist): Document the change.

Reported-by: Stefano Ghirlanda <dr.ghirlanda@gmail.com>
Link: https://orgmode.org/list/CAK_gY-Q4f82dbDQgyS+FfyeQaHAMXHqygq3e6ZsWnEj-+eoG9A@mail.gmail.com
2023-11-10 12:31:14 +02:00
Ihor Radchenko 08bbdc7c8b
Merge branch 'bugfix' 2023-11-10 12:08:57 +02:00
Ihor Radchenko 5c82e1e1dd
org-plantuml-exec-mode: Fix obsolete variable name in the docstring
* lisp/ob-plantuml.el (org-plantuml-exec-mode): Use new
`org-plantuml-args' variable name.

Reported-by: Leo Butler <Leo.Butler@umanitoba.ca>
Link: https://orgmode.org/list/87zfzmnvl7.fsf@t14.reltub.ca
2023-11-10 12:08:27 +02:00
Ihor Radchenko 2e8262b893
lisp/org-timer.el (org-timer-start-time): Fix checkdoc warning
Start docstring with capital letter.
2023-11-08 11:55:50 +02:00
Ihor Radchenko c80f320269
lisp/org-timer.el: Document all the function arguments
* lisp/org-timer.el (org-timer):
(org-timer-change-times-in-region):
(org-timer-item):
(org-timer-fix-incomplete):
(org-timer-hms-to-secs):
(org-timer-set-timer):
2023-11-08 11:55:50 +02:00
Ihor Radchenko 6feef2a279
Merge branch 'bugfix' 2023-11-07 12:52:46 +02:00
Tomohisa Kuranari 93ebd64de1
org-beginning/end-of-line: Fix when moving to different line
* lisp/org.el (org-beginning-of-line, org-end-of-line): Fix issue with
`org-special-ctrl-a/e' not working correctly when moving to different
line.
* testing/lisp/test-org.el (test-org/beginning-of-line,
test-org/end-of-line): Add new tests.
2023-11-07 12:50:40 +02:00
Ihor Radchenko 154a80f864
lisp/org-crypt.el (org-crypt-check-auto-save): Fix checkdoc warning 2023-11-07 11:43:53 +02:00
Ihor Radchenko 7056752f33
* lisp/org-cycle.el: Document all the function arguments
(org-cycle-content):
(org-cycle-optimize-window-after-visibility-change):
(org-cycle-display-inline-images):
2023-11-06 11:46:30 +02:00
Ihor Radchenko 1014296344
* lisp/org.el (org-comment-dwim): Rely on `org-comment-or-uncomment-region'
Remove special case for src block and instead use the Org's
`org-comment-or-uncomment-region' used as `comment-region-function'.
`org-comment-or-uncomment-region' already supports commenting inside
src blocks.

Fixes https://orgmode.org/list/d8dc0cca-00d9-4349-a123-6ea6776b00cc@vodafonemail.de
2023-11-06 11:14:29 +02:00
Ihor Radchenko 089fda1219
Merge branch 'bugfix' 2023-11-05 17:51:55 +02:00
Ihor Radchenko bf7a0cdcef
* lisp/org-element.el (org-element--cache-remove): Fix `throw' error symbol 2023-11-05 17:50:36 +02:00
Ihor Radchenko fac55324ac
org-element-at-point: Demote error to warning when called from non-Org buffer
* lisp/org-element.el (org-element-at-point): Do not throw an error
when `org-element-at-point' is called from non-Org buffer.  A number
of third-party packages are incorrectly using `org-element-at-point'
this way, relying upon `org-element-at-point' working in certain
scenarios.  Throwing an error (as was done previously) made an urgent
call to fix this problem, even when `org-element-at-point' happened to
work in a particular scenario.  Now, we just display a warning to give
package author more time to address or work around this.

See https://github.com/alphapapa/org-web-tools/issues/61:

    @yantar92 I understand why this change was made, but perhaps it
    was a bit premature, given how much breakage it's causing
    downstream? It would seem appropriate to at least make it a
    warning for a full major version before making it an error, to
    give downstream devs and users a break.
2023-11-05 14:12:54 +02:00
Ihor Radchenko 459a10979d
* lisp/ox-man.el (org-man-table-cell): Fix checkdoc warning 2023-11-05 11:31:39 +02:00
Ihor Radchenko 054bdb6ce3
* lisp/ox-md.el (org-md--convert-to-html): Fix the docstring
Clarify that CONTENTS argument is ignored and document INFO argument.
2023-11-04 09:48:39 +02:00
Ihor Radchenko 38723463db
org-publish-project-alist: Fix checkdoc warning
Clarify that `user-full-name' refers to a variable.
2023-11-03 09:21:37 +02:00
Ihor Radchenko 91ce96d04a
org-html-link-org-files-as-html: Fix checkdoc warning
Escape ( at bol.
2023-11-02 10:22:23 +02:00
Ihor Radchenko 9ecee6f2e2
* lisp/ox.el (org-export-async-debug): Fix checkdoc warning 2023-11-01 12:48:43 +02:00
Ihor Radchenko ab0d0a6402
fixup! * lisp/org-table.el (org-table-make-reference): Add a FIXME comment 2023-11-01 11:24:49 +02:00
Ihor Radchenko 1ef9e144aa
* lisp/org-table.el (org-table-make-reference): Add a FIXME comment 2023-11-01 11:23:58 +02:00
Bastien Guerry 0ab6ab00c1 Revert "lisp/org-table.el: fix warning about `eq' usage"
This reverts commit ee0961ba31.
2023-11-01 10:14:30 +01:00
Karl Fogel ee0961ba31 lisp/org-table.el: fix warning about `eq' usage
* lisp/org-table.el (org-table-make-reference): Use `equal' instead of
`eq' to compare strings.

This change makes the following warning go away:

  Warning (comp): org-table.el:2867:23: \
  Warning: `eq' called with literal string that may never match (arg 2)

This change does not affect the behavior of `org-table-make-reference'
because `eq' treats all instances of the empty string as the same
object anyway, e.g., `(eq (string-trim "aaabbb" "a+" "b+") "")' ==> t.
The only effect of this change is to eliminate the warning.
2023-10-31 21:38:23 +01:00
Ihor Radchenko cdd73bc955
Update version number for the 9.6.11 release 2023-10-30 12:07:11 +02:00
Ihor Radchenko d68d0f5f49
* lisp/org-pcomplete.el: Add commentary section 2023-10-30 12:05:09 +02:00
Ihor Radchenko ffcdaa1e22
* lisp/org-mouse.el (org-mouse-re-search-line): Document function argument 2023-10-28 13:53:22 +03:00
Ihor Radchenko 9183e3c723
* lisp/org-crypt.el: Fix checkdoc warnings
(org-crypt-disable-auto-save):
(org-crypt-check-auto-save): Add missing quoting in the docstrings.
2023-10-27 12:19:44 +03:00
Ihor Radchenko 41ff569f2d
* lisp/org-ctags.el: Fix sentence spacing in the top comment 2023-10-26 12:48:21 +03:00
Ihor Radchenko 55db64e9d0
org-element--properties-mapc: Fix typo
* lisp/org-element-ast.el (org-element--properties-mapc): Fix missing
parenthesis.

Reported-by: Max Nikulin <manikulin@gmail.com>
Link: https://orgmode.org/list/uhb60m$10d5$1@ciao.gmane.io
2023-10-25 16:47:53 +03:00
Ihor Radchenko 2b15e789ae
org-clock-out-removed-last-clock: New variable to be used by `org-clock-hook'
* lisp/org-clock.el (org-clock-out-removed-last-clock): Add new global
variable.
(org-clock-out): Set the variable to non-nil when the CLOCK line has
been removed before running `org-clock-out-hook'.
(org-clock-out-hook): Add reference to the new variable.
* etc/ORG-NEWS (New variable ~org-clock-out-removed-last-clock~):
Announce the change.
2023-10-25 16:14:23 +03:00
Ihor Radchenko 9512bf250a
org-clock-out-hook: Clarify point location when hook is executed
* lisp/org-clock.el (org-clock-out-hook): Clarify that the point is at
the clock line when the hook is executed.
2023-10-25 14:52:22 +03:00
Ihor Radchenko b06995e998
* lisp/ol-man.el: Add file commentary and Code: header 2023-10-25 13:46:00 +03:00
PolishEmacsUser 0b0bf03e4b
org-clock-clocktable-language-setup: Reformat and add Polish translation
* lisp/org-clock.el (org-clock-clocktable-language-setup): Add Polish.
Reorder the translation aplhabetically with English on top.  Unify
spaces in lists.

TINYCHANGE
2023-10-25 13:35:43 +03:00
Max Nikulin 9cbaf8e49c
ox-ascii.el: Consistently add brackets around links
* lisp/ox-ascii.el (org-ascii-link): Add square brackets around
description of fuzzy links when they are exported inline.
* lisp/ol-docview.el (org-docview-export):
* lisp/ox-ascii.el (org-ascii-link): Export links with square brackets
around description and angle brackets around path.

This make export of links inline (when `org-ascii-links-to-notes' is
nil) consistent with "http:" links: "[DESC] (<URI>)".

I would drop brackets for "http:" and similar links instead
("DESC (<URI>)" or even "DESC <URI>"), but any case I prefer
consistency.

Ihor Radchenko to emacs-orgmode. Re: [RFC][PATCH] Allow to export to
ascii custom link types as notes. Tue, 24 Oct 2023 10:40:41 +0000.
<https://list.orgmode.org/87edhk717a.fsf@localhost>
2023-10-25 13:30:40 +03:00
Ihor Radchenko 9c255cacfe
org-element-ignored-local-variables: Add missing variables
This fixes ox-hugo bug when Org buffer copy cache is corrupted.

* lisp/org-element.el (org-element--cache-variables): Add
more state variables.  Move above
`org-element-ignored-local-variables' definition.
(org-element-ignored-local-variables): Make use of the value of
`org-element--cache-variables'.
*
testing/lisp/test-org-element.el (test-org-element/cache-ignored-locals):
Add guard against adding new cache state variables that are not listed
in `org-element--cache-variables'.

Reported-by: George Kettleborough <kettleg@gmail.com>
Link: https://orgmode.org/list/41acf96e-8f62-4ed5-9853-b4ff4e0e2fa9@gmail.com
2023-10-25 11:00:51 +03:00
Ihor Radchenko a9e2a97ee3
org-export-ignored-local-variables: Add missing variables
This fixes ox-hugo bug when Org buffer copy cache is corrupted.

Reported-by: George Kettleborough <kettleg@gmail.com>
Link: https://orgmode.org/list/41acf96e-8f62-4ed5-9853-b4ff4e0e2fa9@gmail.com
2023-10-25 10:58:02 +03:00
Ihor Radchenko c7db1c0981
* lisp/org-clock.el (org-clock-menu): Add docstring 2023-10-24 13:44:28 +03:00
Ihor Radchenko e03402b931
Merge branch 'bugfix' 2023-10-24 12:28:20 +03:00
Ihor Radchenko 84fa57ad1f
org-babel-insert-result: Do not modify RESULT for side effects
* lisp/ob-core.el (org-babel-insert-result): In some scenarios, result
of evaluation is a mutable Elisp string.  Avoid modifying it for side
effects as it may affect side effects of Elisp code blocks.

Reported-by: Jeff Trull <edaskel@att.net>
Link: https://orgmode.org/list/CAF_DUeEYVMytS=V2_aGjLyhddVZaPd7FWG_5Sbys6qcB0zGnyw@mail.gmail.com
2023-10-24 12:25:12 +03:00
Ihor Radchenko 098f081591
org-open-at-point: Preserve point unless opening link moves the point
* lisp/org.el (org-open-at-point): Preserve point when opening links.
When a link opened moves point in current buffer, do move the point
as needed by the link.  When multiple links that are opened move point
in current buffer, move point to the last such link.  Fix searching
for the links when opening _multiple_ the links is requested.

Reported-by: Gustavo Barros <gusbrs.2016@gmail.com>
Link: https://orgmode.org/list/87r0mp2srd.fsf@localhost
2023-10-23 14:28:04 +03:00
Ihor Radchenko 20ab29117c
* lisp/ol.el (org-link-open-as-file): Document function arguments 2023-10-23 12:33:29 +03:00
Ihor Radchenko 154ef34107
* lisp/ol-eww.el (org-eww-extend-eww-keymap): Add docstring 2023-10-22 12:18:53 +03:00
Ihor Radchenko 693a3c558f
org-icalendar-entry: Fix when the value is a list of keywords
* lisp/ox-icalendar.el (org-icalendar-entry): Add condition when the
value of :icalendar-include-todo is a list of keywords.
(org-icalendar-include-todo): Document that the value can be a list of
keywords, as per :type spec.

Reported-by: Björn Bidar <bjorn.bidar@thaodan.de>
Link: https://list.orgmode.org/orgmode/87ttqjirrv.fsf@/
2023-10-22 11:45:34 +03:00
Gerard Vermeulen 1494445116
Fix obsolete `sleep-for' usage
* lisp/ob-lua.el (org-babel-lua-evaluate-session):
* lisp/ob-python.el (org-babel-python-initiate-session-by-key):
(org-babel-python-evaluate-session):
* testing/lisp/test-ob-R.el (ob-session-async-R-simple-session-async-value):
(ob-session-async-R-simple-session-async-output):
(ob-session-async-R-named-output):
(ob-session-async-R-named-value):
(ob-session-async-R-output-drawer):
(ob-session-async-R-value-drawer):
(ob-session-R-result-output):
* testing/lisp/test-ob-julia.el (test-ob-julia/async-simple-session-output):
(test-ob-julia/async-named-output):
(test-ob-julia/async-output-drawer):
* testing/lisp/test-ob-python.el (test-ob-python/async-simple-session-output):
(test-ob-python/async-named-output):
(test-ob-python/async-output-drawer): Replace deprecated two integer
argument `sleep-for' calls with one float `sleep-for' calls.
2023-10-21 16:08:25 +03:00
Ihor Radchenko edff094b5f
* lisp/ol-eshell.el: Fix docstrings
(org-eshell-open): Document the function argument.
(org-eshell-store-link): Make the first docstring line into a single
sentence.
2023-10-21 14:49:52 +03:00
Nan JunJie 7ceefaf2d5
* lisp/ob-plantuml.el: Support tikz output
(org-babel-execute:plantuml): Generate tikz code without preamble when
requested :file has .tikz extension.
* etc/ORG-NEWS (=ob-plantuml.el=: Support tikz file format output):
Document the change.

TINYCHANGE
2023-10-20 14:52:25 +03:00
Ihor Radchenko 595a32d532
* lisp/ol.el: Document some of the function arguments
(org-link-store-props):
(org-link-add-props):
(org-link-open-from-string):
2023-10-20 13:29:03 +03:00
Ihor Radchenko 0e9485c90b
* lisp/ol.el (org-link--set-link-display): Fix compiler warning 2023-10-20 13:28:42 +03:00
Ihor Radchenko aef5cf5e0b
* lisp/ol.el (org-link-descriptive): Provide :set function
(org-link--set-link-display): New internal function used to apply
`org-link-descriptive' value across open Org buffers.
2023-10-20 12:38:18 +03:00
Ihor Radchenko 46a52a5708
* lisp/ob-sqlite.el: Document all the function arguments
(org-babel-execute:sqlite):
(org-babel-sqlite-offset-colnames):
2023-10-19 12:58:21 +03:00
Ihor Radchenko 13353f1fa3
org-fold-hide-drawer-all: Make interactive
* lisp/org-fold.el (org-fold-hide-drawer-all): Convert into
interactive command.  Accept two optional arguments - region
boundaries.
* etc/ORG-NEWS (~org-fold-hide-drawer-all~ is now interactive):
Document the change.

Link: https://orgmode.org/list/CAFmwT7WEMvGVyQhP8NcZY5vZMzz4NcvBjchd4jBqgHCPwjOgFA@mail.gmail.com
2023-10-19 12:32:49 +03:00
Ihor Radchenko 733cb9614c
* lisp/ob-sqlite.el: Add support for :prologue/:epilogue parameters
(org-babel-expand-body:sqlite):
2023-10-19 12:01:10 +03:00
Ihor Radchenko ab4ec726e5
* lisp/ob-org.el: Add support for :prologue/:epilogue parameters
(org-babel-expand-body:org):
2023-10-19 12:01:09 +03:00
Ihor Radchenko 320b0e5b1f
* lisp/ob-lisp.el: Add support for :prologue/:epilogue parameters
(org-babel-expand-body:lisp):
2023-10-19 12:01:09 +03:00
Ihor Radchenko 6887851401
* lisp/ob-lilypond.el: Add support for :prologue/:epilogue parameters
(org-babel-expand-body:lilypond):
2023-10-19 12:01:08 +03:00
Ihor Radchenko f0a2531bb4
* lisp/ob-latex.el: Add support for :prologue/:epilogue parameters
(org-babel-expand-body:latex):
2023-10-19 12:01:06 +03:00
Ihor Radchenko 92b69d4331
* lisp/ob-java.el: Add support for :prologue/:epilogue parameters
(org-babel-expand-body:java):
2023-10-19 12:01:03 +03:00
Ihor Radchenko 67bd4b0a36
* lisp/ob-fortran.el: Add support for :prologue/:epilogue parameters
(org-babel-expand-body:fortran):
2023-10-19 12:01:00 +03:00
Ihor Radchenko 936290fe18
* lisp/ob-emacs-lisp.el: Add support for :prologue/:epilogue parameters
(org-babel-expand-body:emacs-lisp):
2023-10-19 12:00:55 +03:00
Ihor Radchenko 3bffa96448
* lisp/ob-dot.el: Add support for :prologue/:epilogue parameters
(org-babel-expand-body:dot):
2023-10-19 12:00:46 +03:00
Ihor Radchenko be59f11435
* lisp/ob-calc.el: Add support for :prologue/:epilogue parameters
(org-babel-expand-body:calc):
2023-10-19 12:00:37 +03:00
Ihor Radchenko 1f0eaefa52
* lisp/ob-awk.el: Add support for :prologue/:epilogue parameters
(org-babel-expand-body:awk):
2023-10-19 12:00:28 +03:00
Ihor Radchenko 312deaa13a
* lisp/ob-C.el: Add support for :prologue/:epilogue parameters
(org-babel-C-expand-C):
2023-10-19 12:00:18 +03:00
Ihor Radchenko b3c8a7c360
* lisp/org-element.el (org-element-entity-parser): Add comment 2023-10-19 11:17:58 +03:00
Ihor Radchenko e34d7781f0
org-element-entity-parser: Refactor entity regexp using `rx'
* lisp/org-element.el (org-element-entity-parser): Rewrite entity
regexp using more readable `rx' form.
* testing/lisp/test-org-element.el (test-org-element/entity-parser):
Add new test cases for whitespace entities.
2023-10-19 11:15:45 +03:00
Ihor Radchenko 627097c7d3
* lisp/ol.el (org-link-complete-file): Document the function argument 2023-10-18 13:47:49 +03:00