1
0
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-11-23 07:18:53 +00:00
Commit Graph

19959 Commits

Author SHA1 Message Date
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
0b1a4bfc48
Merge branch 'bugfix' 2024-09-22 11:47:53 +02:00
Benjamin McMillan
2a85367ea8
lisp/org.el: Add back "export" blocks to natively fontified blocks
* lisp/org.el (org-fontify-meta-lines-and-blocks-1): Add "export" to
list of block types that are fontified if `org-src-fontify-natively'
is non-nil.  This brings back the previous undocumented behaviour.

Link: https://list.orgmode.org/87h6aejf17.fsf@localhost/
TINYCHANGE
2024-09-22 11:43:55 +02:00
Lukas Rudd Andersen
a8790ed09e
lisp/org-persist.el: Fix regression missed by 7fd8099
* lisp/org-persist.el: (org-persist--find-index): Fix regression that
  makes the function return nil when container in COLLECTION is not a
  list of containers.

TINYCHANGE
2024-09-22 11:06:41 +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
Pedro A. Aranda
cdcde091b9
ox-latex: Suggest xcolor instead of color
* lisp/ox-latex.el (org-latex-src-block-backend): In the docstring,
suggest xcolor instead of color.  Color might be less reliable.  See
https://tex.stackexchange.com/questions/89763/when-to-use-the-xcolor-package-instead-of-the-color-package
2024-09-15 16:10:59 +02:00
Rudolf Adamkovič
4829bacffe
ox-texinfo: Fix automatic @ref titles
* lisp/ox-texinfo.el (org-texinfo--@ref): Fix an incorrect assumption
that Texinfo uses node names for automatic link text.  It does not.
Instead, it uses the corresponding section title.  For example, if a
node is named `a' its section is named `A', the Org link to the node
`a' written as `[[...][xxx]]' ends up being rendered as "A", which
means the link description the Org user provided is ignored.
2024-09-15 14:08:19 +02:00
Slawomir Grochowski
07dd3bcae6
org-columns-compile-format: Fix regexp
* lisp/org-colview.el (org-columns-compile-format): Refactor
string-based regexp to `rx' form.  Fix regexp: When an empty
parentheses () is in the column format string then the regexp
can't capture the operator which is in curly brackets {}.
(org-columns-new): prevent adding empty parantheses '()' to 'column
format string' when 'column title' is empty.
* testing/lisp.test-org-colview.el (test-org-colview/compile-format):
New test case: check if operator will be captured when there is
empty parantheses '()' in 'column format string'.

Reported-by: Sławomir Grochowski <slawomir.grochowski@gmail.com>
Link: https://list.orgmode.org/orgmode/877ccczt83.fsf@gmail.com/
2024-08-31 15:31:13 +02:00
Ihor Radchenko
6a5d0ed342
Update version number for the 9.7.11 release 2024-08-23 10:20:21 +02:00
Ihor Radchenko
34979457f9
lisp/ox.el (org-export-options-alist): Improve docstring
Users often confuse alist key and the first element of the alist value
- KEYWORD in this alist.  Make the distinction more clear in the
docstring.

Link: https://list.orgmode.org/orgmode/87h6biyrd7.fsf@localhost/
2024-08-22 14:53:49 +02:00
Ihor Radchenko
7a3fc3d78b
Merge branch 'bugfix' 2024-08-22 14:37:15 +02:00
Ihor Radchenko
8fd6cc9020
lisp/ob-gnuplot.el: Fix cyclic dependency
* lisp/ob-gnuplot.el (org-babel-gnuplot-table-to-data): Load ox-ascii
dynamically.

Reported-by: Donald Hunter <donald@sealgair.com>
Link: https://orgmode.org/list/20240821112055.16184-1-donald@sealgair.com
2024-08-22 14:36:51 +02: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
5ebd973e09
Update version number for the 9.7.10 release 2024-08-16 08:53:10 +02:00
Jens Lechtenbörger
38d1bc67b2
lisp/ox-publish.el: Use publish time in publish cache
* lisp/ox-publish.el (org-publish-update-timestamp): Store current
time in publish cache, instead of modification time of source file.
(org-publish-cache-file-needs-publishing): Return t, if source or an
included file was modified more recently.

Previously, a source file including a newer file was published again
and again.  Now, publishing only happens if either source or an
included file changed since the last publishing.
2024-08-15 20:24:42 +02:00
Ihor Radchenko
50be048ad0
org-display-inline-image--width: Fix regexp
* lisp/org.el (org-display-inline-image--width): Ignore non-pixel
specifications like :width 4in (previously treated as 4 pixels).  Do
not ignore fractional percent values like :width 30.5%.
2024-08-15 19:22:20 +02:00
Ihor Radchenko
482bc31565
org-babel-demarcate-block: Fix keeping BEGIN_SRC/END_SRC case
* lisp/ob-core.el (org-babel-demarcate-block): Keep case in
 #+BEGIN_SRC and #+END_SRC keywords splitting src block.
* testing/lisp/test-ob.el (test-ob/keep-case): New test.

Reported-by: Rudolf Adamkovič <rudolf@adamkovic.org>
Link: https://orgmode.org/list/m2y152f8s3.fsf@adamkovic.org
2024-08-14 11:02:18 +02:00
Ihor Radchenko
a43a2bef13
Merge branch 'bugfix' 2024-08-13 20:11:52 +02:00
Ihor Radchenko
e52858fdb4
lisp/ox.el: Fix handling attachment: links
* lisp/ox.el (org-attach): Load org-attach.el.  Otherwise, export may
fail when expanding attachment: links.

Reported-by: Sébastien Gendre <seb@k-7.ch>
Link: https://orgmode.org/list/87o75y3ki8.fsf@k-7.ch
2024-08-13 20:07:47 +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
66f2f5ce43
Merge branch 'bugfix' 2024-08-10 14:47:52 +02:00
Ihor Radchenko
f9351456e7
org-persist-write:index: Disable pretty-printing
* lisp/org-persist.el (org-persist-write:index): Disable
pretty-printing when writing index.  This is simply too slow once
index reaches ~1000 items.  `pp' is slow.  See bug#58687.
(org-persist--write-elisp-file): Add FIXME explaining that using PP
argument is probably not a good idea.

