Commit graph

19313 commits

Author SHA1 Message Date
Po Lu 9f1d6dfd73 Backport commit 8e1c56ae4 from Emacs
; Add 2024 to copyright years
8e1c56ae46754dd7baedff49a464f078f0e9912d
Po Lu
Tue Jan 2 09:47:10 2024 +0800
2024-01-06 15:48:23 -05:00
Ihor Radchenko fa198cbbe4
org-agenda-search-headline-for-time: Ignore all the timestamps in headings
* lisp/org-agenda.el (org-agenda-format-item): When
`org-agenda-search-headline-for-time' is non-nil, exclude timestamps
in headings from searching the time.
(org-agenda-search-headline-for-time): Remove warning about timestamps
in headings from the docstring.
* etc/ORG-NEWS (~org-agenda-search-headline-for-time~ now ignores all
the timestamp in headings): Announce the change.

Reported-by: rameiko87@posteo.net
Link: https://orgmode.org/list/dc5c0aa3748f5d7ad8b79bea674266e7@posteo.net
2024-01-06 13:29:43 +01:00
Ihor Radchenko b6643884cb
ob-R, ob-julia: Use `ess-gen-proc-buffer-name-function' to control session buffer name
* lisp/ob-R.el (org-babel-R-initiate-session):
* lisp/ob-julia.el (org-babel-julia-initiate-session): Do not use the
hack with renaming ESS buffer and instead indicate the session buffer
name to ESS appropriately through `ess-gen-proc-buffer-name-function'.

Link: https://orgmode.org/list/871qb21bp7.fsf@gmail.com
2024-01-05 14:56:21 +01:00
Ihor Radchenko c10a079a2c
org-edit-src-code: Setup Org Src buffer context before running `org-src-mode-hook'
* lisp/org-src.el (org-edit-src-code): Make sure that
`org-coderef-label-format' and `org-src--babel-info' are set before
`org-src-mode-hook' is executed.  Earlier,
`org-src-babel-configure-edit-buffer' that is by default present in
the hook would do nothing as it relies upon `org-src--babel-info'
being set.
2024-01-05 14:33:42 +01:00
Ihor Radchenko b4687fcd69
Revert "lisp/org-src.el: Suppress compiler warnings for obsolete code"
This reverts commit 3b71939903.
2024-01-05 14:31:31 +01:00
Ihor Radchenko 99c9cae25c
Revert "Obsolete `org-src-associate-babel-session' and related functionality"
This reverts commit 7926045ff5.

`org-src-associate-babel-session' is still useful because:

1. It indicates the need to implement session association to babel
   backend (although we still need to make it more clear for backend
   authors in future).

2. It provides infrastructure for more granular control over session
   association for third-party packages.  For example, we might want
   to disabled session association when it can cause unwanted side
   effects, like starting comint process unconditionally (looking at
   ob-R and other ess-based backends).
2024-01-05 14:20:14 +01:00
Ihor Radchenko aeebac3780
lisp/org-id.el: Fix inaccuracy in the commentary
Reported-by: Stephen J. Eglen <sje30@cam.ac.uk>
Link: https://orgmode.org/list/m234vceq40.fsf@cam.ac.uk
2024-01-05 13:31:27 +01:00
Nafiz Islam a27a1b87b5
lisp/org-agenda.el (org-todo-list): Rename variables and format
* lisp/org/org-agenda.el
(org-todo-list): Use `org-today' directly for `calendar-gregorian-from-absolute'.
(org-todo-list): Replace `date' with `today' (`date' is no longer used).
(org-todo-list): Replace `kwds' with `todo-keywords'.
(org-todo-list): Replace `rtn' with `todo-entries'.
(org-todo-list): Replace `rtnall' with `all-todo-entries'.
(org-todo-list): Replace some `and' with `when' and `cond'.
(org-todo-list): Some whitespace changes.

TINYCHANGE
2024-01-04 16:00:07 +01:00
Ihor Radchenko 6d1c1721e3
Merge branch 'bugfix' 2024-01-04 15:15:18 +01:00
Ihor Radchenko 4279b84a1f
org-lint-invalid-cite-export-declaration: Do not warn about not-yet-loaded processors
* lisp/org-lint.el (org-lint-invalid-cite-export-declaration): Fix
false-positive warning when cite processor is not yet loaded.

