Commit graph

26189 commits

Author SHA1 Message Date
Bastien 89bf4b431a etc/ORG-NEWS: Minor rewording
Prefer "option" rather than "setting".
An option is a customizable variable.
2022-12-30 09:15:42 +01:00
Bastien e8ceb4a2cb lisp/ob-shell.el: Add Matt <matt@excalamus.com> as maintainer 2022-12-30 09:02:53 +01:00
András Simonyi 29103fc602 oc-csl: Improve LaTeX bibliography formatting
* lisp/oc-csl.el (org-cite-csl--output-format): Use the dedicated
'org-latex' citeproc formatter to export references in LaTeX.
(org-cite-csl-latex-preamble, org-cite-csl--generate-latex-preamble,
org-cite-csl-finalizer): Insert a preamble fragment compatible with
the 'org-latex' citeproc formatter.
(org-cite-csl-latex-label-separator,
org-cite-csl-latex-label-width-per-char): Introduce additional
variables to control bibliography formatting.

* etc/ORG-NEWS: Describe the introduced new options.
2022-12-29 22:36:36 +01:00
Bastien e5a3a07cac lisp/ob-scheme.el: Add Rudolf Adamkovič as the maintainer 2022-12-29 16:33:03 +01:00
Ihor Radchenko 5bc5add326
lisp/org-keys.el: Provide terminal binding for `org-insert-structure-template'
* lisp/org-keys.el (or): Add alternative terminal binding for
`org-insert-structure-template'.  The default binding may not be
available in some terminals.

* doc/org-manual.org (Using Org on a TTY): List the new binding in the
manual.

Reported-by: Anthony Carrico <acarrico@memebeam.org>
Link: https://orgmode.org/list/d9222967-5747-bf54-8041-4a8453fe81fc@memebeam.org
2022-12-29 17:27:37 +03:00
Ihor Radchenko fbd08a0d9b
oc-basic: Display ?? in place of missing citations on export
* lisp/oc-basic.el (org-cite-basic--format-author-year):
(org-cite-basic-export-citation): Display "????" for missing year and
"??"  for missing other fields.

Reported-by: Ihor Radchenko <yantar92@posteo.net>
Link: https://orgmode.org/list/871qr6kiuv.fsf@localhost
2022-12-29 17:24:21 +03:00
Ihor Radchenko b2adb68afa
* doc/org-manual.org: Clarify :results file link with no :file
(Type):
(Format): Document that :results file link is using the source block
result as file path when :file header argument is not present.

Reported-by: dalanicolai <dalanicolai@gmail.com>
Link: https://orgmode.org/list/CACJP=3=HrzaB+b2bTk2=-hrcv0STx41eFjedgtp=qXvGjVJQWA@mail.gmail.com
2022-12-29 16:59:45 +03:00
Ihor Radchenko 21741a4696
* lisp/ob-python.el: Mark python-mode support for removal
Add FIXME record to remove python-mode.el support in the next release.
See the annoucement in https://orgmode.org/Changes.html (Org 9.6)

Link: https://orgmode.org/list/87r0xq8dk9.fsf@gnu.org
2022-12-29 16:37:00 +03:00
Ihor Radchenko a9c0d4cde2
org-occur-in-agenda-files: Respect agenda restriction
* lisp/org.el (org-occur-in-agenda-files): Respect agenda restriction
when searching.

