Commit Graph

954 Commits

Author SHA1 Message Date
Karthik Chikmagalur e87ecf88be
Document preview API for arbitrary link types
* etc/ORG-NEWS: Mention new commands and options for link preview.

* doc/org-manual.org: Add sections on
- previewing external links (Images and link previews), and
- adding the link preview feature to other link types (Adding
Hyperlink preview).
2024-11-27 19:34:34 +01:00
Jack Kamm 3ff21c7138 Add options to skip extra processing in org-babel-comint-with-output
This patch adds options to org-babel-comint-with-output to skip prompt
removal.  Allowing individual languages to handle this cleanup can be
more robust than relying on the generic ob-comint implementation.
This allows ob-python to switch back to using
`org-babel-comint-with-output' rather than its own bespoke
reimplementation, reducing code duplication.  Furthermore, this adds a
new implementation of ob-R non-async session output evaluation, that
is similar to the ob-python approach in that it avoids leaking
prompts, rather than relying on the cleanup from
`org-babel-comint-with-output'.  A test is added to test-ob-R.el to
demonstrate the improved robustness of the new approach; previously,
this test would fail due to a false positive prompt, but now passes.

* lisp/ob-comint.el (org-babel-comint--remove-prompts-p): New helper
function to parse the prompt-handling argument in
`org-babel-comint-with-output' and `org-babel-comint-async-register'.
(org-babel-comint-with-output): Add a new argument
to prevent extra processing for prompt cleanup.  Also, search for the
end-of-execution sentinel within the collected output rather than the
comint buffer, which doesn't depend on the position of point during
evaluation.
(org-babel-comint-async-register): Move parsing of prompt-handling
argument to `org-babel-comint--remove-prompts-p'.
* lisp/ob-python.el: Require subr-x for Emacs 27 compatibility.
(org-babel-python-send-string): Switch to using
`org-babel-comint-with-output', rather than bespoke reimplementation.
* lisp/ob-R.el: Require subr-x for Emacs 27 compatibility.
(ess-send-string): Declare external function.
(org-babel-R-evaluate-session): New implementation of output
evaluation that avoids leaking prompts, by writing the code block to a
tmp file and then sourcing it.
* testing/lisp/test-ob-R.el (test-ob-r/session-output-with->-bol): New
test for robustness against false positive prompts at the beginning of
a line.
2024-11-12 19:54:28 -08:00
Jack Kamm 5e86016cf9 NEWS entry for the new argument of org-babel-comint-async-register
The optional argument was added on bugfix branch, but we are adding
this extra NEWS entry on main.  See also:

https://list.orgmode.org/875xpnrubg.fsf@localhost/T/#m179d313e1db284ff28eb4098129bb49418824a25
2024-11-01 17:16:00 -07:00
Visuwesh b6a72e134d
Add repeat-mode keymap for navigation commands
* lisp/org-keys.el (org-up-heading): Add new alias for
`outline-up-heading'.
(org-mode-map): Remap `outline-up-heading' to the new alias.
(org-navigation-repeat-map, org-link-navigation-repeat-map)
(org-block-navigation-repeat-map): Add new repeat-maps to make
navigation easier.
* doc/org-manual.org (Repeating commands): Document the new feature in the manual.
* etc/ORG-NEWS (Some navigation commands can now be repeated): Announce it.
2024-10-12 19:39:56 +02:00
Jack Kamm c07028671d
ox-icalendar: Fix export of diary-style timestamps
* lisp/ox-icalendar.el (org-icalendar-entry): Include timestamps of
type diary when `:with-timestamps' is `active'.
* lisp/ox.el (org-export--skip-p): Include timestamps of type diary
when `:with-timestamps' is `active'.
*
testing/lisp/test-ox-icalendar.el (test-ox-icalendar/diary-timestamp):
Unit test for exporting timestamps of type diary.
2024-09-22 12:22:33 +02:00
Ihor Radchenko 8b8b61d277
Merge branch 'bugfix' 2024-09-22 10:11:45 +02:00
Rudolf Adamkovic 6443c83bd1
ox-texinfo: Support links in headings
* etc/ORG-NEWS (Texinfo exporter now supports links in headings):
Announce the new feature.
* lisp/ox-texinfo.el: (org-texinfo--format-entries,
org-texinfo--get-node, org-texinfo--sanitize-title-reference,
org-texinfo--sanitize-title): A 2-step change: (1) Rename
`--sanitize-title' to `--sanitize-title-reference' and (2) create a
new `--sanitize-title' sanitation function.  The new function is less
strict in that does not remove links, which should be allowed in
sectioning commands, such as `@unnumbered'.  The old function remains
more strict, which is useful for generating `@node' names, for
example.
* testing/lisp/test-ox-texinfo.el:
(test-ox-texinfo/headings-with-links): Test the new functionality to
avoid regressions in the future.
2024-09-16 20:54:08 +02:00
Robert Pluim 00ef9b557d Backport commit 79f68597a from Emacs
; * etc/ORG-NEWS: Fix typo.
79f68597abade27939397e0c2a50eec833e64daf
Robert Pluim
Fri Sep 13 09:50:01 2024 +0200
2024-09-14 11:56:04 -04:00
Ihor Radchenko d51dc4aa29
org-toggle-inline-images-command: New command for C-c C-x C-v binding
* lisp/org.el (org-toggle-inline-images-command): New command to
toggle images.  Unlike the old `org-toggle-inline-image', it is more
flexible and default to toggling images at point/current entry.
* lisp/org-keys.el (org-mode-map): Bind C-c C-x C-v to the new
command.
* doc/org-manual.org (Images): Update the manual describing the new
command behaviour.
* etc/ORG-NEWS (=C-c C-x C-v= command toggling inline image display
has been reworked): Document the breaking change.

Link: https://list.orgmode.org/6461a84b.a70a0220.b6d36.5d00@mx.google.com/
2024-08-18 12:23:10 +02:00
Ihor Radchenko 6bf748e0d9
etc/ORG-NEWS: Add reference to undocumented feature added in Org 9.7 2024-08-18 12:09:04 +02:00
Ihor Radchenko 19440a8bc2
Merge branch 'bugfix' 2024-08-18 12:07:03 +02:00
Ihor Radchenko b128d2be81
etc/ORG-NEWS (Alignment of image previews can be customized): Add missing entry 2024-08-18 12:05:39 +02:00
Ihor Radchenko 86abaf6407
org-mode-flyspell-verify: Do not disable flyspell inside LOGBOOK drawers
* lisp/org-compat.el (org-mode-flyspell-verify): Remove LOGBOOK drawer
filter.  Not checking inside LOGBOOK drawers has no clear purpose.  I
also see no explanation in the git logs and mailing list archives, all
the way back to refactoring this function to use org-element API.
* etc/ORG-NEWS (Org mode no longer prevents =flyspell= from
spell-checking inside =LOGBOOK= drawers): Announce the breaking
change.

Reported-by: Morgan Willcock <morgan@ice9.digital>
Link: https://orgmode.org/list/87jzgpvdbk.fsf@ice9.digital
2024-08-11 17:29:24 +02:00
Ihor Radchenko 62b88d613e
ob-R, ob-julia: Obey babel working dir conventions with session
* lisp/ob-R.el (org-babel-R-initiate-session):
* lisp/ob-julia.el (org-babel-julia-initiate-session): Force using
`default-directory' as working directory for ESS sessions.
* etc/ORG-NEWS (~ob-R~ and ~ob-julia~ no longer use ESS settings for
working directory): Announce the breaking change.

Link: https://orgmode.org/list/871q4izpr4.fsf@localhost
2024-08-06 10:38:03 +02:00
Ihor Radchenko 9c98b21460
org-cancel-repeater: Cancel all the repeaters
* lisp/org.el (org-cancel-repeaters): Rename from
`org-cancel-repeater' (leaving old name as an alias).  Cancel all the
repeaters instead of just the repeater in the first active timestamp.
(org-todo): Use the new function name.
* etc/ORG-NEWS (~org-cancel-repeater~ now cancels all the repeaters
under inside entry): Announce the breaking change.

The old version failed to cancel repeaters except the one in the very
first active timestamp.  If the first timestsamp did not have a
repeaters, all other repeaters were ignored.