Reported-by: gerard.vermeulen@posteo.net
Link: https://orgmode.org/list/a142147a781384402547d49859fa3287@posteo.net
2024-01-04 15:14:19 +01:00
Ihor Radchenko d6117f895c
org-element-cache: Provide Elisp API to store user data inside the cache
* lisp/org-element.el (org-element-cache-store-key):
(org-element-cache-get-key): New functions to store and retrieve data
associated with cached nodes.  The data is stored inside
:fragile-cache and :robust-cache node properties.
(org-element--cache-shift-positions): Clear :fragile-cache when the
contents boundaries are changed.  Optimize when OFFSET is 0.
* lisp/org-element.el (org-element--cache-process-request): Call
`org-element--cache-shift-positions' even for 0 offset to account for
:fragile-cache.
* etc/ORG-NEWS (New API functions to store data within
~org-element-cache~): Announce the new API.
* testing/lisp/test-org-element.el (test-org-element/cache-get-key):
New test.
2024-01-04 14:23:08 +01:00
Alexandre Avanian 3aac00e45d
lisp/org-indent.el: Add hook to run after it initializes a buffer
* lisp/org-indent.el (org-indent-initialize-buffer): Define and call
hook after it initializes a buffer.
* etc/ORG-NEWS: Announce new custom option.

This will allow to enrich org-indent properties without requiring
hacks to detect initialization.
See https://list.orgmode.org/orgmode/5f4cdb77-8f43-4f2d-91a7-bc4ce57df8ad@app.fastmail.com/#r

TINYCHANGE
2024-01-03 16:34:59 +01:00
Ihor Radchenko dfeff03c5a
lisp/org-element-ast.el (org-element-copy): Fix altering source element
* testing/lisp/test-org-element.el (test-org-element/copy): Add new
test case.

Reported-by: gerard.vermeulen@posteo.net
Link: https://orgmode.org/list/e0252d664af25728243734d67432ad64@posteo.net
2024-01-03 15:57:01 +01:00
Jack Kamm d57d3bd9bb ob-python: Remove :version from variables with :package-version 2023-12-31 10:32:55 -08:00
Jack Kamm 9239b0e8d1 ob-python: Changed options for default Python command
ob-python will now use the same settings as `run-python' when starting
interactive sessions, by default.