Reported-by: Alain.Cochard@unistra.fr
Link: https://orgmode.org/list/25514.61148.396137.347019@gargle.gargle.HOWL
2022-12-29 12:55:13 +03:00
Ihor Radchenko b86989c8df
Merge branch 'bugfix' 2022-12-29 12:53:32 +03:00
Ihor Radchenko e5c45358ae
test-ob-octave.el: Avoid race condition on slow machines
* testing/lisp/test-ob-octave.el (ob-octave/graphics-file):
(ob-octave/graphics-file-session):
(ob-octave/graphics-file-space): Delay `should' condition waiting for
file contents to be written by octave.  This may be necessary when
octave has not yet written the file contents (on slow machines).
Re-enable tests.

Link: https://orgmode.org/list/87r0wk29dz.fsf@localhost
2022-12-29 12:51:31 +03:00
Ihor Radchenko dedf1cc21f
org-persist: Add more normalizations and new `elisp-data' container
* lisp/org-persist.el (org-persist--normalize-container): Recognize
new `elisp-data' container.  Treat raw strings, keywords, and quoted
expressions as `elisp-data' container options.
(org-persist-read:elisp-data):
(org-persist-load:elisp-data):
(org-persist-write:elisp-data):
(org-persist-gc:elisp-data):
(org-persist-associated-files:elisp-data): New functions.
(org-persist-read): Simplify docstring example using `elisp-data'
container.

Also, update examples in top comment.
2022-12-29 12:27:50 +03:00
Ihor Radchenko 13e78df46a
* lisp/org-persist.el: Update commentary
Add more examples and document recent additions.
2022-12-28 15:57:24 +03:00
Ihor Radchenko 14bfe2841c
org-persist: Use `list-data-mode' for stored data
* lisp/org-persist.el (org-persist-version): Bump version.
(org-persist-index-file): Use .eld extension by default.
(org-persist--index): Set mode in buffer-local variable line.
2022-12-28 15:56:07 +03:00
Ihor Radchenko a97b378ee5
org-persist-read: Do not return related containers by default
* lisp/org-persist.el (org-persist-read): Only return the requested
containers.  Add new optional keyword argument :read-related to read
the containers stored together with requested.  Update the docstring
accordingly.
(org-persist-load): Update definition according to `org-persist-read'.
* lisp/org.el (org-mode): Explicitly load all the associated
cache variables.
2022-12-28 15:53:14 +03:00
Ihor Radchenko ffec2db731
org-persist-write:elisp: Allow buffer-local/global elisp container scope
* lisp/org-persist.el (org-persist-read:index): Allow setting where
the elisp container value is taken from: locally, from buffer, or from
a global variable.
2022-12-28 15:51:49 +03:00
Ihor Radchenko f8428d0f3e
org-fold-core--isearch-show: Small refactoring
* lisp/org-fold-core.el (org-fold-core--isearch-show): Do not move
point unnecessarily.
2022-12-28 15:50:35 +03:00
Ihor Radchenko e8cb52bd3e
org-persist-read: Attempt to write newly register data before reading
* lisp/org-persist.el (org-persist-read): If data is not yet written,
try to write it before reading.
2022-12-28 09:21:13 +03:00
Ihor Radchenko 5549357bf2
Merge branch 'bugfix' 2022-12-27 13:14:04 +03:00
Ihor Radchenko fc4bbb28f8
org-search-view: Fix searching across inlinetasks
* lisp/org-agenda.el (org-search-view): Consider that
`outline-next-heading' may move to inlinetask.

* testing/examples/agenda-search.org: New test file.

* testing/lisp/test-org-agenda.el (test-org-agenda/org-search-view):
New test.

Reported-by: Alain.Cochard@unistra.fr
Link: https://orgmode.org/list/25514.763.379510.806150@gargle.gargle.HOWL
2022-12-27 13:10:02 +03:00
Ihor Radchenko af56f52ccb
Merge branch 'bugfix' 2022-12-27 12:50:24 +03:00
Ihor Radchenko ecfb55af0a
org-src.el: Apply common faces even when src block language mode is absent
* lisp/org-src.el (org-src-font-lock-fontify-block): Apply
`org-src-block-faces'/`org-block' faces even when no major mode is
available for the src block language.

Reported-by: duskhorn <duskhorn@proton.me>
Link: https://orgmode.org/list/zCjC9UjXEgJk8kuyi8t2K2XzO3fL7pYWynHhoYWAes9eCA1FkomCY9bss4uKZfBg60M4xUisyDqFWKVMOn1r_XzUVE7gr3ci82MEOLjGIMk=@proton.me
2022-12-27 12:47:46 +03:00
Ihor Radchenko fd162eb9be
Merge branch 'bugfix' 2022-12-26 20:09:22 +03:00
Ihor Radchenko de83f548d9
org-persist-write:file: Do not overwrite existing cached file
* lisp/org-persist.el (org-persist-write:file): Do not try to copy on
top of the cached file, when already exists.
2022-12-26 20:07:30 +03:00
Kyle Meyer adb3591436 Merge branch 'bugfix' 2022-12-26 11:01:49 -05:00
Kyle Meyer 8aea340d59 Merge branch 'km/from-emacs-29' into bugfix 2022-12-26 11:00:27 -05:00
Stefan Kangas 14cbbac212 Backport commit 2608e5edc from Emacs
; Fix typos
2608e5edcca5094b61b4ccebcef160cc2bfd7f83
Stefan Kangas
Mon Dec 26 10:42:02 2022 +0100
2022-12-26 10:59:44 -05:00
Ihor Radchenko 5de86ffaba
Merge branch 'bugfix' 2022-12-26 12:25:28 +03:00
Ihor Radchenko b11abb409c
org-babel-insert-result: Output strings as is for lists of strings
* lisp/ob-core.el (org-babel-insert-result): Do not use %S format for
lists of strings in :results list output.  This is more consistent
with single string output.