Since the original use case of this is -1 prefix argument in
`org-todo' with the intention to prevent switching back to TODO when
marking done, cancelling all the repeaters makes more sense.

Reported-by: Peter Solodov <solodov@gmail.com>
Link: https://orgmode.org/list/87r0b4duzo.fsf@localhost
2024-08-06 10:21:18 +02:00
Ihor Radchenko d3d84ff6b9
Merge branch 'bugfix' 2024-07-25 13:22:41 +02:00
Stefan Kangas 23b9316ef9 Backport commit a79966156 from Emacs
Standardize possessive apostrophe usage in manuals, docs, and comments
a79966156633ae1e49e3fef17ff7212c8f35a26f
Stefan Kangas
Thu Jul 25 03:35:18 2024 +0200
2024-07-24 22:19:52 -04:00
Stefan Kangas 934dec45b5 ; Fix typo in etc/ORG-NEWS (Bug#72186) 2024-07-20 15:24:28 -04:00
Stefan Kangas a97ea4f0b5 Backport commit a6cab228d from Emacs
; Fix typos
a6cab228d4d1a82a80eac81b057857a230eef0b5
Stefan Kangas
Thu Jul 18 11:46:50 2024 +0200
2024-07-20 15:24:27 -04:00
Ihor Radchenko 486ebe118b
org-refile: Push point to Org mark ring before jumping
* lisp/org-refile.el (org-refile):
(org-refile-goto-last-stored): Save position to the Org mark ring if
we are about to jump to a different position.
* etc/ORG-NEWS (~org-refile~ now saves current position to Org mark
ring when jumping to heading): Document the new feature.

Link: https://orgmode.org/list/CAJcAo8vYLJ3YGH0+nZs1rgtdq2iRKzJ8tuGxJKRD-XyEwEm4FA@mail.gmail.com
2024-07-13 15:30:30 +02:00
Hugo Heagren 50e34dde10
ox-beamer: Allow setting frame subtitle with headline property
* lisp/ox-beamer.el (org-beamer--format-frame): Allow a frame subtitle
to be specified in the BEAMER_SUBTITLE property.  If specified, put it
in the second non-optional argument to \begin{frame}.
* doc/org-manual.org (Frames and Blocks in Beamer): Document above
behaviour.
* etc/ORG-NEWS (Beamer export supports setting frame subtitles):
Document the new feature.
2024-07-10 16:00:31 +02:00
Ihor Radchenko e0924db3c5
orgtbl-to-generic: Retain special rows in code block table output
* lisp/org-table.el (orgtbl--skip):
(orgtbl--skipcols): New helper functions.
(orgtbl-to-generic): Use `org-export-as' machinery to setup table
export instead of duplicating ox.el internals.  Retain special rows in
tables when exporting to Org.  Org export is used by ob-core to format
the code block output and will thus retain special rows.
* testing/lisp/test-org-table.el (test-org-table/to-generic): Adjust
test to expect special rows to be exported.
* etc/ORG-NEWS (~orgtbl-to-generic~ retains special rows when
exporting to Org): Announce the breaking change.

Reported-by: Rudolf Adamkovič <rudolf@adamkovic.org>
Link: https://orgmode.org/list/87r0ch6q9h.fsf@localhost
2024-07-10 15:54:44 +02:00
Ihor Radchenko 90d4ae92eb
ox: New custom option to disable macro replacement
* lisp/ox.el (org-export-replace-macros): New custom option
controlling macro replacement.
(org-export--annotate-info): Honor it, except when processing inline
code block results and their {{{results...}}} macro.
* etc/ORG-NEWS (Allow disabling macro replacement during export):
Announce the new option.
* doc/org-manual.org (Macro Replacement):
(Summary of the export process): Document the new option.
2024-07-10 15:46:14 +02:00
Nate Nichols d38d53a178
ox-html: Add an ability to specify :html-head as a string or function
* lisp/ox-html.el (org-html-head):
(org-html-head-extra): Allow value to be a function.
(org-html-normalize-string-or-function): New helper function.
(org-html--build-head): Use the new helper to handle the function
value of :html-head and :html-head-extra export options.
* etc/ORG-NEWS:
(~org-html-head~ and ~org-html-head-extra~ can now be specified as
functions): Document the new feature.
* testing/lisp/test-ox-html.el (ox-html/test-normalize-string-or-function):
New test.