Reported-by: Visuwesh <visuweshm@gmail.com>
Link: https://orgmode.org/list/87r0axvu7y.fsf@gmail.com
2024-08-10 14:44:08 +02:00
Ihor Radchenko
54af540af6
org-babel-sh-prompt: Fix Emacs 27 CI failures
* lisp/ob-shell.el (org-babel-sh-prompt): Use the old prompt for Emacs
27.  CI fails on Debian + Emacs 27 when running tests, even though
Emacs 27 tests do pass on my system.  Play it safe and fall back to
the old prompt for Emacs 27, to avoid possible breakage.  Emacs 27
support is going to be dropped soon anyway, after Emacs 30 release.
2024-08-06 20:11:45 +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
7fd80991c3
org-persist: Fix regression after 95f77669e0
* lisp/org-persist.el (org-persist--find-index):
(org-persist--add-to-index):
(org-persist--remove-from-index): Do not assume that every container
is a list of other containers.
2024-08-05 19:19:43 +02:00
Ihor Radchenko
b62f1b142c
org-babel-sh-prompt: Use cuneiform "break" 𒆸 symbol as unique prompt
* lisp/ob-shell.el (org-babel-sh-prompt): Change the value of unique
prompt from long prompt string to a much shorter, but still unlikely
to appear in output, single-char prompt.

Cuneiform because Sumerian, Babylon, Tower ob Babel :)
2024-08-05 17:03:00 +02:00
Ihor Radchenko
149973da2f
org-babel-sh-initiate-session: Fix setting non-standard prompt
* lisp/ob-shell.el (org-babel-sh-initiate-session): Set
`comint-prompt-regexp' early, _before_ evaluating prompt change.  This
way, we make sure that comint is not stuck trying to search for the
old prompt if the new prompt no longer matches `comint-prompt-regexp'.
2024-08-05 17:02:59 +02:00
Ihor Radchenko
76c5f2238f
ob-shell: Arrange unique prompt in manually started shell buffers
* lisp/ob-shell.el (org-babel-sh--prompt-initialized): New variable
flag that indicates whether ob-shell changed the prompt in current
comint buffer.
(org-babel-sh-initiate-session): Set unique prompt in existing
sessions if it is not yet done.

