0
0
Fork 1
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-07-16 17:16:28 +00:00
Commit graph

26061 commits

Author SHA1 Message Date
Ihor Radchenko 30dfafac34
Merge branch 'bugfix' 2023-01-16 13:41:26 +03:00
Ihor Radchenko 12bcd322d0
Improve documentation for agenda starting day
* doc/org-manual.org (Weekly/daily agenda):
* lisp/org-agenda.el (org-agenda-start-on-weekday):
(org-agenda-start-day): Document that `org-agenda-start-on-weekday'
takes precedence over `org-agenda-start-day' when agenda span is 7 or
14 days.

Reported-by: Eppo Math <eppolito.math@gmail.com>
Link: https://orgmode.org/list/878ri67plt.fsf@localhost
2023-01-16 13:35:11 +03:00
Ihor Radchenko 889b8cc2fd
Merge branch 'bugfix' 2023-01-16 12:30:03 +03:00
Ihor Radchenko df4a5d86d8
org-fold: Fix isearch when `org-fold-core-style' is 'overlays
* lisp/org-fold-core.el (org-fold-core--isearch-show): Make sure that
the actual isearch match is revealed.  This relies on undocumented
behavior of isearch that point is at the match when
'isearch-open-invisible is called.
(org-fold-core-region): Disable 'isearch-open-invisible-temporary
features when `org-fold-core-style' is 'overlays.  This is to work
around the undocumented requirement of isearch to _not_ delete the
overlay passed to 'isearch-open-invisible-temporary function.  Since
`org-fold-show-set-visibility' may destroy overlays arbitrarily, we
cannot currently support isearch `org-fold-show-context-detail' in
full.

Reported-by: Matt Lundin <mdl@imapmail.org>
Link: https://orgmode.org/list/87zgb6tk6h.fsf@localhost
2023-01-16 12:21:57 +03:00
Ihor Radchenko 25dd206a0e
Merge branch 'bugfix' 2023-01-14 16:30:26 +03:00
Ihor Radchenko 2e22a8b827
org-export-dictionary: Fix typo
* lisp/ox.el (org-export-dictionary): Fix encoding keyword.

Reported-by: Rafael Bento <rafael.bentoe.silva@gmail.com>
Link: https://orgmode.org/list/adda99a7-b21f-a33b-571d-b7bfd6d743e2@gmail.com
2023-01-14 16:28:49 +03:00
Ihor Radchenko d71bb04f78
Merge branch 'bugfix' 2023-01-13 12:08:49 +03:00
Ihor Radchenko 76f9a3c2cb
org-timestamp-change: Add FIXME
* lisp/org.el (org-timestamp-change): Add FIXME comment to
re-implement the logic in future to avoid `save-excursion' markers
being moved to the end of timestamp.
2023-01-13 12:06:16 +03:00
Ihor Radchenko 97a235cf1c
org-clock-timestamps-change: Preserve point position
* lisp/org-clock.el (org-clock-timestamps-change): Try harder to
preserve point position.  `save-excursion' is not sufficient here,
when the timestamp gets deleted in the process.

Reported-by: Johannes Dahl <muusik@gmail.com>
Link: https://orgmode.org/list/CAHuokSbJxM4kqjdT94aHmjnKqzOvpJpq3tJqOEqdswaBC=JnfA@mail.gmail.com
2023-01-13 11:57:19 +03:00
Ihor Radchenko dc29c7d81f
Merge branch 'bugfix' 2023-01-13 11:18:36 +03:00
Ihor Radchenko cd967ce006
org-odt-plain-text: Fix `fill-column' value
* lisp/ox-odt.el (org-odt-plain-text): Use `most-positive-fixnum' to
unfill plain text elements.  `point-max' is not a safe large value
because, for example, Han script symbols often occupy two columns.

Reported-by: Cantoraz Chou <cantoraz@gmail.com>
Link: https://orgmode.org/list/CAJg5Zf00e+A_kuBmRh+h68u+3g_Cb_bLqRhR4rpFH=nenXvTdw@mail.gmail.com
2023-01-13 11:10:54 +03:00
Stefan Monnier ecb62e2e31
org-babel-shell-initialize: Refactor
* lisp/ob-shell.el (org-babel-shell-initialize): Refactor avoiding
`eval' runtime calls and assigning 'definition-name function symbol
property to assist Emacs help system with finding the definition.

