Commit Graph

26851 Commits

Author SHA1 Message Date
Ihor Radchenko ac108a3ac1
* lisp/ol-docview.el (org-docview-export): Update docstring and arglist
Document all the arguments. Add fourth argument as require by the
latest :export link property spec.  Rename FORMAT to BACKEND for more
clarity.
2023-10-09 16:33:28 +03:00
Ihor Radchenko 681f3fc8f9
* lisp/ol-docview.el (org-docview-open): Add docstring 2023-10-09 16:33:18 +03:00
Ihor Radchenko 54b9c845a7
* lisp/org-crypt.el: Fix outdated declare forms
(org-end-of-subtree):
(org-make-tags-matcher): Update the arglists.
2023-10-08 13:01:12 +03:00
Ihor Radchenko fe19ebe4af
* lisp/org-archive.el: Fix flycheck warnings
(org-add-archive-files):
(org-toggle-archive-tag): Document all the function arguments.
(org-timestamp-to-now): Add missing declare.
2023-10-08 12:58:29 +03:00
Ihor Radchenko 1003790d1d
* lisp/org-pcomplete.el (org-element-property): Fix malformed declare 2023-10-07 16:25:08 +03:00
Ihor Radchenko 1225f62576
org-babel-python-read-string: Upcase function argument in the docstring
* lisp/ob-python.el (org-babel-python-read-string):
2023-10-07 13:34:42 +03:00
Ihor Radchenko 26f1cb77a9
org-ascii-item: Fix for alphabetical bullets
* lisp/ox-ascii.el (org-ascii-item): Fix setting [@X] counter for
alphabetical lists.
* testing/lisp/test-ox-ascii.el:
(test-ox-ascii/list):  Add new test.
* testing/lisp/test-ox-latex.el (org-test-with-exported-text):
* testing/org-test.el (org-test-with-exported-text): Move macro to be
available across multiple test files.

Reported-by: Tom Alexander <tom@fizz.buzz>
Link: https://orgmode.org/list/36a62fbf-6484-456f-9537-a7aa40530068@app.fastmail.com
2023-10-07 13:22:09 +03:00
Ihor Radchenko 69c830f361
* lisp/ob-processing.el: Document all the function arguments
(org-babel-execute:processing):
(org-babel-variable-assignments:processing): Fix the docstrings.
2023-10-06 20:04:30 +03:00
Ihor Radchenko 4edfb69f86
* lisp/org-element.el (org-element--cache-for-removal): Add more logging
Log cache warning value when updating robust cached elements.
2023-10-06 14:27:22 +03:00
Ihor Radchenko e6690c5b79
* lisp/ob-screen.el (org-babel-execute:screen): Document the function args 2023-10-05 15:04:14 +03:00
Ihor Radchenko 88ff6c2fbc
org-reset-checkbox-state-subtree: Do not reset outside the subtree
* lisp/org-list.el (org-update-checkbox-count): Allow ALL argument to
have a value `narrow', meaning "update in accessible portion of the
buffer".  Update the docstring accordingly.
(org-update-checkbox-count-maybe): Document the special value of ALL
argument passed to `org-update-checkbox-count'.
(org-reset-checkbox-state-subtree): Update checkbox count within
subtree only.