Link: https://orgmode.org/list/87o782gx7o.fsf@localhost
2024-08-05 17:02:58 +02:00
Ihor Radchenko
5ebe761ae4
Rename org-babel-comint-prompt-regexp-old' to ...-fallback'
* lisp/ob-comint.el (org-babel-comint-prompt-regexp-fallback): Rename
to more accurate name.  Leave the old name as an alias.
(org-babel-comint--set-fallback-prompt): Use the new name.
(org-babel-comint-with-output):
(org-babel-comint-wait-for-output):
* lisp/ob-clojure.el (ob-clojure-eval-with-inf-clojure):
* lisp/ob-haskell.el (org-babel-interpret-haskell):
* lisp/ob-ruby.el (org-babel-ruby-initiate-session):
* lisp/ob-shell.el (org-babel-sh-initiate-session):
2024-08-05 17:02:56 +02:00
Ihor Radchenko
b7026cf3e8
lisp/ox-html.el (org-html-fontify-code): Improve warning text
The old text may be confusing because it sounds like an error, except
that it is not.  Make it more clear and also mention relevant
customization.

Reported-by: Angelo Graziosi <angelo.g0@libero.it>
Link: https://yhetil.org/emacs-devel/cd5649e9-0e4f-41e9-8c2f-1a060d721c63@libero.it
2024-08-04 20:42:35 +02:00
Ihor Radchenko
433fbdbc63
org-agenda-write: Remove redundant `set-buffer'
* lisp/org-agenda.el (org-agenda-write): Drop `set-buffer' call at the
end.  It does nothing since the rest of the code is wrapped in
`save-excursion' and the aim of the `set-buffer' is to switch to the
agenda buffer we just saved.  Ignore AGENDA-BUFNAME argument - it is
unused now.  Update the docstring, removing the mention of what
appears to be the now-ignored argument.
(org--batch-store-agenda-views): Update the caller.  Passing current
agenda buffer name is no longer necessary.  We set it before the call
anyway.

Reported-by: Sławomir Grochowski <slawomir.grochowski@gmail.com>
Link: https://orgmode.org/list/87ed7dwygq.fsf@gmail.com
2024-07-28 20:49:25 +02:00
Ihor Radchenko
233a0ced97
Update version number for the 9.7.9 release 2024-07-26 09:19:46 +02:00
Ihor Radchenko
d3d84ff6b9
Merge branch 'bugfix' 2024-07-25 13:22:41 +02:00
Ihor Radchenko
ec63072247
org--image-yank-media-handler: Suppress coding system auto-detection
* lisp/org.el (org--image-yank-media-handler): Prevent Emacs from
trying to detect coding system for image data (and sometimes asking
user interactively).

Reported-by: Daan Ro <daanturo@gmail.com>
Link: https://orgmode.org/list/11A5BD1B-98F2-4B53-A61C-A93A367EB321@getmailspring.com
2024-07-25 13:15:14 +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
Ihor Radchenko
2a4fdffac1
org-plot/gnuplot-to-data: Do not assume that `orgtbl-to-generic' preserves buffer
* lisp/org-plot.el (org-plot-timestamp-fmt): Add default value and the docstring.
(org-plot/gnuplot-to-data): `let'-bind `org-plot-timestamp-fmt'
instead of setting it in current buffer.

Reported-by: Chris Keschnat <chris@catsu.it>
Link: https://orgmode.org/list/87r0bje1vs.fsf@catsu.it
2024-07-24 12:32:32 +02:00
Ihor Radchenko
190f472227
org-string-width: Round fractional widths
* lisp/org-macs.el (org-string-width): Fix zero-width
spaces (displayed as 1 pixel) being treated and full-width characters.
* testing/lisp/test-org-macs.el (test-org/string-width): Add new test.