Link: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=60568#71

> One of the discussed features was displaying function source code right
> in *Help* buffers. This feature usefulness have been objected at that
> time, on the grounds that showing function code may be too long and
> cause large *Help* buffers.

FWIW, I find myself regularly jumping to `M-x ielm` to look at the
`symbol-function`, so I would actually appreciate a button in the *Help*
buffer to display the actual value in the `symbol-function` slot.
This would also bring `describe-function` a bit closer to
`describe-variable`, which I think is good.

> 1. emacs -Q
> 2. M-: (require 'ob-shell)
> 3. <F1> f org-babel-execute:sh <RET>
> 4. Click on the source code link in *Help* buffer
> 5. Observe point jumping to (point-min) with no obvious way to find the
>    function definition.

We have `definition-name` for that.
I.e. `org-babel-shell-initialize` should arguably do

    (put 'org-babel-execute:sh 'definition-name 'org-babel-shell-initialize)

so that step 4 above jumps to `org-babel-shell-initialize`.

The patch below does that, along with saving some kittens.

        Stefan
2023-01-12 13:35:09 +03:00
Ihor Radchenko 0d5951a9b0
org-refile: Fix edge case when we refile on top of the same subtree
* lisp/org-refile.el (org-refile): Use dedicated marker (move after
insertion) to store position of the heading being refiled.  Otherwise,
if refiled heading is inserted at the same point, `save-excursion'
would restore point before the inserted heading instead of keeping it
at the original heading.
* testing/lisp/test-org.el (test-org/refile): At test.

Reported-by: /u/madclassix
2023-01-12 13:19:02 +03:00
Ihor Radchenko d0758eabfe
Merge branch 'bugfix' 2023-01-12 12:23:41 +03:00
Ihor Radchenko a52d0f0918
org-export-as: Fix subtree export when metadata ends right before heading
* lisp/ox.el (org-export-as): Only include first newline after heading
line when the metadata is non-empty.
* testing/lisp/test-ox.el (test-org-export/export-scope): Add test.

Reported-by: Kaushal Modi <kaushal.modi@gmail.com>
Link: https://orgmode.org/list/CAFyQvY1d=UEJ-6ZPG1X+st=fCfBAnTfgbVNhxyxH_xKcLGG4cQ@mail.gmail.com
2023-01-12 12:23:19 +03:00
Ihor Radchenko 89d13998bd
org-element-fixed-width-parser: Fix when :value is empty
* lisp/org-element.el (org-element-fixed-width-interpreter): Interpret
fixed-width element with :value "" as ":\n", not as empty string.
* testing/lisp/test-org-element.el (test-org-element/fixed-width-interpreter):
Fixed the test.

The previous test, albeit intentionally asserting "" result, breaks
reversibility of parse-interpret sequence.
2023-01-12 12:23:19 +03:00
Matt Trzcinski bcca8819c3 test-ob-shell.el: Organize tests
* testing/lisp/test-ob-shell.el:
  - Give instructions on how to run tests
  - Require `org-test' explicitly
  - Group tests into sections
  - Insert `page-delimiter's between sections
2023-01-11 14:31:16 -05:00
Matt Trzcinski ccd5977f62 ob-shell-test.org: Remove ob-shell-test.org
* testing/examples/ob-shell-test.org: Delete file

File was used by test-ob-shell.el to test ob-shell.el.  Tests have
been updated to use temporary buffers, rendering ob-shell-test.org
unnecessary.
2023-01-11 14:31:10 -05:00
Matt Trzcinski d7ff5b2462 test-ob-shell.el: Refactor test names and kill test buffers
* testing/lisp/test-ob-shell.el:
(ob-shell/generic-uses-no-arrays): Rename test from
`ob-shell/generic-uses-no-arrays' to
`test-ob-shell/generic-uses-no-arrays'.
(ob-shell/generic-uses-no-arrays): Move comments from
testing/examples/ob-shell-test.org to docstring.
(ob-shell/generic-uses-no-arrays): Remove dependency on
testing/examples/ob-shell-test.org.
(ob-shell/bash-uses-arrays): Rename `ob-shell/bash-uses-arrays' to
`test-ob-shell/bash-uses-arrays'.
(ob-shell/bash-uses-arrays): Move comments from
testing/examples/ob-shell-test.org to docstring.
(ob-shell/bash-uses-arrays): Remove dependency on
testing/examples/ob-shell-test.org.
(ob-shell/simple-list): Change test name from `ob-shell/simple-list'
to `test-ob-shell/simple-list'.
(ob-shell/remote-with-stdin-or-cmdline): Change test name from
`ob-shell/remote-with-stdin-or-cmdline' to
`test-ob-shell/remote-with-stdin-or-cmdline'.
(ob-shell/remote-with-stdin-or-cmdline): On pass, kill buffer created
by test.
(ob-shell/results-table): Rename `ob-shell/results-table' to
`test-ob-shell/results-table'.
(ob-shell/results-list): Rename `ob-shell/results-list' to
`test-ob-shell/results-list'.
 (ob-shell/standard-output-after-success): Rename
`ob-shell/standard-output-after-success' to
`test-ob-shell/standard-output-after-success'.
(ob-shell/standard-output-after-failure): Rename
`ob-shell/standard-output-after-failure' to
`test-ob-shell/standard-output-after-failure'.
(ob-shell/standard-output-after-failure): On pass, kill buffer created
during test.
(ob-shell/error-output-after-success): Rename
`ob-shell/error-output-after-success' to
`test-ob-shell/error-output-after-success'.
(ob-shell/error-output-after-success): On pass, kill buffer created by
test.
(ob-shell/error-output-after-failure): Rename
`ob-shell/error-output-after-failure' to
`test-ob-shell/error-output-after-failure'.
(ob-shell/error-output-after-failure): On pass, kill buffer created by
test.
(ob-shell/error-output-after-failure-multiple): Rename
`ob-shell/error-output-after-failure-multiple' to
`test-ob-shell/error-output-after-failure-multiple'.
(ob-shell/error-output-after-failure-multiple): On pass, kill buffer
created by test.
(ob-shell/exit-code): Rename `ob-shell/exit-code' to
`test-ob-shell/exit-code'.
(ob-shell/exit-code): On pass, kill buffer created by test.
(ob-shell/exit-code-multiple): Rename `ob-shell/exit-code-multiple' to
`test-ob-shell/exit-code-multiple'.
(ob-shell/exit-code-multiple): On pass, kill buffer created by test.
2023-01-11 14:31:01 -05:00
Matt Trzcinski 16ea9f84f6 Refactor ob-shell/bash-uses-assoc-arrays
* testing/lisp/test-ob-shell.el (ob-shell/bash-uses-assoc-arrays):
Split test cases into separate tests,
`test-ob-shell/bash-uses-assoc-arrays' and
`test-ob-shell/bash-uses-assoc-arrays-with-lists'.  Rename prefix from
"ob-shell" to "test-ob-shell".
(ob-shell/bash-uses-assoc-arrays): Move comments from
testing/examples/ob-shell-test.org to docstrings.
(ob-shell/bash-uses-assoc-arrays): Remove dependency on
testing/examples/ob-shell-test.org.
2023-01-11 14:30:53 -05:00
Matt Trzcinski c61112c850 test-ob-shell.el: Refactor ob-shell/generic-uses-no-assoc-arrays
* test-ob-shell.el (ob-shell/generic-uses-no-assoc-arrays): Split test
based on simple versus complex mapping cases,
`test-ob-shell/generic-uses-no-assoc-arrays-simple-map' and
`test-ob-shell/generic-uses-no-assoc-arrays-3-columns'.  Rename prefix
from "ob-shell" to "test-ob-shell".
(ob-shell/generic-uses-no-assoc-arrays): Move
headlines and commentary from `testing/examples/ob-shell-test.org' to
docstring.
(ob-shell/generic-uses-no-assoc-arrays): Remove dependency on
testing/examples/ob-shell-test.org.
2023-01-11 14:30:45 -05:00
Matt Trzcinski 2ddbee5e63 test-ob-shell.el: Refactor test-ob-shell/session
* testing/lisp/test-ob-shell.el (ob-shell/session): Split
`ob-shell/session' into
`test-ob-shell/session-single-return-returns-string' and
`test-ob-shell/session-multiple-returns-returns-list'.
(ob-shell/session): Rename comint from to test name. On
pass, kill process and remove process buffer.
2023-01-11 14:30:35 -05:00
Matt Trzcinski 875845de1b test-ob-shell.el: Split test-ob-shell/dont-error-on-empty-results
* testing/lisp/test-ob-shell.el
(test-ob-shell/dont-error-on-empty-results): Explicitly test handling
of empty results.
(test-ob-shell/dont-error-on-babel-error): Explicitly test handling of
Babel errors.  On pass, remove buffers created during test.

Original test conflated empty results (a valid Babel return) and Babel
errors.
2023-01-11 14:30:23 -05:00
Matthew Trzcinski 597ecaa5c1 Revert "Merge branch 'ob-shell-cleanup-tests'"
This reverts commit 4f319088ba, reversing
changes made to 07c63df9c7.
2023-01-11 14:27:45 -05:00
Matthew Trzcinski 4f319088ba Merge branch 'ob-shell-cleanup-tests' 2023-01-11 11:16:53 -05:00
Bastien 07c63df9c7 Merge branch 'bugfix' 2023-01-11 16:01:03 +01:00
Bastien 630f86dfc4 Update version number for the 9.6.1 release 2023-01-11 16:00:12 +01:00
Ihor Radchenko dfcf500df5
org-cdlatex-mode: Fix regression from f01390cf05
* lisp/org.el (org--math-always-on): Rename to `org--math-p' and only
override `texmathp' when current command is `cdlatex-math-symbol' or
when we are inside Org LaTeX math fragment.  Only these two scenarios
are the places where `texmathp' may not work properly in Org files.
We must not return t outside latex fragments as initially suggested by
the docstring because it would break, for example, `cdlatex-dollar'
command.
(org-cdlatex-mode): Use the new function name for advice.
* lisp/org-compat.el (org--math-always-on): Declare obsolete.

Reported-by: Daniel Fleischer <danflscr@gmail.com>
Link: https://orgmode.org/list/m2cz7sj5zt.fsf@gmail.com
2023-01-11 13:55:56 +03:00
Ihor Radchenko 2f7052619b
Merge branch 'bugfix' 2023-01-07 15:15:18 +03:00
Ihor Radchenko a6523f1aa0
org-export-output-file-name: Remove redundant `cond' clause
* lisp/ox.el: Remove `cond' clause equivalent to t.
2023-01-07 15:13:52 +03:00
Ihor Radchenko 5a8a1d4ff9
org-compile-file: Expand "~" in SOURCE
* lisp/org-macs.el (org-compile-file): Expand "~" in the source before
passing it as quoted shell argument.

Reported-by: Alain.Cochard@unistra.fr
Link: https://orgmode.org/list/25528.42190.53674.62381@gargle.gargle.HOWL
2023-01-07 15:12:41 +03:00
Ihor Radchenko b58fbaf834
Merge branch 'bugfix' 2023-01-06 18:06:26 +03:00
Leo Butler 41ebc2e40c
test-ob-octave.el: wrap get-buffer in buffer-live-p
* testing/lisp/test-ob-octave.el (ob-octave/graphics-file):
(ob-octave/graphics-file-session):
(ob-octave/graphics-file-space): Wrap GET-BUFFER in BUFFER-LIVE-P.
This ensures that a killed buffer does not cause an incorrect failure
of a test.

Link: https://orgmode.org/list/87bknh5nva.fsf@localhost
2023-01-06 18:01:37 +03:00
Ihor Radchenko a08c37603f
Merge branch 'bugfix' 2023-01-06 16:31:43 +03:00
Ihor Radchenko 28a9664844
org-manual.org: Clarify that `org-insert-property-drawer' is not a command
* doc/org-manual.org (Drawers): Emphasize that
`org-insert-property-drawer' is not interactive command, but a
function.

Reported-by: Alain.Cochard@unistra.fr
Link: https://orgmode.org/list/tp3pbi$dk$1@ciao.gmane.io
2023-01-06 16:30:42 +03:00
Ihor Radchenko a3815a169a
org-cycle-level: Do nothing at inlinetasks
* lisp/org.el (org-cycle-level): Do not change task level at
inlinetasks.

Reported-by: Alain.Cochard@unistra.fr
Link: https://orgmode.org/list/25524.11082.597138.21839@gargle.gargle.HOWL
2023-01-05 12:08:01 +03:00
Ihor Radchenko 80d1bc63ff
Merge branch 'bugfix' 2023-01-05 11:29:12 +03:00
Ihor Radchenko 93339de71b
org-babel-shell-initialize: Fix `org-babel-prompt-command'
* lisp/ob-shell.el (org-babel-shell-initialize): Do not search shell
name string by `eq' in `org-babel-shell-set-prompt-commands' alist.
Use `assoc' that is comparing by `equal' instead.

Reported-by: Matt <matt@excalamus.com>
Link: https://orgmode.org/list/87h6x8kluc.fsf@localhost
2023-01-05 11:26:40 +03:00
Bastien 001e114936 Revert "lisp/ob-scheme.el: Add Rudolf Adamkovič as the maintainer"
This reverts commit e5a3a07cac.

See https://list.orgmode.org/orgmode/m2pmbvqjtf.fsf@me.com/
2023-01-04 00:36:38 +01:00
Ihor Radchenko 30314c6038
Merge branch 'bugfix' 2023-01-03 10:58:59 +03:00
Ihor Radchenko 58aeb1af15
org-persist-unregister: Fix when ASSOCIATED is 'all
* lisp/org-persist.el (org-persist-unregister): Do not try to
normalize 'all ASSOCIATED.  It is not a valid association that should
be handled specially.  Previously, an error was thrown.
2023-01-03 10:58:02 +03:00
Ihor Radchenko 9e5c25ba75
org-persist-unregister: Allow removing related containers
* lisp/org-persist.el (org-persist-unregister): Add new optional key
:remove-related to remove all the containers stored alongside with
CONTAINER in addition to CONTAINER itself.  Update to docstring.
2023-01-03 10:56:49 +03:00
Ihor Radchenko 82cc6f0fe8
Merge branch 'bugfix' 2023-01-02 12:08:23 +03:00
Ihor Radchenko ce6f1799cc
org-options-keywords: Add missing keyword
* lisp/org.el: Add missing "EXPORT_FILE_NAME" that is mentioned in
13.2 Export Settings section of the manual.

Reported-by: Alain.Cochard@unistra.fr
Link: https://orgmode.org/list/25521.58663.963178.927459@gargle.gargle.HOWL
2023-01-02 12:07:17 +03:00
Ihor Radchenko e002168d64
Merge branch 'bugfix' 2023-01-02 10:53:14 +03:00
Ihor Radchenko 3454021483
Revert "org-babel-read: Obey `org-confirm-babel-evaluate'"
This reverts commit 10e857d428.

* lisp/ob-core.el:
(org-babel-merge-params):
(org-babel-process-params):
(org-babel-read):
* lisp/org-table.el: Add FIXME comments to places where arbitrary code
execution may happen.

The extra query is reverted until we develop a better code execution
safety system for Org.  The commit introduced too many user queries,
making the whole idea of asking users to execute code from Org files
not useful.

Link: https://orgmode.org/list/878rinadlq.fsf@localhost
2023-01-02 10:49:45 +03:00
Ihor Radchenko 4b647e70e6
Merge branch 'bugfix' 2023-01-02 10:27:44 +03:00
Ihor Radchenko 1cd39c9e30
org-mode: Fix element cache updates when aligning tables during startup
* lisp/org.el (org-mode): Do not suppress modification hooks when
aligning tables.  Otherwise, cache state may become invalid.

Reported-by: Stefan <org@stefan.failing.systems>
Link: https://orgmode.org/list/87tu1wse45.fsf@localhost
2023-01-02 10:26:52 +03:00
Kyle Meyer 563a4396b6 org-assert-version: Deleting trailing whitespace
Otherwise this fails Emacs's pre-commit check.
2023-01-01 22:23:43 -05:00
Kyle Meyer 96a402780c Merge branch 'bugfix' 2023-01-01 13:15:12 -05:00