Commit Graph

27028 Commits

Author SHA1 Message Date
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 c77e7f9c8a
* etc/ORG-NEWS (=UNNUMBERED= property ...): Add reference to the manual
Reported-by: Pedro Andres Aranda Gutierrez <paaguti@gmail.com>
Link: https://orgmode.org/list/CAO48Bk_7TMEzCt4GCQwjhmK5Q-MSVL6BkyV98o4SyfpA0qiv7Q@mail.gmail.com
2023-10-19 12:08:19 +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
Ihor Radchenko 8320e4794e
org-entry-get-with-inheritance: Fix inherited explicit nil value
* lisp/org.el (org-entry-get-with-inheritance): Do not ignore when
property has explicit "nil" value.
* testing/lisp/test-org.el (test-org/entry-get): Add test.
2023-10-18 11:37:13 +03:00
Ihor Radchenko 4f8c9f5ac5
* lisp/ol-man.el (org-man-export): Document all the function arguments
Rename FORMAT to more accurate BACKEND.
2023-10-17 14:00:01 +03:00
Ihor Radchenko b223a3cc75
org-num: Allow property inheritance for UNNUMBERED property
* lisp/org-num.el (org-num--skip-value): Honour property inheritance.
* etc/ORG-NEWS (=UNNUMBERED= property inheritance is now honored by
~org-num-mode~): Document the change.

Link: https://orgmode.org/list/249cd3af-c173-5ff2-df27-c32af3886329@gmail.com
2023-10-17 13:01:25 +03:00
Ihor Radchenko 24a0e7f8df
* lisp/ob-python.el: Fix misspelled constant name
(org-babel-default-header-args:python):
(org-babel-header-args:python): Rename.
`org-babel-header-args:python' is the correct name for extra
language-specific allowed header arguments.
2023-10-17 11:13:59 +03:00
Ihor Radchenko 9bbc21df84
Merge branch 'bugfix' 2023-10-16 16:05:05 +03:00
hrdl f5e41b4724
org-babel-result-names: Do not alter window configuration
* lisp/ob-core.el (org-babel-result-names): Do not change
  visibility of windows when called.

TINYCHANGE
2023-10-16 16:04:27 +03:00
Ihor Radchenko 678af9d502
test-org/auto-repeat-maybe: Fix Emacs <28 compatibility
* testing/lisp/test-org.el (test-org/auto-repeat-maybe): Do not use
`string-search', which is not yet available in Emacs <28.
2023-10-16 13:24:24 +03:00
Ihor Radchenko 16548593eb
* lisp/org-clock.el (org-clock-clocked-in-display): Fix docstring format
Make sure that the docstring has a single sentence as its first line.
2023-10-16 12:18:43 +03:00
Valentin Herrmann 23f751910e
org.el: Respect org-extend-today-until in timestamps with ++
* org.el (org-auto-repeat-maybe): Changed org-auto-repeat-maybe, so that
switching a repeating todo with a timestamp of the form <… ++…> respects
`org-extend-today-until'.
* test-org.el (test-org/auto-repeat-maybe, org-test-with-time-locale):
Tests for interaction of `org-extend-today-until' and
`org-auto-repeat-maybe'. Added `org-test-with-time-locale' to make test
results independent of running machine. Explicitly avoid matching log
note with old timestamp in all the tests to avoid confusion.

Co-authored-by: Ihor Radchenko <yantar92@posteo.net>

TINYCHANGE
2023-10-16 11:35:36 +03:00
bzg 201625f7e2 lisp/org-agenda.el: Display commands in a more consistent order
* lisp/org-agenda.el (org-agenda-get-restriction-and-command):
Display commands in a more consistent order.
2023-10-16 10:30:03 +02:00
Ihor Radchenko 73485aa063
org-element-parse-secondary-string: Fix Emacs 27 compatibility
* lisp/org-compat.el (org-get-buffer-create): Add compatibility
function.
* lisp/org-element.el (org-element-parse-secondary-string):
* lisp/org-id.el (org-id-find-id-in-file): Use it.

Reported-by: Yasushi SHOJI <yasushi.shoji@gmail.com>
Link: https://orgmode.org/list/CAELBRWJUQ=kupUbYev_W9dqEmYKnN3400t+W4_Q69EHNp-KMgA@mail.gmail.com
2023-10-16 11:24:29 +03:00
Ihor Radchenko fa7542d74c
* lisp/org-agenda.el (org-agenda-get-progress): Fix clock log entries
Do not alter match data when calling `org-get-category'.  The
subsequent code assumes that match data is not altered.
2023-10-16 10:34:14 +03:00
bzg 0becd1d6f7 Merge branch 'bugfix' 2023-10-16 07:43:04 +02:00
bzg 1ee85e957e doc/org-manual.org: Fix outdated link
* doc/org-manual.org (Packages that Org cooperates with): Fix
outdated link.

Suggested-by: https://list.orgmode.org/orgmode/87y1hd86n0.fsf@localhost
2023-10-16 07:41:42 +02:00
Jack Kamm 1eb5987589 ob-python: Check for end of output in org-babel-python-send-string
This is an attempt to mitigate occasional leaky prompts in CI. My
current hypothesis is that this could happen if the comint-output ends
between `org-babel-python-eoe-indicator' and the new prompt. Then the
new prompt could be injected into the output of the next unit test. To
avoid this, check we are at an ending prompt before exiting
`org-babel-python-send-string'.

https://list.orgmode.org/873506j7ky.fsf@localhost/

* lisp/ob-python.el (org-babel-python-send-string): Add check for
`python-shell-comint-end-of-output-p' to stop while loop accepting
process output.
2023-10-15 16:25:14 -07:00
Ihor Radchenko 061988c024
* lisp/org-tempo.el: Fix checkdoc warnings
(org-tempo-add-block):
(org-tempo-add-keyword): Fix arglist format in the docstring.
2023-10-15 11:53:05 +03:00
Ihor Radchenko 1a1f45d236
Merge branch 'bugfix' 2023-10-15 11:32:55 +03:00
Elias Kueny c42cdcda47
lisp/ob-shell.el: Adapt the `:var' header parameter to fish
* ob-shell.el (org-babel-variable-assignments:shell): allow the `:var'
keyword on fish code blocks to work with fish variables.

The fish shell uses the syntax `set variable value' instead of
`value=value' to set a shell variable.  This caused org-babel to
return an syntax error when attempting to execute a fish code block
with a `:var' parameter.  This change adds a helper function to use
the correct format.

TINYCHANGE
2023-10-15 11:27:58 +03:00