Reported-by: Daniel <daniel@algebra20.de>
Link: https://orgmode.org/list/877cddbfkb.fsf@algebra20.de
2024-07-22 19:59:58 +02:00
Kyle Meyer
4dfe3db762 Merge branch 'km/from-emacs-30' into bugfix 2024-07-20 15:24:58 -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
7f2ce8272c
Update version number for the 9.7.8 release 2024-07-19 10:28:00 +02:00
Ihor Radchenko
f398724bd5
Merge branch 'bugfix' 2024-07-17 16:11:14 +02:00
Ihor Radchenko
e269942a35
org-indent-line: Fix indentation at blank lines at the beginning of buffer
* lisp/org.el (org--get-expected-indentation): Allow ELEMENT to be nil.
(org-indent-line): Account for element at point possibly being
nil (`org-element-at-point' returns nil at blank lines at the
beginning of buffer).

Reported-by: Jens Schmidt <jschmidt4gnu@vodafonemail.de>
Link: https://orgmode.org/list/87ed7tb4ja.fsf@sappc2.mail-host-address-is-not-set
2024-07-17 16:10:26 +02:00
Ihor Radchenko
2452edc3e8
org-lint-clock-syntax: Fix false positive when clock line is indented
* lisp/org-lint.el (org-lint-clock-syntax): Ignore leading indentation
of the clock lines.
2024-07-17 14:13:36 +02:00
stardiviner
f2141541b4
ob-core: Unify Org Babel related buffer names using constant variable
* lisp/ob-core.el (org-babel-results-buffer-name): Define constant
variable for buffer name.
(org-babel-open-src-block-result): Use the
`org-babel-results-buffer-name'.
* lisp/ob-eval.el (org-babel-error-buffer-name): Add docstring.
* testing/lisp/test-ob-octave.el (org-babel-error-buffer-name):
(ob-octave/graphics-file):
(ob-octave/graphics-file-session):
(ob-octave/graphics-file-space):
* testing/lisp/test-ob-shell.el (org-babel-error-buffer-name):
(test-ob-shell/dont-error-on-babel-error):
(test-ob-shell/standard-output-after-failure):
(test-ob-shell/error-output-after-success):
(test-ob-shell/error-output-after-failure):
(test-ob-shell/error-output-after-failure-multiple):
(test-ob-shell/exit-code):
(test-ob-shell/exit-code-multiple): Use variable for buffer names.
2024-07-16 19:09:45 +02:00
Ihor Radchenko
240eb969e4
ox: Allow anonymous parent backends
* lisp/ox.el (org-export-get-all-options):
(org-export-get-all-filters): Do not demand parent chain to be from
registered backends.  Allow anonymous parents as well.

This is necessary because `orgtbl-to-generic' now uses anonymous
backend via normal ox.el machinery and ob-gnuplot layers an anonymous
backend on top (which is not invalid, given that `orgtbl-to-generic'
did work with this setup in the past).
2024-07-15 09:06:25 +02:00
Kyle Meyer
f308d33d2f Merge branch 'km/from-emacs-30' into bugfix 2024-07-14 12:21:33 -04:00
Stefan Kangas
e14969f629 Backport commit 6757f8e67 from Emacs
* lisp/ob-core.el:
* lisp/ob-exp.el:
* lisp/ob-lob.el:
* lisp/ob-plantuml.el (org-babel-execute:plantuml):
* lisp/ob-python.el (org-babel-python--command)
(org-babel-python-initiate-session-by-key)
(org-babel-python-initiate-session):
* lisp/ob-scheme.el (org-babel-scheme-make-session-name):
* lisp/ob-tangle.el (org-babel-find-file-noselect-refresh)
(org-babel-interpret-file-mode):
* lisp/ob.el:
* lisp/org-agenda.el (org-agenda-mouse-1-follows-link)
(org-agenda-start-with-archives-mode)
(org-agenda-previous-line):
* lisp/org-clock.el (org-clock-save, org-clock-load):
* lisp/org-element-ast.el (org-element-type-p):
* lisp/org-faces.el (org-cycle-level-faces):
* lisp/org-fold-core.el (org-fold-core--isearch-overlays):
* lisp/org-fold.el (org-fold--extend-changed-region):
* lisp/org-goto.el:
* lisp/org-habit.el (org-habit-show-all-today):
* lisp/org-inlinetask.el (org-inlinetask-in-task-p):
* lisp/org-macs.el (org-current-text-column):
* lisp/org-mobile.el (org-mobile-check-setup):
* lisp/org-mouse.el (org-mouse-bolp):
* lisp/org-refile.el (org-refile):
* lisp/org-src.el (org-src-do-key-sequence-at-code-block):
* lisp/org-table.el (orgtbl-after-send-table-hook)
(orgtbl-self-insert-command, orgtbl-to-orgtbl):
* lisp/org.el (org-read-date-popup-calendar, org-finish-function)
(org-occur-parameters, org-self-insert-command, org-ctrl-c-ctrl-c-hook)
(org-ctrl-c-ctrl-c-final-hook, org-submit-bug-report)
(org--single-lines-list-is-paragraph):
* lisp/ox-icalendar.el (org-icalendar--vtodo):
* lisp/ox-latex.el (org-latex-generate-engraved-preamble):
(org-latex-src--engrave-code):
* lisp/ox-publish.el (org-publish-project-alist):
* lisp/ox.el (org-export-data): Various checkdoc fixes.