Reported-by: J. G. <jerzor@pacbell.net>
Link: https://orgmode.org/list/1700336757.1605468.1695739462846@mail.yahoo.com
2023-10-05 12:34:42 +03:00
Ihor Radchenko 6d85f851b3
* lisp/ob-shell.el (org-babel-execute:shell): Document the function args 2023-10-04 12:28:10 +03:00
Ihor Radchenko 460c1a3524
Merge branch 'bugfix' 2023-10-04 11:42:16 +03:00
Ihor Radchenko bd3705c053
org-columns-remove-overlays: Fix when no columnview yet in buffer
* lisp/org-colview.el (org-columns-remove-overlays): Do not assume
that `org-columns-begin-marker' is a marker object.

Reported-by: John Borwick <borwick@uw.edu>
Link: https://orgmode.org/list/m2jzs47t36.fsf@uw.edu
2023-10-04 11:41:41 +03:00
Leo Butler 2ba45fcb78
* lisp/ob-maxima.el: enable use of `batch' loader and `draw'
* (org-babel-header-args:maxima): Document the two new header
arguments (batch and graphics-pkg) that are specific to ob-maxima.
* (org-babel-maxima--command-arguments-default): A new variable
storing the default command-line argument(s).  This value was
hard-coded in `org-babel-maxima:execute'.
* (org-babel-maxima--graphic-package-options): A new variable that
stores an alist of Maxima graphics packages and the Maxima code to set
up that package.
* (org-babel-maxima--default-epilogue): A new variable that stores an
alist of the clean-up code that is run at end of a `graphical-output'
or `non-graphical-output' source block.
* (org-babel-maxima--output-filter-regexps): A new variable that
stores a list of regexps to identify "bad" output lines to be removed
from Maxima's output.  Source-code comments document each regexp's
purpose.  Two additional regexps have been added: one filters
un-wanted output from `batch' and the other removes empty input lines
that `batch'-ed output may spuriously produce (actual empty input
lines are syntax errors, see the new tests below).
* (org-babel-maxima--output-filter): A new function that takes a
single line of Maxima output.  It returns nil if the line has zero
length or matches a regexp in
`org-babel-maxima--output-filter-regexps'; otherwise, it returns the
line.  This function and regexp replace the hard-coded filter in
`org-babel-execute:maxima'.
* (org-babel-maxima-expand): Prepare the source block for execution,
depending on whether it is producing graphical output or not.  In case
of graphical output, use the `graphics-pkg' header to set the graphics
package and use `org-babel-maxima--graphic-package-options' to set-up
the package.  Grovel the graphics terminal from the output filename.
* (org-babel-execute:maxima): Use the :batch header argument and
`org-babel-maxima--command-arguments-default' to execute the source
block.  Replace the existing, in-line output filter and its regexps
with `org-babel-maxima--output-filter' and
`org-babel-maxima--output-filter-regexps'.

* testing/examples/ob-maxima-test.org: Add test examples.

Include examples of the batch-related tests from
testing/lisp/test-ob-maxima.el.  Provide an example of the
`:graphics-pkg' header argument with the `draw' package.