* lisp/ob-python.el (org-babel-python-command): Changed to have
additional `auto' option, which is the new default value.
(org-babel-python-command-session): New option to control default
session Python command.
(org-babel-python-command-nonsession): New option to control default
nonsession Python command.
(org-babel-python--command): New function to determine the command to
run Python.
(org-babel-python-initiate-session-by-key): Call `run-python' without
CMD arg.  Instead, set `python-shell-interpreter' and
`python-shell-interpreter-args' from `org-babel-python--command' when
needed.
(org-babel-python-evaluate-external-process): Use
`org-babel-python--command' to start Python.
2023-12-31 08:29:20 -08:00
Ihor Radchenko 478b40d99e
Update version number for the 9.6.15 release 2023-12-31 12:59:12 +01:00
Kyle Meyer f348adce0d Merge branch 'km/from-emacs-29' into bugfix 2023-12-30 22:34:57 -05:00
Stefan Kangas 38ccb77196 Backport commit 55555a6a0 from Emacs
* lisp/org-protocol.el: Minor copy-edits to Commentary.

org-protocol: Minor copy-edits to Commentary
55555a6a0d1d76468f8327972b3cb067b9e35f24
Stefan Kangas
Sat Dec 30 17:53:53 2023 +0100
2023-12-30 22:33:14 -05:00
Jack Kamm d526ab5388 fixup! ob-python: Test and improve robustness for externally started python
*
lisp/ob-python.el (org-babel-python--python-util-comint-end-of-output-p):
Backport python-util-comint-end-of-output-p for emacs28.
(org-babel-python-initiate-session-by-key): Use backported version of
python-util-comint-end-of-output-p.
2023-12-29 08:44:17 -08:00
Jack Kamm d0d838b02e ob-python: Test and improve robustness for externally started python
* lisp/ob-python.el (org-babel-python-initiate-session-by-key): Wait
for first prompt for pre-existing python processes.  Document behavior
for pre-existing python processes.
(org-babel-python-initiate-session): Document behavior for
pre-existing python processes.
*
testing/lisp/test-ob-python.el (test-ob-python/session-with-existing-inferior-python):
New test for working with existing python processes.
2023-12-29 07:46:49 -08:00
Ihor Radchenko 996441fd56
lisp/ox-odt.el: Do not alter `auto-mode-alist'
Reported-by: Peter Prevos <peter@prevos.net>
Link: https://orgmode.org/list/87wmtoosru.fsf@prevos.net
2023-12-29 16:33:54 +01:00
Ihor Radchenko 69e746c1e4
lisp/ox-odt.el: Do not open the generated exported file in the background
* lisp/ox-odt.el (org-odt--export-wrap): Do not open the exported file
in the background.  Such behavior is not consistent with the other
export backends and is not documented (users don't know about it).
* etc/ORG-NEWS (ODT export no longer opens the exported file in the
background): Document the breaking change.
2023-12-29 16:33:54 +01:00
Ihor Radchenko d15e52fef4
org-element: Distinguish between [[/path/to]] and [[file:/path/to]] links
* lisp/org-element.el (org-element-link-parser): Record information
whether link type: is implicit or explicitly provided in the input
text.  The information is saved into new link object property
`:type-explicit-p'.
(org-element-link-interpreter): Take into account `:type-explicit-p'
when interpreting link object.
(org-element-cache-version): Bump AST version.
* testing/lisp/test-org-element.el (test-org-element/link-interpreter):
Add new test.

Reported-by: Joseph Turner <joseph@ushin.org>
Link: https://orgmode.org/list/87o7e9ei3p.fsf@ushin.org
2023-12-29 15:44:10 +01:00
Justin Vallon 684aff8eeb
org-persist--gc-orphan-p: Fix Emacs 26.1 compatibility
* lisp/org-compat: Add org-assoc-delete-all from compat/compat-27.el.
* lisp/org-persist.el (org-persist--gc-orphan-p): Use
org-assoc-delete-all.

TINYCHANGE
2023-12-28 23:57:02 +01:00
Ihor Radchenko 80ce6152ba
lisp/org-table.el: Improve cell alignment accuracy
* lisp/org-macs.el (org-string-width): Add new optional argument
providing reference face to be used for relative width calculation.
Use `ceiling' when the total string width is a fraction of "a" width.
* lisp/org-table.el (org-table-blank-field):
(org-table-clean-line):
(org-table--shrink-field):
(org-table--align-field):
(org-table-align):
(org-table-justify-field-maybe): Use org-table face as reference for
width calculation.

When org-table face is not default, `org-string-width' may not return
correct width as " " and "-" in the table may not have the same width
as "a" with default face used as reference in `org-string-width'.
With this patch, the width calculation becomes more accurate, although
may still be off if the table faces are customized to be more
piece-mill.

Reported-by: ltmsyvag
Link: https://emacs-china.org/t/org-9-6-5-org/24484
2023-12-28 16:17:03 +01:00
Ihor Radchenko 4ad7ae2520
lisp/org-element-ast.el: Add a comment why no `org-element-properties' 2023-12-25 15:56:03 +01:00
Ihor Radchenko bd9dc32178
org-assert-version: Disable version check in .elc files for built-in Org mode
* lisp/org-macs.el (org-assert-version): Record
`org--inhibit-version-check' during compile time inside
`org-assert-version'.  This way, .elc files generated when compiling
built-in Org mode in Emacs git tree never trigger version mismatch
warning.

Link: https://yhetil.org/emacs-devel/87zfxzdbna.fsf@yahoo.com
2023-12-25 15:50:08 +01:00
Ihor Radchenko 3afae6690f
org-element-with-buffer-copy, org-export-with-buffer-copy: Fix expansion
* lisp/org-element.el (org-element-with-buffer-copy):
* lisp/ox.el (org-export-with-buffer-copy): Make sure that keyword
arguments in the macro are not duplicated into BODY, which happens for
&rest body + &allow-other-keys in `cl-defmacro'.

Reported-by: João Távora <joaotavora@gmail.com>
Link: https://yhetil.org/emacs-devel/CALDnm53p7nXdnbA2PuH-VHL7EeGQUXYy3x_87hp3oj2pkyWS9Q@mail.gmail.com/
2023-12-25 15:50:04 +01:00
Ihor Radchenko f59ac10257
lisp/org-clock.el: Improve some docstrings
* lisp/org-clock.el (org-clock-save-markers-for-cut-and-paste):
(org-clock-select-task):
2023-12-25 10:42:33 +01:00
Ihor Radchenko eadeaa8533
org-assert-version: Disable version check in .elc files for built-in Org mode
* lisp/org-macs.el (org-assert-version): Record
`org--inhibit-version-check' during compile time inside
`org-assert-version'.  This way, .elc files generated when compiling
built-in Org mode in Emacs git tree never trigger version mismatch
warning.

Link: https://yhetil.org/emacs-devel/87zfxzdbna.fsf@yahoo.com
2023-12-24 13:47:04 +01:00
Ihor Radchenko e9ae9dbc54
org-lint.el: Add linter checking for independent keywords prior affiliated
* lisp/org-lint.el (org-lint-regular-keyword-before-affiliated):
(combining-keywords-with-affiliated):

Link: https://orgmode.org/list/87ilpj9lv1.fsf@localhost
2023-12-24 12:43:26 +01:00
Ihor Radchenko b8b02e3da3
org-lint: New linter for named results of evaluation
* lisp/org-lint.el (org-lint-named-result):
(named-result):

Link: https://orgmode.org/list/87ilpj9lv1.fsf@localhost
2023-12-24 12:35:34 +01:00
Ihor Radchenko 52a836b40d
lisp/oc-basic.el (org-element-contents): Add missing declare 2023-12-24 12:24:06 +01:00
Ihor Radchenko cee9b6abc6
Revert "lisp/oc.el (org-cite-parse-elements): Use org-mode buffer for parsing"
This reverts commit 36f61a9c8b.

Because of complex dependencies, it is not easy to properly "require"
`org-element-with-buffer-copy' in oc.el.  So, reverting for now.
2023-12-24 12:18:52 +01:00
Morgan Smith 11e16e5f9e
lisp/org-agenda.el: Check agenda type earlier
lisp/org-agenda.el (org-agenda-goto-date): Check agenda type earlier.
Also remove redundant error.

When this function is run on a todo agenda the user is given the
undescriptive error "(wrong-type-argument listp "todo")" because we
attempt to parse the 'org-last-args text-property prematurely.  With
this change users will get the much better error "Not allowed in
'todo'-type agenda buffer or component".
2023-12-24 12:11:16 +01:00
Ihor Radchenko 7440911e49
Merge branch 'bugfix' 2023-12-24 11:58:52 +01:00
Ihor Radchenko 58c91cbf9f
Update version number for the 9.6.14 release
* lisp/org.el:
2023-12-24 11:57:35 +01:00
Ihor Radchenko af18216738
org-assert-version: Convert to warning. Add info when building Emacs git
* lisp/org-macs.el (org-assert-version): Do not throw an error - it is
preventing Org loading and creating more breakage than the problem it
is trying to solve (the version mismatch is problematic occasionally,
while the error was thrown every single time).  Document what to do
when version mismatch is encountered for Org mode built inside Emacs
git repository.

Link: https://yhetil.org/emacs-devel/83frzsccuy.fsf@gnu.org/T/#t
2023-12-24 11:53:39 +01:00
Sébastien Miquel f280b2178c lisp/ob-python.el (org-babel-python-table-or-string): Small fix
Check for empty results.
2023-12-23 21:19:54 +01:00
Ihor Radchenko 539728840f
ox-latex: Fix exporting longtable with multiline header
* lisp/ox-latex.el (org-latex-table-row): Use all the rows when
constructing header definition.
* testing/lisp/test-ox-latex.el (test-ox-latex/longtable): Add new
test.

Reported-by: Brett Presnell <presnell@member.fsf.org>
Link: https://orgmode.org/list/87mt9zywco.fsf@localhost
2023-12-23 12:03:36 +01:00
Karthik Chikmagalur 6011e7a489
org: Add image alignment
* lisp/org.el (org-image--align, org-image-align,
org-toggle-inline-images): Add the ability to left-align, center
or right-align inline image previews in the Emacs window. This is
controlled globally using the new user option `org-image-align'.
Alignment can be specified per image using the `#+ATTR.*'
affiliated keywords.  The function `org-image--align' determines
the kind of alignment for its argument link.

* lisp/org-lint.el (org-lint-invalid-image-alignment): Add an
org-lint checker to catch invalid ":align" and ":center"
attributes in `#+attr_org' keywords.

* doc/org-manual.org: Document the new feature under the Images
section.
2023-12-21 14:38:06 +01:00
Ihor Radchenko e6bfe3caa8
lisp/org-persist.el: Honor org-persist--disable-when-emacs-Q for gc-lock
Do not run `org-persist--refresh-gc-lock-timer' for emacs -Q.
2023-12-21 11:40:00 +01:00
Ihor Radchenko e469636a6d
org-element-plain-list-interpreter: Do not run mode hooks
* lisp/org-element.el (org-element-plain-list-interpreter): Use
`org-element-with-buffer-copy' and make sure that we do not run user
hooks.  User hooks are often not designed to work in temporary
buffers.  The changed approach also follows similar code elsewhere in
Org code.
2023-12-21 11:39:59 +01:00
Ihor Radchenko 571186631a
lisp/org-macs.el (org-current-text-column): Improve error message
The previous version is apparently not clear enough for some people.

Link: https://list.orgmode.org/412FBC9A-3DA2-48A7-A57F-AA90A40B5BEA@gmail.com/T/#t
2023-12-19 12:51:04 +01:00
Ihor Radchenko e3abcdbf01
lisp/oc-csl.el: Fix some checkdoc warnings
* lisp/oc-csl.el (org-cite-csl-latex-label-separator): Make first line
of the docstring full sentence.  Fix double space between sentences.
(org-cite-csl--create-structure-params): re-fill.
(org-cite-csl--no-citelinks-p): Document the function arguments.
2023-12-19 12:03:16 +01:00
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