Checkdoc fixes in Org Mode
6757f8e67d3bdfe338810fc26408a62e7839afe7
Stefan Kangas
Sun Jul 7 17:46:25 2024 +0200
2024-07-14 12:20:46 -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
Ihor Radchenko
f5c5e0d912
orgtbl-to-generic: Honor `org-export-filter-parse-tree-functions'
* lisp/org-table.el (orgtbl-to-generic): Before e0924db3c,
`orgtbl-to-generic' did honor the filter functions for AST
specifically (but no other).  Keep it so.
2024-07-13 15:21:07 +02:00
Ihor Radchenko
1ee08091a6
Update version number for the 9.7.7 release 2024-07-12 21:02:03 +02:00
Ihor Radchenko
4f6aab244f
Merge branch 'bugfix' 2024-07-12 13:13:40 +02:00
Ihor Radchenko
1b4ffe868e
lisp/org.el (org-insert-subheading): Fix error when at `point-max'
* lisp/org.el (org-insert-subheading): Make sure that `forward-char'
never happens at the end of buffer.  Also, only move char when we are
at actual heading/item - that's the only case when we need to adjust
point position to avoid `org-insert-heading' inserting above.
2024-07-12 13:11:05 +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
Ihor Radchenko
f7ef4071b2
org-list-struct-apply-struct: Fix item contents breaking out of the item
* lisp/org-list.el (org-list-struct-apply-struct): Make sure that we
never shift item contents to or before the item indentation.
* testing/lisp/test-org-list.el (test-org-list/cycle-bullet): Add new
test.

Reported-by: vitalij@gmx.com
Link: https://orgmode.org/list/871q42qbn7.fsf@gmx.com
2024-07-10 15:39:26 +02:00
Ihor Radchenko
2d9e70b808
org-edit-src-*: When writing back, do not displace point in undo list
* lisp/org-src.el (org-edit-src-save):
(org-edit-src-exit): Avoid point movement that is not shielded by
`save-excursion' and thus recorded in the `buffer-undo-list'.  If we
are not careful, M-x undo may put point to the positions we use
temporarily in the code, which is not expected.