* testing/lisp/test-ob-maxima.el: Introduce six new, batch-related
test functions.  Each test exercises the :batch header argument.  The
response to unusual inputs is tested (empty strings, strings with just
whitespace, input with the `:lisp' reader, and two syntax-related
errors).

link: https://list.orgmode.org/87cyz1ivzw.fsf@t14.reltub.ca/
2023-10-04 11:27:46 +03:00
Ihor Radchenko 3fcf3d2e24
* lisp/ob-R.el (org-babel-edit-prep:R): Add docstring 2023-10-02 16:29:10 +03:00
Ihor Radchenko 3c29e77b51
* lisp/org-capture.el: Fix malformed declare form 2023-10-02 14:19:43 +03:00
Ihor Radchenko 0ed8bf794f
* lisp/ob-python.el: Document some missing function arguments
(org-babel-execute:python):
(org-babel-variable-assignments:python):
(org-babel-python-format-session-value): Document all the function
arguments in the docstrings.
(org-babel-python-with-earmuffs):
(org-babel-python-without-earmuffs): Add docstring.
2023-10-01 13:41:59 +03:00
Ihor Radchenko 85ebb6d422
* lisp/ob-org.el: Document all the function arguments
(org-babel-expand-body:org): Add docstring.
(org-babel-execute:org): Explain all the arguments and describe what
execution of Org body means.
2023-09-29 16:27:11 +03:00
Ihor Radchenko aa9177e1a8
* lisp/ob-octave.el: Document all the function arguments
(org-babel-execute:matlab):
(org-babel-execute:octave):
(org-babel-variable-assignments:octave):
(org-babel-octave-var-to-octave):
(org-babel-matlab-initiate-session):
(org-babel-octave-initiate-session):
(org-babel-octave-evaluate-external-process): Update docstrings and
argument names.
2023-09-26 14:14:11 +03:00
Ihor Radchenko 224d455d60
* lisp/ob-ocaml.el: Document all the function arguments
(org-babel-execute:ocaml):
(org-babel-variable-assignments:ocaml): Fix docstrings.
2023-09-23 14:23:59 +03:00
Ihor Radchenko 4d0f89672a
* lisp/ob-maxima.el: Document all the function arguments
(org-babel-maxima-expand):
(org-babel-execute:maxima):
(org-babel-maxima-var-to-maxima): Document all the arguments.
(org-babel-prep-session:maxima): Add docstring.
2023-09-22 14:09:36 +03:00
Ihor Radchenko 7efd5bba0a
org-element-cache: Add switch to verify cache before writing to disk
*
lisp/org-element.el (org-element--cache-self-verify-before-persisting):
New internal variable toggling full verification pass before writing
cache to disk.

* lisp/org-element.el (org-element--cache-persist-before-write):
Verify cache and throw error on failure when
`org-element--cache-self-verify-before-persisting' is non-nil.
2023-09-22 11:42:52 +03:00
Ihor Radchenko d73d85b05e
* lisp/ob-makefile.el (org-babel-execute:makefile): Document function args 2023-09-21 13:59:23 +03:00
Ihor Radchenko 266aac1186
org-element--cache-persist-before-write: Warn when writing incorrect cache
* lisp/org-element.el (org-element--cache-persist-before-write): When
the cache being written has elements without parent, warn the user.
2023-09-20 14:22:31 +03:00
Ihor Radchenko 8b18fc5817
org-attach-dir-from-id: Detect attachments under default `org-attach-id-dir'
* lisp/org-attach.el (org-attach-dir-from-id): When searching for an
existing attachment directory, consider the default value of of
`org-attach-id-dir', if it is changed.  This way, if user used the
default value in the past (or accidentally via emacs -Q), we can still
find the existing attachment dir.
2023-09-20 13:39:20 +03:00
Ihor Radchenko 39314eab11
* lisp/ob-lisp.el (org-babel-lisp-vector-to-list): Add docstring 2023-09-20 13:20:34 +03:00
Ihor Radchenko b1c507c0ee
org-find-base-buffer-visiting: Document function argument
* lisp/org-macs.el (org-find-base-buffer-visiting): Fix the docstring.
2023-09-20 11:02:32 +03:00
Ihor Radchenko e42b7a6fdd
* lisp/ob-latex.el: Document all the function arguments
(org-babel-execute:latex):
(org-babel-latex-convert-pdf):
2023-09-19 15:49:09 +03:00
Ihor Radchenko 6c917e8904
org-timestamp-change: Fix increasing range with prefix arg
* lisp/org.el (org-modify-ts-extra): Treat INCREMENT-STEP argument as
multiplier for minutes.
(org-timestamp-change): Add commentary.  Make sure that minutes are
incremented by prefix argument when incrementing time range without
rounding.

Reported-by: Jorge P. de Morais Neto <jorge+list@disroot.org>
Link: https://orgmode.org/list/87wnoezd15.fsf@disroot.org
2023-09-19 15:31:43 +03:00
Ihor Radchenko a098c07973
* lisp/org.el (org-modify-ts-extra): Refactor the code
Rename arguments and variables to be more readable.  Add commentary
explaining the code.  Update the docstring, documenting the important
details and describing all the function arguments.
2023-09-19 14:57:20 +03:00
Ihor Radchenko edcb8eca5f
(org-fast-tag-selection): Honour tag groups when using <TAB> input
* lisp/org.el (org--add-or-remove-tag): New helper function to toggle
tags taking into account tag groups.
(org-fast-tag-selection): Factor out the tag toggling code into a new
function and re-use it in both key selection branch and in the <TAB>
completion interface.

Reported-by: sreenivas sumadithya <sumadithya@gmail.com>
Link: https://orgmode.org/list/CAHVqzFVP9KhrC5ZG_GUHbXZRBVg+PU+tR91vSfrnirLo7_T5Ug@mail.gmail.com
2023-09-19 12:43:00 +03:00
Ihor Radchenko 769c1dc64e
Merge branch 'bugfix' 2023-09-19 11:27:27 +03:00
Ihor Radchenko c61ec6255d
org-agenda-get-scheduled: Fix call to `org-time-string-to-time'
* lisp/org-agenda.el (org-agenda-get-scheduled): Do not pass timestamp
object to `org-time-string-to-time'.  Convert it to string first.

Reported-by: Carlo Tambuatco <oraclmaster@gmail.com>
Link: https://orgmode.org/list/CAJb92EzRWO6v3MRVbU0XwQomx-A1eYvFaOaBsJemB85Y4nJ1eg@mail.gmail.com
2023-09-19 11:24:10 +03:00
Ihor Radchenko 6307a774a7
org-agenda-get-scheduled: Fix call to `org-time-string-to-time'
* lisp/org-agenda.el (org-agenda-get-scheduled): Do not pass timestamp
object to `org-time-string-to-time'.  Convert it to string first.

Reported-by: Carlo Tambuatco <oraclmaster@gmail.com>
Link: https://orgmode.org/list/CAJb92EzRWO6v3MRVbU0XwQomx-A1eYvFaOaBsJemB85Y4nJ1eg@mail.gmail.com
2023-09-19 11:22:00 +03:00
Ihor Radchenko 0d9efae43f
org-odt--translate-latex-fragments: Make sure that we use org-mode buffer
* lisp/ox-odt.el (org-odt--translate-latex-fragments): When exporting
Latex fragments, use Org mode buffer to setup parser properly.
2023-09-18 13:08:42 +03:00
Ihor Radchenko 5da44c7ba1
* lisp/ob-js.el: Document all the function arguments
(org-babel-execute:js):
(org-babel-variable-assignments:js):
2023-09-18 11:55:04 +03:00
Ihor Radchenko 72bbf89282
* lisp/ob-haskell.el (org-babel-haskell-execute): Document function arguments 2023-09-17 13:23:00 +03:00
Ihor Radchenko 14bde5aba5
ox-icalendar: Ensure that entries in icalendar end with a newline
* lisp/ox-icalendar.el (org-icalendar--vevent):
(org-icalendar--vtodo): Make sure that there is a newline after the
exported VEVENT and VTODO.

Reported-by: Henrik Frisk <frisk.h@gmail.com>
Link: https://orgmode.org/list/CAO0LSb4aQhUMny4xr=1LB3t5F-K-WnjK1zc+qR7Jy+69vr2wpw@mail.gmail.com
2023-09-17 12:49:46 +03:00
Ilya Chernyshov e203b5a659
testing: Delete useless ert tests
* testing/lisp/test-ob-C.el: Delete useless test.

* testing/lisp/test-ob-fortran.el: Delete useless test.

* testing/lisp/test-ob-lilypond.el: Delete useless test.

* testing/lisp/test-ob-maxima.el: Delete useless test.
2023-09-17 12:48:36 +03:00
Ihor Radchenko 88f2dde0fc
* lisp/ob-python.el: Declare non-standard header args
(org-babel-default-header-args:python): New constant declaring
python-specific header arguments.
2023-09-17 12:39:40 +03:00
Ihor Radchenko c703541ffc
* lisp/ob-groovy.el: Fix checkdoc warnings
(org-babel-execute:groovy):
(org-babel-groovy-evaluate): Document all the function arguments.
(org-babel-groovy-initiate-session): Fix the docstring, explaining
that function does nothing.
2023-09-16 12:23:52 +03:00
Rudolf Adamkovič 2c7018f72e
org-manual: Fix a preposition and capitalization
* doc/org-manual.org (Capturing column view): Replace "in the
... line" with "on the ... line" and capitalize the containing
sentence as well.
2023-09-16 11:55:09 +03:00
Ihor Radchenko 2e5db7a591
org-element-cache: Catch problems with persistent cache and abort loading
* lisp/org-element.el (org-element--cache-persist-after-read): When
the persistent cache has elements without parent, do not use such
cache and report a warning to user.
2023-09-16 11:52:27 +03:00
Ihor Radchenko aee3f2227f
* lisp/org.el (org-mode): Initialize cache before parsing buffer keywords
If we load cache after `org-set-regexp-and-options', we may do double
job as `org-set-regexp-and-options' by itself queries cache.
2023-09-16 11:40:56 +03:00
Ihor Radchenko e90a8a69a7
org-element-cache: Log recovered persisted elements during loading
* lisp/org-element.el (org-element--cache-persist-before-read):
(org-element--cache-persist-after-read): Record diagnostics messages
when loading persistent cache.
2023-09-15 13:30:27 +03:00
Ihor Radchenko fd1418dadd
* lisp/ob-gnuplot.el: Document all the function arguments
(org-babel-execute:gnuplot):
(org-babel-variable-assignments:gnuplot):
2023-09-15 12:58:25 +03:00
Gerard Vermeulen d70c1200f7
ob-fortran.el: Fix name of caller in documentation
* lisp/ob-fortran.el (org-babel-execute:fortran): Fix name of caller
in documentation and conform to "rules" in sibling ob-XXX.el files.
2023-09-15 12:22:50 +03:00
Ihor Radchenko 1d35ebd93c
test-org-clok/org-clock-update-time-maybe: Fix test for non-English LANG
* testing/lisp/test-org-clock.el (test-org-clok/org-clock-update-time-maybe):
Do not assert English day names.

Reported-by: emacs@supporter.mailer.me
2023-09-15 12:00:06 +03:00
Ihor Radchenko 9eaca51c51
* lisp/org-clock.el (org-clock--translate): Clarify "L" and "ALL" terms
Explain in a comment what "L" And "ALL" terms mean in the context of
clock table.

Reproted-by: emacs@supporter.mailer.me
2023-09-15 11:55:33 +03:00