Commit Graph

26796 Commits

Author SHA1 Message Date
Ihor Radchenko 20162f5a5c
org-element-dynamic-block-open-re-nogroup: Demand block name
* lisp/org-element.el (org-element-dynamic-block-open-re-nogroup): Fix
inconsistency with `org-element-dynamic-block-open-re' - block name is
mandatory.
*
testing/lisp/test-org-element.el (test-org-element/dynamic-block-parser):
Add test.
2023-09-12 11:15:17 +03:00
Ihor Radchenko 1d585a1b38
* doc/org-manual.org (HTML doctypes): Remove time reference for a feature
Remove "now" as the manual should not refer to relative time when new
features are introduced - this creates confusion as the time passes.
2023-09-11 12:12:00 +03:00
Ihor Radchenko 4c0cde5783
org-babel-variable-assignments:eshell: Document PARAMS argument
* lisp/ob-eshell.el (org-babel-variable-assignments:eshell):
2023-09-11 11:51:59 +03:00
Juan Manuel Macias 893c5d0851
ox-latex.el: Fixes and improvements in `org-latex-language-alist'.
* (org-latex-language-alist): Fix a language code (`de-de') removed
when `org-latex-babel-language-alist' and
`org-latex-polyglossia-language-alist' were merged.  New admitted
properties: `:babel-ini-alt', `:script' and `:script-tag'.  Add
language code for ancient Greek.  Fix Afrikaans (was previously
removed).  New languages: Chinese Simplified and Traditional.
Correction of some typos, errors and inaccuracies.  `let' bindings
suggested by Ihor Radchenko.

* (org-latex-guess-babel-language): Some necessary modifications.

Link: https://orgmode.org/list/8734zoxzd0.fsf_-_@posteo.net
2023-09-10 16:32:29 +03:00
Ihor Radchenko 08f8c06b14
* lisp/ob-exp.el: Document all the function arguments
(org-babel-exp-do-export):
(org-babel-exp-code):
(org-babel-exp-results):
2023-09-10 11:45:02 +03:00
Ihor Radchenko c2594e7456
fixup! * lisp/ox.el (org-export-dictionary): Add Polish translation 2023-09-10 11:26:06 +03:00
Emacs User 7de89d0a42
* lisp/ox.el (org-export-dictionary): Add Polish translation
TINYCHANGE
2023-09-10 11:01:32 +03:00
Ihor Radchenko 515e4ed49b
* lisp/org.el (org--get-expected-indentation): Remove redundant cond clause
Reported-by: No Wayman <iarchivedmywholelife@gmail.com>
Link: https://orgmode.org/list/87wmwzdwx8.fsf@gmail.com
2023-09-10 10:38:19 +03:00
Ihor Radchenko 2030c111eb
* lisp/ob-emacs-lisp.el: Document all the function arguments
(org-babel-execute:emacs-lisp):
(org-babel-edit-prep:emacs-lisp): Document all the function arguments
in the docstrings.
2023-09-09 13:57:02 +03:00
Ihor Radchenko 163bafb43d
* lisp/ob-dot.el (org-babel-execute:dot): Document all the function arguments 2023-09-08 12:23:31 +03:00
Ihor Radchenko eed3ac9f78
* lisp/ob-haskell.el (inferior-haskell-root-dir): Declare external variable 2023-09-08 11:11:06 +03:00
Bruno BARBIER 3674e40247
* testing/lisp/test-ob-haskell-ghci.el: Test output without EOL
(ob-haskell/output-without-eol-1):
(ob-haskell/output-without-eol-2):
(ob-haskell/output-without-eol-3): New tests.
2023-09-08 10:59:46 +03:00
Bruno BARBIER 36a786f7f9
ob-haskell: Implement sessions
* lisp/ob-haskell.el (org-babel-haskell-initiate-session): Implement
sessions.
(org-babel-haskell-with-session): New macro to manage sessions.
(org-babel-interpret-haskell): Refactor code.  Use
`org-babel-haskell-with-session` to manage sessions.

* testing/lisp/test-ob-haskell-ghci.el: Update tests related to
sessions.
2023-09-08 10:59:45 +03:00
Bruno BARBIER 924c2dd836
lisp/ob-haskell: Request the last value from GHCi
* lisp/ob-haskell.el (org-babel-interpret-haskell): When the result
type is 'value, use the last value as defined by GHCi.
(org-babel-haskell-eoe): New default value.
(org-babel-interpret-haskell): Update for the new value of `org-babel-haskell-eoe'.

* testing/lisp/test-ob-haskell-ghci.el: Update tests related to output/value.
2023-09-08 10:59:44 +03:00
Ihor Radchenko b852172170
* testing/lisp/test-ob-haskell-ghci.el: Enable fixed tests
(ob-haskell/hello-world-output-multilines):
(ob-haskell/let-multilines-1):
(ob-haskell/let-multilines-2):
(ob-haskell/primes):
(ob-haskell/not-defined-then-defined-1-fixed): Re-enable tests.
2023-09-08 10:59:43 +03:00
Ihor Radchenko d6dd92d442
* testing/lisp/test-ob-haskell-ghci.el: Fix some tests
(ob-haskell/2D-lists-multilines):
(ob-haskell/ghci-info): Fix incorrect test assertions.
2023-09-08 10:59:43 +03:00
Ihor Radchenko 5bffb9a1e3
org-babel-haskell-initiate-session: Remove secondary prompt
* lisp/ob-haskell.el (org-babel-haskell-initiate-session): Set
secondary prompt to "".  If we do not do this, org-comint may treat
secondary prompts as a part of output.
2023-09-08 10:59:42 +03:00
Bruno BARBIER 91c52e2ab6
ob-haskell: Add tests for GHCi
testing/lisp/test-ob-haskell-ghci.el: New file.
2023-09-08 10:59:41 +03:00
Ihor Radchenko 1f88acd013
* lisp/ob-core.el (org-babel-result-cond): Document all the arguments 2023-09-07 15:05:40 +03:00
Nicholas Vollmer 4fe52fc8ac
lisp/ob-lilypond.el: refactor org-babel-lilypond-compile-lilyfile
* ob-lilypond.el (org-babel-lilypond-compile-lilyfile):
Correct compilation message.
Remove superfluous local variables.
Remove unused ad-hoc debugging TEST parameter.

* test-ob-lilypond.el (ob-lilypond/ly-compile-lilyfile):
Locally bind variables which may generate output files.
Refactor to account for removed TEST parameter.
2023-09-06 12:33:35 +03:00
Ihor Radchenko 13e4ee7371
org-babel-comint-with-output: Fix for edge case of `comint-prompt-regexp'
* lisp/ob-comint.el (org-babel-comint-with-output): Implement more
universal algorithm catching agglomerated prompts.  The new approach
works for regexps that match ^, but not as the first char in the
regexp string.
* testing/lisp/test-ob-octave.el (ob-octave/session-multiline): Add
new test.

Reported-by: Paul Stansell <paulstansell@gmail.com>
Link: https://orgmode.org/list/CAMJKaZwuTV-06pPz5nv87CNcoVcqCwFjEodubXTzXs15Q=OFug@mail.gmail.com
2023-09-06 12:19:14 +03:00
Nicholas Vollmer f6fc385ed0
ob-lilypond.el: Fix docstring typos 2023-09-04 10:47:28 +03:00
Jens Schmidt 234650af2e
org-make-tags-matcher: Re-add quoting of property names
* lisp/org.el (org-make-tags-matcher):
* testing/lisp/test-org.el (test-org/map-entries): Move special cased
handling of LEVEL properties.  Add tests for other special cased
properties TODO and CATEGORY.

* lisp/org.el (org-make-tags-matcher):
* doc/org-manual.org (Matching tags and properties):
* testing/lisp/test-org.el (test-org/map-entries): Re-add and extend
quoting of property names in search strings.

Link: https://orgmode.org/list/87h6oq2nu1.fsf@gmail.com
2023-09-03 09:48:41 +03:00
Ihor Radchenko dbf415b840
Revert "org-texinfo--match-definition: Drop redundant `save-match-data'"
This reverts commit e32bd5f7c7.

This is `pcase-let*', not `pcase', so the arguments are _all_
evaluated and match data must be preserved in the ARGS binding.

Link: https://yhetil.org/emacs-devel/877cp8bkpa.fsf@bernoul.li
2023-09-02 20:07:07 +03:00
Ihor Radchenko 21654e9a44
* lisp/ob-core.el (org-babel-examplify-region): Document all the arguments 2023-09-02 12:53:08 +03:00
Ihor Radchenko af9c063edf
* lisp/ob-core.el (org-babel-remove-result): Document function arguments 2023-09-01 14:03:39 +03:00
Ihor Radchenko f97877a069
ox-latex: Prefer :latex-src-block-backend INFO property over variable
* lisp/ox-beamer.el (org-beamer-template):
* lisp/ox-latex.el (org-latex-template): Reuse INFO plist to retrieve
src backend.  Direct usage can break user settings where INFO channel
is expected to be modified and have effect.
2023-09-01 13:42:27 +03:00
Ihor Radchenko 91a532b40e
org-babel-expand-noweb-references: Document all the function arguments
* lisp/ob-core.el (org-babel-expand-noweb-references): Fix the
docstring, documenting every argument.
2023-08-31 14:27:36 +03:00
Ihor Radchenko deb5ea0fc0
ob-ruby: Work around long line input
* lisp/ob-ruby.el (org-babel-ruby-var-to-ruby): Some comint buffers
are not able to process more than 4096 characters in one line - the
rest of the line can be silently ignored.  Work around this by
splitting list vars to multiple lines.

Link: https://orgmode.org/list/87pm3ut3zi.fsf@localhost
2023-08-31 12:47:01 +03:00
Ihor Radchenko db679cff98
* lisp/ob-ruby.el (org-babel-ruby-initiate-session): Fix multiline
Without a newline at the end, repl sometimes does not interpret the
prompt settings correctly.
2023-08-31 12:46:21 +03:00
Ihor Radchenko 83411c0d3e
* lisp/ob-ruby.el (org-babel-ruby-evaluate): Fix eoe indicator 2023-08-31 12:46:09 +03:00
Ihor Radchenko ff53846f31
org-babel-comint-with-output: Fix another edge case with REPL prompts
* lisp/ob-comint.el (org-babel-comint-with-output): Sometimes, REPL
can split whitespace between sequence of prompt prompt prompt.

In particular, inf-ruby did this on multiline input.
2023-08-31 12:42:21 +03:00
Jack Kamm 8000b11209 test-ob-python: Unit test for restarting session
See: https://list.orgmode.org/87ttsnh5bx.fsf@localhost/T/#t

* testing/lisp/test-ob-python.el (test-ob-python/session-restart): New
test for restarting ob-python session process.
2023-08-30 21:48:36 -07:00
Jack Kamm b49275acbe Merge branch 'bugfix' 2023-08-30 21:48:18 -07:00
Jack Kamm c81dba2fb9 ob-python: Fix hanging on second start
See: https://list.orgmode.org/87ttsnh5bx.fsf@localhost/T/#t

* lisp/ob-python.el (org-babel-python-initiate-session-by-key): Switch
from `org-babel-comint-wait-for-output' to `sleep-for' while waiting
for `org-babel-python--initialized', to prevent hanging on restarted
Python process.
2023-08-30 21:38:09 -07:00
Ihor Radchenko d8af9c40e0
org-babel-remove-result-one-or-many: Document the prefix argument
* lisp/ob-core.el (org-babel-remove-result-one-or-many): Rename prefix
argument to the conventional ARG and document it in the docstring.
2023-08-30 08:24:11 +03:00
Ihor Radchenko cd0e225e34
* lisp/ob-core.el (org-babel-import-elisp-from-file): Document all function arguments 2023-08-29 12:47:12 +03:00
Ihor Radchenko 3f6c33b7b6
* lisp/ob-core.el (org-babel-temp-stable-file): Document all function arguments 2023-08-29 12:46:58 +03:00
Ihor Radchenko e32bd5f7c7
org-texinfo--match-definition: Drop redundant `save-match-data'
* lisp/ox-texinfo.el (org-texinfo--match-definition): It is safe to
drop `save-match-data' as the function modifies the match data anyway,
and `save-match-data' does not affect anything else.
2023-08-29 12:38:04 +03:00
Ihor Radchenko f02b4c8b4d
org-refile-get-targets: Improve malformed target handling
* lisp/org-refile.el (org-refile-get-targets): Throw better errors
when `org-refile-targets' value is malformed.  Allow common mistake
with not using a cons cell in the target description.
2023-08-27 15:18:12 +03:00
Ihor Radchenko 320c29c021
* lisp/ob-core.el (org-babel-remove-inline-result): Document DATUM argument 2023-08-27 14:04:25 +03:00
Ihor Radchenko 9f12a1b9e4
org-babel-map-executables: Avoid using `save-match-data'
* lisp/ob-core.el (org-babel-map-executables): Drop
`save-match-data' as it may be costly.
2023-08-27 13:10:44 +03:00
Ihor Radchenko 05064052ad
org-babel-map-call-lines: Avoid using `save-match-data'
* lisp/ob-core.el (org-babel-map-call-lines): Drop
`save-match-data' as it may be costly.
2023-08-27 13:10:26 +03:00
Ihor Radchenko 99b65bb212
org-babel-map-inline-src-blocks: Avoid using `save-match-data'
* lisp/ob-core.el (org-babel-map-inline-src-blocks): Drop
`save-match-data' as it may be costly.
2023-08-27 13:09:51 +03:00
Ihor Radchenko b22ebf8c78
Merge branch 'bugfix' 2023-08-27 11:21:25 +03:00
Ihor Radchenko 21171d1366
* testing/lisp/test-org.el (test-org/insert-heading): Fix test
The test itself is wrong - `org-insert-heading' was correctly obeying
blank before the entry at point when inserting a new heading.
2023-08-27 11:18:49 +03:00
Ihor Radchenko 1dcde9889b
Merge branch 'bugfix' 2023-08-26 19:13:33 +03:00
Ihor Radchenko 7c929e9d8c
* lisp/oc-basic.el: Fix parsing "editor" field in json bibliographies
(org-cite-basic--parse-json): Parse "editor" field, not "editors".
"editors" is a typo - the common field name is "editor".  For example,
see https://www.bibtex.com/e/book-entry/.

Reported-by: Margaret Patterson <emacs-m@ninecats.org>
Link: https://list.orgmode.org/orgmode/ea0d8557-f67d-c8b1-522f-b5ad37612d99@ninecats.org/
2023-08-26 19:10:05 +03:00
Ihor Radchenko b3c7ebecac
* lisp/ob-core.el (org-babel-format-result): Document SEP argument 2023-08-26 15:06:20 +03:00
Ihor Radchenko f299fbbbb0
org-export--prepare-file-contents: Drop redundant `save-match-data'
`save-match-data' is costly.  We should not use it unless necessary.
2023-08-26 14:29:17 +03:00