Reported-by: the_wurfkreuz <the_wurfkreuz@proton.me>
Link: https://orgmode.org/list/XF_7mLNCUN8XKtnd7G-NUoAF5Vq0DDafaDdF0v53eFlhQ35N-H3bPA0VkYyDrbEWE-0PEQg8iiyB7NatUtvPEQe6SQyJaTE5vW0CwoUKzqs=@proton.me
2024-07-09 20:48:28 +02:00
Ihor Radchenko
69ef1832bb
Merge branch 'bugfix' 2024-07-09 18:07:27 +02:00
Ihor Radchenko
022bb471c1
org-indent-line: Fix indentation inside src blocks with `electric-indent-mode'
* lisp/org.el (org-indent-line): Use `indent-according-to-mode' to
indent in src block's major mode.  Using `indent-line-function' fails
when `electric-indent-mode' wants to suppress <tab> indentation.
* testing/lisp/test-org.el (test-org/with-electric-indent): Add test.

Reported-by: the_wurfkreuz <the_wurfkreuz@proton.me>
Link: https://orgmode.org/list/5O9VMGb6WRaqeHR5_NXTb832Z2Lek_5L40YPDA52-S3kPwGYJspI8kLWaGtuq3DXyhtHpj1J7jTIXb39RX9BtCa2ecrWHjijZqI8QAD742U=@proton.me
2024-07-09 18:05:41 +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
db46706bec
org-agenda-category-icon-alist: Improve docstirng
* lisp/org-agenda.el (org-agenda-category-icon-alist): Refer to
`org-agenda-prefix-format' in the docstring, as it is what controls
whether the icons are rendered at all.
2024-07-07 08:25:33 +02:00
Kyle Meyer
4617d52fad Merge branch 'km/from-emacs-30' into bugfix 2024-07-01 22:33:46 -04:00
Stefan Kangas
5ec1ec3337 Backport commit 45a20d781 from Emacs
; Fix typos in symbols
45a20d781a9b00212609bf0e338bd6b1cc9ea68a
Stefan Kangas
Sat Jun 29 17:29:38 2024 +0200
2024-07-01 22:33:10 -04:00
Ihor Radchenko
571f1ce0db
Fix typo in e377f3da5
* lisp/org-persist.el (org-persist--find-index): Provide argument to
`org-persist-collection-let' macro.
2024-06-30 17:22:33 +02:00
Ihor Radchenko
78846b2ae0
Merge branch 'bugfix' 2024-06-30 11:41:48 +02:00
Ihor Radchenko
83fe95d2ee
org-babel-insert-result: Improve docstring
* lisp/ob-core.el (org-babel-insert-result): Explain that
RESULT-PARAMS is a list.  Clarify the treatment of INFO.  Fix
incorrect :file parameters that is actually not used.  Instead,
document :file-desc parameter that is being used.

Reported-by: Stefan Kangas <stefankangas@gmail.com>
Link: https://orgmode.org/list/871q4fzx0k.fsf@localhost
2024-06-30 11:40:17 +02:00
Ihor Radchenko
95f77669e0
org-persist: Fix loading data with non-matching version
* lisp/org-persist.el (org-persist--find-index): Only match index
entries that contain _all_ the components of the given COLLECTION.
For example, when searching for
`((elisp org-element--cache) (version ,org-element-cache-version))
container, make sure that the returned value match both "elisp" and
"version" containers.
2024-06-29 13:07:08 +02:00
Ihor Radchenko
e377f3da51
lisp/org-persist.el (org-persist--normalize-associated): Fix typos
Reported-by: Rudolf Adamkovič <rudolf@adamkovic.org>
Link: https://list.orgmode.org/orgmode/m2a5j59qi0.fsf@adamkovic.org/
2024-06-28 17:29:40 +02:00
Ihor Radchenko
d6c0bbe280
Merge branch 'bugfix' 2024-06-28 11:42:40 +02:00
Ihor Radchenko
7a45270b11
Update version number for the 9.7.6 release 2024-06-28 11:40:03 +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
Ihor Radchenko
4077e9e45b Backport commit c645e1d82 from Emacs
org-link-expand-abbrev: Do not evaluate arbitrary unsafe Elisp code
c645e1d8205f0f0663ec4a2d27575b238c646c7c
Ihor Radchenko
Sat Jun 22 00:54:36 2024 +0200

[ km: This was independently covered on the bugfix branch with
  f4cc61636.  I'm applying it here too for bookkeeping/traceability
  purposes. ]
2024-06-27 23:13:49 -04:00
Stefan Kangas
b72871ab6a Backport commit a7dff8c53 from Emacs
* lisp/ob-lua.el: Minor doc fixes.