TINYCHANGE
2024-07-07 17:24:01 +02:00
Ihor Radchenko bcb88fcac8
Merge branch 'bugfix' 2024-07-07 08:26:23 +02:00
Ihor Radchenko 06eb69809a
etc/ORG-NEWS: Mention issues with yank-media on Mac and Windows
* etc/ORG-NEWS (Images and files in clipboard can be pasted): Mention
that Mac and Windows are not yet fully supported by Emacs'
yank-media library.
2024-07-04 08:37:18 +02:00
Ihor Radchenko d6c0bbe280
Merge branch 'bugfix' 2024-06-28 11:42:40 +02:00
Kyle Meyer a091ca9e66 Merge branch 'km/from-emacs-30' into bugfix 2024-06-27 23:14:54 -04:00
Stefan Kangas fa7d7ec3bd Backport commit fb11294d4 from Emacs
; Fix typos
fb11294d4156a4be45080ff286a8ee0d5a3ede9b
Stefan Kangas
Sun Jun 23 16:40:06 2024 +0200
2024-06-27 23:13:49 -04:00
Daniel M German 553d9b5798
ob-sqlite: Add ability to open a database in readonly mode
* lisp/ob-sqlite.el (org-babel-header-args:sqlite):
(org-babel-execute:sqlite): Add new header argument :readonly.
* etc/ORG-NEWS (ob-sqlite: Added ability to open a database in
readonly mode): Announce the new header argument.
2024-06-25 12:53:52 +02:00
Ihor Radchenko 39272e2165
Merge branch 'bugfix' 2024-06-22 17:59:26 +02:00
Ihor Radchenko e6de840889
etc/ORG-NEWS: Announce security fix
* etc/ORG-NEWS (Arbitrary shell commands are no longer run when
turning on Org mode):
2024-06-22 17:53:17 +02:00
Andras Simonyi 782f6c33be oc-csl: New custom option `org-cite-csl-bibtex-titles-to-sentence-case'
* lisp/oc-csl.el (org-cite-csl-bibtex-titles-to-sentence-case): New
variable.
(org-cite-csl--processor): Create the itemgetter using the new option.
* etc/ORG-NEWS (New option
~org-cite-csl-bibtex-titles-to-sentence-case~): Announce the change.
2024-06-20 07:41:56 +02:00
Ihor Radchenko 3271d7d9f8
etc/ORG-NEWS: Fix headline level for feature announcement 2024-06-18 14:34:02 +02:00
Nafiz Islam 5265153fc5
org-capture-templates: Allow headline/olp target to be function or symbol
* doc/org-manual.org: Add target spec format for function and symbol
for headline and olp.
* etc/ORG-NEWS: Announce the updated options for
`org-capture-templates'.
* lisp/org-capture.el (org-capture-templates): Update customization
type for `file+headline', `file+olp', and `file+olp+datetree' targets,
and update docstring.
(org-capture-expand-headline): Define a new function that computes
headline string from target spec.
(org-capture-expand-olp): Define a new function that computes olp list
from target spec.
(org-capture-set-target-location): Use `org-capture-expand-headline'
to expand headline, and use `org-capture-expand-olp' to expand outline
path.
* testing/lisp/test-org-capture.el (test-org-capture/entry): Add tests
for at most three different kinds of target for `file+headline',
`file+olp', and `file+olp+datetree'.
(test-org-capture/org-capture-expand-olp): Add tests for
`org-capture-expand-olp'.
2024-06-18 14:33:55 +02:00
Ihor Radchenko 7393803716
Merge branch 'bugfix' 2024-06-17 17:35:28 +02:00
Kyle Meyer d0b1729ad5 Merge branch 'km/from-emacs-master' into bugfix 2024-06-15 13:24:08 -04:00
Stefan Kangas 8a82a06bec ORG-NEWS: Backport commit 77d0eed74 from Emacs
; Fix typos
77d0eed74e1d934e28f364cb3adb06365e71335e
Stefan Kangas
Mon Jun 10 00:40:26 2024 +0200

[km] This should have been included with 2a6a0480d.
2024-06-15 13:22:28 -04:00
Ihor Radchenko 73da6beb50
org-link-plain-re: Improve heuristic regexp for plain link detection
* 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
2024-06-14 16:03:05 +02:00
Ihor Radchenko 1686b6f3ba
org-attach-dir-from-id: Search existing attachments for symlinks
* 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
2024-06-14 13:40:42 +02:00
Ihor Radchenko ea4a690c1a
org--confirm-resource-safe: Throw an error when non-interactive
* 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.
2024-06-11 12:09:38 +02:00
Ihor Radchenko 9427bdedcc
Merge branch 'bugfix' 2024-06-09 11:23:12 +02:00
Ihor Radchenko 0c06694666
etc/ORG-NEWS: Announce removal of searching inside hidden parts of links 2024-06-09 11:21:48 +02:00
Ihor Radchenko 453cb0883a
Merge branch 'bugfix' 2024-06-06 17:23:11 +02:00
Ihor Radchenko 266bd1c4a0
org-capture-templates: New placeholder to refer to %^{prompt}X answers
* lisp/org-capture.el (org-capture-fill-template): Support new
placeholder %\*N to insert answers to all prompts - %^{prompt} and
%^{prompt}X.
(org-capture-templates):
* etc/ORG-NEWS (New =%\*N= placeholder in ~org-capture-templates~):
* doc/org-manual.org (Template expansion): Document the new
placeholder.

Link: https://orgmode.org/list/87le40puvb.fsf@gmail.com
2024-06-06 17:17:38 +02:00
Ihor Radchenko e6c5f25c13
org-babel-exp-code: Fix exporting src blocks with :var arguments
* lisp/ob-exp.el (org-babel-exp-code): Do not use resolved argument
values when formatting the code block.  Resolved argument values may
contain awkward data like full (long) table contents, various Elisp
data (including non-printable), etc.  Simply using verbatim src block
parameters as they appear in the original buffer is more reliable.
(org-babel-exp-inline-code-template):
(org-babel-exp-code-template): Update docstrings, drop %flags
placeholder, which is no longer supported using the current src block
syntax.
* etc/ORG-NEWS (=ox-org= preserves header arguments in src blocks):
Drop "non-default" when explaining how header arguments are formatted.
We cannot know which values are default and which not without
resolving the values - something we cannot do as it turned out.
* testing/lisp/test-ob-exp.el (ob-exp/exports-inline-code):
(ob-export/export-src-block-with-flags):
(ob-export/body-with-coderef): Update the tests.
2024-06-06 14:44:01 +02:00
bruno 55e8068d69
ol: Add support for shortdoc link type
* lisp/ol.el (org-link--open-shortdoc org-link--store-shortdoc)
(org-link--complete-shortdoc): Add support for storing and inserting links
to `shortdoc' documentation groups for Emacs Lisp functions.
* doc/org-manual.org (External Links): Add shortdoc link type
documentation.
* etc/ORG-NEWS (=ol.el=: Support for =shortdoc= link type): Document
the new feature.
2024-06-06 13:50:27 +02:00
Ihor Radchenko c426f49364
org-babel-latex-process-alist: Use latemk or run latex trice
* lisp/ob-latex.el (org-babel-latex-process-alist): Change the default
value to using latexmk/latex x 3, so that references are resolved.
* etc/ORG-NEWS (The default value of
~org-babel-latex-process-alist~...): Announce the change.

Link: https://list.orgmode.org/orgmode/87cyretut7.fsf@localhost/
2024-06-03 16:32:02 +02:00
Ihor Radchenko 71077dedc8
Merge branch 'bugfix' 2024-06-03 11:11:13 +02:00
Ihor Radchenko 9ad3360d76
etc/ORG-NEWS: Fix unintentional list markup
* etc/ORG-NEWS (Images and files in clipboard can be pasted): More
"29." away from beginning of line.  It was parsed as list.
2024-06-01 20:31:17 +02:00