Reported-by: Matt <matt@excalamus.com>
Link: https://orgmode.org/list/1852d9eb52f.c4c534f9581400.7140516675874523594@excalamus.com
2022-12-26 12:24:51 +03:00
Ihor Radchenko d88c9893ee
Merge branch 'bugfix' 2022-12-26 12:22:31 +03:00
Ihor Radchenko 9c79aedec7
org-agenda: Use more machine-friendly date output for csv export
* lisp/org-agenda.el (org-fix-agenda-info): Pad the month and date
numbers with 0, making sure that the date format is always YYYY-MM-DD.

Reported-by: David O'Toole <deeteeoh1138@gmail.com>
Link: https://orgmode.org/list/CAAz1J52e7ha=rtyz=Kn=o-X48XU3oNJYF57xo5hOBnz8_Twdyg@mail.gmail.com
2022-12-26 12:21:13 +03:00
Kyle Meyer 63e073f96e org-persist: Revert space misalignment from recent commit
987fe173a (org-persist: Do better job avoiding security issue
described in `make-temp-name', 2022-12-25) carried along an unrelated
space change.
2022-12-25 11:31:56 -05:00
Ihor Radchenko 0f1184a850
Merge branch 'bugfix' 2022-12-25 15:50:55 +03:00
Ihor Radchenko 718e196830
org-back-to-heading: Fix at inlinetask END
* lisp/org.el (org-back-to-heading): Fix when at inlinetask END.
* testing/lisp/test-org.el (test-org/org-back-to-heading): Add new
test.

Reported-by: Alain.Cochard@unistra.fr
Link: https://orgmode.org/list/25508.20192.899342.932809@gargle.gargle.HOWL
2022-12-25 15:49:28 +03:00
Ihor Radchenko f138810065
org-element: Allow inlinetasks to be commented and archived
* lisp/org-element.el (org-element-inlinetask-parser): Parse
inlinetasks closer to headings.  In particular, recognize COMMENT
keyword and ARCHIVE tag in inlinetasks on parser level.
* testing/lisp/test-org.el (test-org/comment-dwim): Add tests for
inlinetasks and for uncommenting headings.

Reported-by: Alain.Cochard@unistra.fr
Link: https://orgmode.org/list/25508.20192.899342.932809@gargle.gargle.HOWL
2022-12-25 15:32:01 +03:00
Ihor Radchenko 46dbd59f03
Merge branch 'bugfix' 2022-12-25 14:38:36 +03:00
hugcis 318807013c
oc-basic.el: Fix wrong type for the editors field when parsing JSON.
* lisp/oc-basic.el (org-cite-basic--parse-json): Make sure
`org-cite-basic--parse-json' produces a string for the editors field.
The function `org-cite-basic--get-author' expects a string for both the
"authors" field and the "editors" field.
The conversion to string was only done for the "authors" field in
`org-cite-basic--parse-json'. This patch fixes the issue by applying the
transformation to both "authors" and "editors".

This points to a more general issue where `org-cite-basic--get-field' is
expected to return nil or a string, but calls
`org-cite-basic--get-entry' that may return an association list.

TINYCHANGE
2022-12-25 14:35:55 +03:00
Ihor Radchenko 3a5b2555df
Merge branch 'bugfix' 2022-12-25 14:00:14 +03:00
Ihor Radchenko 7f2f73c414
org-babel-read: Small fix
* lisp/ob-core.el (org-babel-read): Remove redundant `format' call for
code block body.  The body is already a string.  Make the block name
more human readable using %s `format' arg.

Reported-by: Tom Gillespie <tgbugs@gmail.com>
Link: https://orgmode.org/list/CA+G3_PPFHcx6eeKGuvxDcuy3NjSpTnrbye0gHJePtvi2a-5wrg@mail.gmail.com
2022-12-25 13:58:06 +03:00
Ihor Radchenko d2b49c72b2
Merge branch 'bugfix' 2022-12-25 12:19:46 +03:00
Ihor Radchenko 987fe173ac
org-persist: Do better job avoiding security issue described in `make-temp-name'
* lisp/org-persist.el: Create `org-persist-directory' early, when we
decide the directory name.  This way, even if third party code gets to
know the directory name in /tmp, it cannot raise file permissions by
creating `org-persist-directory' with loose access rights ahead of us.
Also, create and set `org-persist-directory' before we check if have
have proper access rights to write to it.
(org-persist-write-all): Do better job clearing
`org-persist-directory' if nothing is going to be written inside.
(org-persist-clear-storage-maybe): New function to be called before
exiting Emacs.  It is used to remove the persistent data before
exiting.  Multi-session persistence is not and must not be needed when
calling Emacs with -Q command line argument.  Call the function before
exiting Emacs in `kill-emacs-hook'.

Reported-by: Stefan Monnier <monnier@iro.umontreal.ca>
Link: https://yhetil.org/emacs-devel/jwvwn6kpmir.fsf-monnier+emacs@gnu.org
2022-12-25 12:17:36 +03:00
Ihor Radchenko f731d45d28
Merge branch 'bugfix' 2022-12-21 21:44:07 +03:00
Ihor Radchenko e2366ac283
* lisp/org-persist.el: Do not litter /tmp when native compiling
Remove the directory created by `make-temp-file' when Emacs is called
with -Q command line argument.  Only use the return value as the
directory to be created when something is actually stored by
org-persist while running Emacs.

Reported-by: William Denton <wtd@pobox.com>
Link: https://orgmode.org/list/alpine.DEB.2.22.394.2212211213480.270543@shell3.miskatonic.org
2022-12-21 21:43:42 +03:00
Ihor Radchenko 036cc05a6d
Merge branch 'bugfix' 2022-12-21 15:41:55 +03:00
Tom Gillespie a8c9f11757
Fix missing null check for tangle links during export
* lisp/ob-tangle.el (org-babel-tangle--unbracketed-link): Add the let
bound variable l to the and statement to prevent l from being passed
to `string-match' in the event that it is nil.

When tangling nested noweb blocks during export it is possible for the
results of `org-store-link' to return nil.  This commit ensures that
the value returned for l is only passed to `string-match' when it is
non-nil, avoiding a `wrong-type-argument' (stringp nil) error.

Handling of comments and nesting of babel blocks is known to have
issues.  The bug is from 8a781d35dc
where new code was introduced to obtain the value for bare which was
not present in early code.  I'm guessing that the bug appears now
because `string-match' is called on l (aka link) at a point in time
when it was never previously called and it was thus masked because in
the old version it was impossible to call `string-match' when `link'
was nil because another variable was always nil, masking the issue.
2022-12-21 15:40:27 +03:00
Ihor Radchenko 71b04d9638
Merge branch 'bugfix' 2022-12-21 15:35:14 +03:00
Ihor Radchenko db34a7d837
* lisp/ox-html.el (org-html-link): Fix call to `org-export-get-ordinal'
Pass list of type symbols as third argument following the docstring
spec.

Reported-by: Brian Powell <powellb@hawaii.edu>
Link: https://orgmode.org/list/m2tu1s458q.fsf@hawaii.edu
2022-12-21 15:28:48 +03:00
Ihor Radchenko d9e258b55f
Merge branch 'bugfix' 2022-12-21 14:55:21 +03:00
Ihor Radchenko a29103a786
* testing/lisp/test-ob-octave.el: Disable tests failing on CI only
(ob-octave/graphics-file):
(ob-octave/graphics-file-session):
(ob-octave/graphics-file-space): Disable tests until we figure the
origin of CI failures.  The tests are passing locally.

Link: https://orgmode.org/list/87cz8ifioa.fsf@localhost
2022-12-21 14:53:09 +03:00
Ihor Radchenko 04d2cc59e5
Merge branch 'bugfix' 2022-12-18 17:43:03 +03:00