a7dff8c53dde18c703f470cde9ad033cffe8c766
Stefan Kangas
Tue Jun 18 21:27:51 2024 +0200
2024-06-27 23:13:47 -04:00
Stefan Kangas
5d7218ceff Backport commit c0eefebab from Emacs
; Fix typos
c0eefebabfee011f0ec7631d055e482e4965a24d
Stefan Kangas
Sun Jun 16 22:38:26 2024 +0200
2024-06-27 22:47:14 -04:00
Ihor Radchenko
b64dbd838f
org-babel-sh-evaluate: Always provide shebang in script files
* lisp/ob-shell.el (org-babel-sh-evaluate): When running src block as
script file, make sure that shebang is always added on top.  This is
to prevent <shell> <script> command in shells like dash form using
/bin/sh to evaluate scripts without shebang.  (In contrast with bash
that uses itself).  Add comment highlighting that
`with-connetion-local-variables' sets `shell-file-name' and
`shell-command-switch' as necessary.
*
testing/lisp/test-ob-shell.el (test-ob-shell/remote-with-stdin-or-cmdline):
Add new test.

Reported-by: Max Nikulin <manikulin@gmail.com>
Link: https://list.orgmode.org/orgmode/v0an63$3n2$1@ciao.gmane.io/
2024-06-27 15:07:19 +02:00
Ihor Radchenko
1c7b3ed26b
ob-shell: Pass :cmdline arguments consistently regardless of :shebang
* lisp/ob-shell.el (org-babel-sh-evaluate): When invoking script file
generated from the code block, consistently use
<shell-name> -c <script-file> <cmdline-args> command line, even when
:shebang is header argument is provided.  The previous approach with
<script-file> <cmdline-args> call caused differences in how shell
parsed the provided command line arguments.
* testing/lisp/test-ob-shell.el (test-ob-shell/cmdline): New test.

Reported-by: Max Nikulin <manikulin@gmail.com>
Link: https://orgmode.org/list/18f01342a2f.124ad27612732529.8693431365849276517@excalamus.com
2024-06-27 14:17:03 +02:00
Ihor Radchenko
9f6c29815d
Merge branch 'bugfix' 2024-06-27 12:11:10 +02:00
Ihor Radchenko
5ffb2675f5
org-persist: Avoid interactive query for coding system when computing hash
* lisp/org-persist.el (org-persist--normalize-associated): Force
'emacs-internal coding system when computing buffer contents hash.

Reported-by: Eli Zaretskii <eliz@gnu.org>
Link: https://orgmode.org/list/86jzia68ih.fsf@gnu.org
2024-06-27 12:07:29 +02:00
Ihor Radchenko
8a4a3ecb14
Merge branch 'bugfix' 2024-06-27 11:53:49 +02:00
Ihor Radchenko
14e8a68a67
org--collect-keywords-1: Fix when global `tab-width' is not 8
* lisp/org.el (org--collect-keywords-1): When faking that `org-mode'
is loaded, make sure that we set correct `tab-width' for the parser to
work.

Reported-by: kazark <kazark@zoho.com>
Link: https://orgmode.org/list/19056b6b712.b56dc3e1403727.546293949229584581@zoho.com
2024-06-27 11:49:21 +02:00
Ihor Radchenko
e4250780ae
Merge branch 'bugfix' 2024-06-26 15:00:07 +02:00
Ihor Radchenko
498fd25d25
ob-R, ob-python, ob-shell: Fix async indicator regexps
* lisp/ob-R.el (ob-session-async-org-babel-R-evaluate-session):
* lisp/ob-python.el (org-babel-python-async-evaluate-session):
* lisp/ob-shell.el (org-babel-sh-evaluate): Make regexps stricter,
matching exactly for what we put there.  Previous regexps were not
always matching file names with underscores.

Reported-by: Sam Crawford <sam@crawf.uk>
Link: https://orgmode.org/list/h6c_ta-utc-ugGl4Bq1XXJpXcpXlm_rblFIGJKMH0xiPc-NnJsuVe2z8atXGNcsBlJiR9c24bqLyXFX3GO0tiWtyTUzXMJA81wRIIB-DQfo=@crawf.uk
2024-06-26 14:59:47 +02: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
Matthias Hetzenberger
bd16944e1b
org-babel-merge-params: Rename plists to alists
* lisp/ob-core.el (org-babel-merge-params): Rename PLIST(S)
variables/args to ALIST(S).

TINYCHANGE
2024-06-23 11:11:12 +02:00
Ihor Radchenko
39272e2165
Merge branch 'bugfix' 2024-06-22 17:59:26 +02:00
Ihor Radchenko
eafa479069
Update version number for the 9.7.5 release 2024-06-22 17:53:19 +02:00
Ihor Radchenko
f4cc616369
org-link-expand-abbrev: Do not evaluate arbitrary unsafe Elisp code
* lisp/ol.el (org-link-expand-abbrev): Refuse expanding %(...) link
abbrevs that specify unsafe function.  Instead, display a warning, and
do not expand the abbrev.  Clear all the text properties from the
returned link, to avoid any potential vulnerabilities caused by
properties that may contain arbitrary Elisp.
2024-06-22 16:32:33 +02:00
Ihor Radchenko
6cada29c08
org-link-plain-re: Do not allow spaces inside URL
* lisp/ol.el (org-link-make-regexps): Improve plain URL regexp.
Prohibit all kinds of spaces.

Suggested-by: Max Nikulin <manikulin@gmail.com>
Link: https://orgmode.org/list/v516i1$kuv$1@ciao.gmane.io
2024-06-22 15:35:47 +02:00
Ihor Radchenko
4c5132b9f1
Fix parallel execution of Makefiles
* lisp/Makefile (.NOTPARALLEL):
* mk/targets.mk (.NOTPARALLEL): Do not fiddle with explicit
.NOTPARALLEL.  Given that we provide correct dependencies, parallel
execution should work, and it does work.
2024-06-20 18:27:04 +02:00
Ihor Radchenko
77403e376a
Revert "mk: Allow parallel execution"
This reverts commit 71fbe92c2e.

Parallel make still does not work.
2024-06-20 18:11:18 +02:00
Al Haji-Ali
a4ff518a2e
org-refile-get-location: Fix outline path to a symlink of current buffer
* lisp/org-refile.el (org-refile-get-location): When current buffer
file is a symlink to refile location, do not append the file name to
the outline path, just as we do when current buffer is the same as
refile location file.

TINYCHANGE
2024-06-20 16:48:28 +02:00
Ihor Radchenko
9f4f7338d7
org-element-timestamp-parser: Fix regexp
* lisp/org-element.el (org-element--timestamp-regexp): Do not match
malformed timestamps like:

<202-07-10 .+1d>

`org-ts-regexp-both' already covers the removed part of the regexp.
It appears that the problematic regexp is coming from a copy-paste from
`org-agenda-get-timestamps' where the inaccurate regexp is used to
search timestamps with repeaters in conjunction to searching for exact
agenda dates.  In `org-agenda-get-timestamps', inaccuracy is not a
problem because proper matching against `org-ts-regexp-both' is
performed later, simply skipping non-timestamps.

Reported-by: Platon Pronko <platon7pronko@gmail.com>
Link: https://orgmode.org/list/6000e3bf-f95f-44fd-b321-cf44acd5c485@gmail.com
2024-06-20 16:26:37 +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
Morgan Smith
fc0fb90b67
; fix typos
* doc/org-manual.org: Add missing '~'.
* lisp/org-element-ast.el (org-element-deferred): Fix typo in docstring.
* lisp/org-element.el (org-element-archive-tag,
org-element-drawer-re-nogroup, org-element--cache-log-message): Fix
typos in docstring.
(org-element--current-element, org-element--cache-find,
org-element-cache-map): Fix typos in comments.
2024-06-19 17:34:31 +02:00
Ihor Radchenko
a92951d0c6
org-link-expand-abbrev: Auto-disable custom abbrevs that fail to expand
* lisp/ol.el (org-link-expand-abbrev): When a custom link abbrev
function errs or returns non-string, show a warning and disable that
abbrev.
2024-06-19 17:14:02 +02:00
Visuwesh
fed19a934d
org-plot: Respect parameters given in `org-plot/preset-plot-types'
* org-plot.el (org-plot/gnuplot-script-preamble)
(org-plot/gnuplot-term-extra): Explain what "plot type" means.
(org-plot/preset-plot-types): Fix docstring and correct the lambda
argument order for the 'grid' plot type.
(org-plot/gnuplot): Merge the parameters given in
`org-plot/preset-plot-types' and the #+PLOT line to ensure the former
is respected everywhere.

Reported-by: Visuwesh <visuweshm@gmail.com>
Link: https://orgmode.org/list/87cypbjw50.fsf@gmail.com
2024-06-18 16:24:17 +02:00