Commit graph

2468 commits

Author SHA1 Message Date
Ihor Radchenko ef23b4706b
org-babel-tangle: Do not allow tangling into self
* lisp/ob-tangle.el (org-babel-tangle): Throw an error when trying to
tangle into the org file we tangle from.
* etc/ORG-NEWS (It is no longer allowed to tangle into the same file
as Org source): Document the breaking change.
* testing/lisp/test-ob-tangle.el (ob-tangle/tangle-to-self): New test.
2024-01-26 16:54:04 +01:00
Ihor Radchenko ea529007d7
ox-html: Fix links to targets that do not have a number
* lisp/ox.el (org-export-get-ordinal): Return nil when ELEMENT does
not match PREDICATE.  `ox-html-link' expects this behavior when a link
refers to target that does not have a caption.
* testing/lisp/test-ox.el (test-org-export/get-ordinal): Fix tests.

Reported-by: gerard.vermeulen@posteo.net
Link: https://orgmode.org/list/7bf1f79071a714750634e76130fe5963@posteo.net
2024-01-25 13:30:35 +01:00
Ihor Radchenko 83696bf21f
org-export-activate-smart-quotes: Fix edge case with multiple secondary strings
* lisp/ox.el (org-export--smart-quote-status): Do not hash quote
status by parent syntax node - it will create clashes when parent has
multiple secondary strings.  Instead, hash by parent + secondary
string property.
* testing/lisp/test-ox.el (test-org-export/activate-smart-quotes): Add
new test case.

Reported-by: William Denton <william@williamdenton.org>
Link: https://orgmode.org/list/TarY7-tR4TEmIu8jawOtTyyi03K93WIg7DsS1eXNylelCy2Hv-6OFNKOMQMukf70Tzf3uO_2F1Qe7xwrzb43SpJc4jxJZLN3W0MioKYbgzI=@williamdenton.org
2024-01-21 13:44:50 +01:00
Ihor Radchenko 92c53f23d3
org-get-outline-path: Drop COMMENT keywords from the outline path
* lisp/org.el (org--get-outline-path-1): Remove comment keyword from
title when current heading is commented.
* testing/lisp/test-org.el (test-org/get-outline-path): Add test.
2024-01-18 15:13:04 +01:00
Ihor Radchenko a19a72f7d3
org-agenda: Fix grid lines when `org-agenda-default-appointment-duration' is non-nil
* lisp/org-agenda.el (org-agenda-add-time-grid-maybe): Let-bind
`org-agenda-default-appointment-duration' to nil when formatting the
grid lines.  Otherwise, `org-agenda-format-item' logic fails to
produce the expected result.
* testing/lisp/test-org-agenda.el (test-org-agenda/time-grid): Add new
test set covering the bug and several simpler cases.
* testing/examples/agenda-file2.org (two): New test file example.

Reported-by: Detlef Steuer <steuer@hsu-hh.de>
Link: https://orgmode.org/list/87edv5fv1w.fsf@localhost
2024-01-17 15:40:24 +01:00
Ihor Radchenko 87da1ff15b
org-cite-basic-export-citation: Fix prefix/suffix being ignored
* lisp/oc-basic.el (org-cite-basic-export-citation): Honour prefix and
suffix in citation references and citations.
* testing/examples/Basic.bib: New example bibliography used by tests.
* testing/lisp/test-oc-basic.el:
(test-org-cite-basic/parse-bibliography):
(test-org-cite-basic/export-citation): New file, adding tests for
oc-basic processor.

Reported-by: William Denton <william@williamdenton.org>
Link: https://orgmode.org/list/FMaPNvYf_8jqVxcU2L5kgiMuejm0NqK3e9D7CzhSzG-fmESTZKgtAJy1LG_zNDLS6o_oQ-gF_G-6DXlXA2iQ_yAjNjLgeB86JTU46Sv8Wec=@williamdenton.org
2024-01-16 13:38:27 +01:00
Ihor Radchenko 38c6eb2b72
ox-latex: Do not use float for inline images inside links
* lisp/ox.el (org-export-insert-image-links): Fix call to
`org-element-set-contents' - setting "nil" literally would put an
actual nil element into contents.
* lisp/ox-latex.el (org-latex--inline-image): Do not use float
environment unless the inline image is a single image inside
paragraph.  The code is adapted with simplifications from
`org-html-standalone-image-p'.
* testing/lisp/test-ox-latex.el (test-ox-latex/inline-image): New
test.

Reported-by: Dr. Arne Babenhauserheide <arne_bab@web.de>
Link: https://orgmode.org/list/878rest3qv.fsf@localhost
2024-01-15 13:52:43 +01:00
Ihor Radchenko c41a89676e
org-next-visible-heading: Fix when moving over non-descriptive link
* lisp/org.el (org-next-visible-heading): Really test for visibility;
not folding.  Some folds may not be invisible - when
`org-link-descriptive' is nil, links are folded yet visible.
* testing/lisp/test-org.el (test-org/next-visible-heading): Add new
test case.

Reported-by: Rudolf Adamkovič <salutis@me.com>
Link: https://orgmode.org/list/m2bk9q7adw.fsf@me.com
2024-01-13 13:35:52 +01:00
Ihor Radchenko f9702a09e7
org-fold: Fix edge case when revealing fragile folds breaks some Emacs commands
* lisp/org-fold-core.el (org-fold-core--fix-folded-region): Delay
revealing fragile regions to until the current command is executed.
(org-fold-core--region-delayed): New function to postpone folding to
the time when `post-command-hook' is executed.
(org-fold-core--region-delayed-list): New internal variable holding
delayed fold requests.
(org-fold-core--process-delayed): New function to be used to process
the delayed folds and cleanup `post-command-hook'.
*
testing/lisp/test-org-fold.el (test-org-fold/org-fold-reveal-broken-structure):
Update tests to account for the delayed unfolding.

Reported-by: Sebastian Miele <iota@whxvd.name>
Link: https://orgmode.org/list/875y04yq9s.fsf@localhost
2024-01-09 16:42:42 +01:00
Ihor Radchenko c9e5270bf1
lisp/org.el (org-self-insert-command): Do not skip fragility checks
* lisp/org-fold-core.el (org-fold-core--suppress-folding-fix):
(org-fold-core-suppress-folding-fix): New macro suppressing re-folding
checks.
(org-fold-core--fix-folded-region): Skip re-folding checks when
`org-fold-core--suppress-folding-fix' is non-nil.
* lisp/org.el (org-self-insert-command): Use
`org-fold-core-suppress-folding-fix' to bypass re-folding checks, but
not fragility checks.
*
testing/lisp/test-org-fold.el (test-org-fold/org-fold-reveal-broken-structure):
New test.
2024-01-09 16:40:22 +01:00
Kyle Meyer aab2c94531 Update copyright years for main-only files 2024-01-06 16:06:47 -05:00
Kyle Meyer 72a2db86d9 Merge branch 'bugfix' 2024-01-06 16:02:02 -05:00
Kyle Meyer 1666eeef55 Update remaining copyright years
Most copyright years were updated with the port of Emacs's 8e1c56ae4
in 9f1d6dfd7.  Update the remaining copyright years for files that
have Free Software Foundation as the copyright holder but aren't
included in the Emacs repo.
2024-01-06 15:55:18 -05:00
Ihor Radchenko d6117f895c
org-element-cache: Provide Elisp API to store user data inside the cache
* lisp/org-element.el (org-element-cache-store-key):
(org-element-cache-get-key): New functions to store and retrieve data
associated with cached nodes.  The data is stored inside
:fragile-cache and :robust-cache node properties.
(org-element--cache-shift-positions): Clear :fragile-cache when the
contents boundaries are changed.  Optimize when OFFSET is 0.
* lisp/org-element.el (org-element--cache-process-request): Call
`org-element--cache-shift-positions' even for 0 offset to account for
:fragile-cache.
* etc/ORG-NEWS (New API functions to store data within
~org-element-cache~): Announce the new API.
* testing/lisp/test-org-element.el (test-org-element/cache-get-key):
New test.
2024-01-04 14:23:08 +01:00
Ihor Radchenko dfeff03c5a
lisp/org-element-ast.el (org-element-copy): Fix altering source element
* testing/lisp/test-org-element.el (test-org-element/copy): Add new
test case.

Reported-by: gerard.vermeulen@posteo.net
Link: https://orgmode.org/list/e0252d664af25728243734d67432ad64@posteo.net
2024-01-03 15:57:01 +01:00
Jack Kamm d0d838b02e ob-python: Test and improve robustness for externally started python
* lisp/ob-python.el (org-babel-python-initiate-session-by-key): Wait
for first prompt for pre-existing python processes.  Document behavior
for pre-existing python processes.
(org-babel-python-initiate-session): Document behavior for
pre-existing python processes.
*
testing/lisp/test-ob-python.el (test-ob-python/session-with-existing-inferior-python):
New test for working with existing python processes.
2023-12-29 07:46:49 -08:00
Ihor Radchenko d15e52fef4
org-element: Distinguish between [[/path/to]] and [[file:/path/to]] links
* lisp/org-element.el (org-element-link-parser): Record information
whether link type: is implicit or explicitly provided in the input
text.  The information is saved into new link object property
`:type-explicit-p'.
(org-element-link-interpreter): Take into account `:type-explicit-p'
when interpreting link object.
(org-element-cache-version): Bump AST version.
* testing/lisp/test-org-element.el (test-org-element/link-interpreter):
Add new test.

Reported-by: Joseph Turner <joseph@ushin.org>
Link: https://orgmode.org/list/87o7e9ei3p.fsf@ushin.org
2023-12-29 15:44:10 +01:00
Ihor Radchenko 539728840f
ox-latex: Fix exporting longtable with multiline header
* lisp/ox-latex.el (org-latex-table-row): Use all the rows when
constructing header definition.
* testing/lisp/test-ox-latex.el (test-ox-latex/longtable): Add new
test.

Reported-by: Brett Presnell <presnell@member.fsf.org>
Link: https://orgmode.org/list/87mt9zywco.fsf@localhost
2023-12-23 12:03:36 +01:00
Ihor Radchenko 92fec81e2e
lisp/org.el (org-sort-entries): Fix sorting partially selected subtree
* lisp/org.el (org-sort-entries): Make sure that we extend sorted
region to the full subtree if it spans beyond end of region.
* testing/lisp/test-org.el (test-org/sort-entries): Add test.
2023-12-17 14:58:44 +01:00
Ihor Radchenko bf1d45f9ba
org-lint: Remove checker for #+name with colon
* lisp/org-lint.el (org-lint-colon-in-name):
(colon-in-name): Remove the checker.  It is no longer a problem after
b5cfc311d that allows referring to named elements with name containing
colon.
* testing/lisp/test-org-lint.el (test-org-lint/colon-in-name): Remove
test.
2023-12-17 14:57:03 +01:00
Ihor Radchenko d2ce1c6ec1
lisp/ox-texinfo.el: Fix @menu in headlines without contents
* lisp/ox-texinfo.el (org-texinfo--normalize-headlines): Do not rely
upon undocumented implementation side-effects in `org-element-create'
that have been changed.

*
testing/lisp/test-ox-texinfo.el (test-ox-texinfo/normalize-headlines):
New test.

Reported-by: Jonas Bernoulli <jonas@bernoul.li>
Link: https://orgmode.org/list/87zfybnqwf.fsf@bernoul.li
2023-12-16 15:10:29 +01:00
Ihor Radchenko 15cf8c3fcd
Merge branch 'bugfix' 2023-12-15 15:02:45 +01:00
Ihor Radchenko 6e72a4c7f0
lisp/ox-md.el (org-md--footnote-section): Honor `org-md-toplevel-hlevel'
* testing/lisp/test-ox-md.el (ox-md/footnotes-level): New test file
and new test for the bug.

Reported-by: Pablo Padilla <pgpb.padilla@gmail.com>
Link: https://orgmode.org/list/AC5BC3B4-33F9-487E-877E-EA9A829608A5@gmail.com
2023-12-15 15:01:57 +01:00
Ihor Radchenko 0740e62df8
lisp/ox-ascii.el: Fix justification of special blocks
* lisp/ox-ascii.el (org-ascii--current-justification): Fix typos in
the code.
* testing/lisp/test-ox-ascii.el (test-ox-ascii/justify): Add test.

Reported-by: Gregor Zattler <telegraph@gmx.net>
Link: https://orgmode.org/list/87o7ft8gxo.fsf@no.lan
2023-11-17 10:28:32 +02:00
Ihor Radchenko 6feef2a279
Merge branch 'bugfix' 2023-11-07 12:52:46 +02:00
Tomohisa Kuranari 93ebd64de1
org-beginning/end-of-line: Fix when moving to different line
* lisp/org.el (org-beginning-of-line, org-end-of-line): Fix issue with
`org-special-ctrl-a/e' not working correctly when moving to different
line.
* testing/lisp/test-org.el (test-org/beginning-of-line,
test-org/end-of-line): Add new tests.
2023-11-07 12:50:40 +02:00
Ihor Radchenko 9c255cacfe
org-element-ignored-local-variables: Add missing variables
This fixes ox-hugo bug when Org buffer copy cache is corrupted.

* lisp/org-element.el (org-element--cache-variables): Add
more state variables.  Move above
`org-element-ignored-local-variables' definition.
(org-element-ignored-local-variables): Make use of the value of
`org-element--cache-variables'.
*
testing/lisp/test-org-element.el (test-org-element/cache-ignored-locals):
Add guard against adding new cache state variables that are not listed
in `org-element--cache-variables'.

Reported-by: George Kettleborough <kettleg@gmail.com>
Link: https://orgmode.org/list/41acf96e-8f62-4ed5-9853-b4ff4e0e2fa9@gmail.com
2023-10-25 11:00:51 +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 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 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 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
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
Ihor Radchenko ec23993301
lisp/ox.el: Ignore case when matching headings and targets
* lisp/ox.el (org-export-search-cells):
(org-export-string-to-search-cell): Ignore case in headline titles and
radio targets.
* testing/lisp/test-ox.el (test-org-export/fuzzy-link): Add new test.

ox.el implements an independent link resolution mechanism that is not
fully consistent with ol.el.  In particular, radio links, when
resolved via `org-export-resolve-link' (unlike
`org-export-resolve-radio-link'), were previously case-sensitive, in
contrast with ol.el, which is case-insensitive.  Similarly, headline
matching by fuzzy links had inconsistency between `org-link-search'
and what ox.el does.

Link: https://orgmode.org/list/m2cyxl3qd0.fsf@me.com
2023-10-14 11:45:57 +03:00
Ihor Radchenko 0d214ef008
org-element--current-element: Fix edge case with affiliated keywords
* lisp/org-element.el (org-element--collect-affiliated-keywords): Fix
edge case when a keyword matching affiliated keyword is preceding an
element that is not allowed to have such.  We need to handle this case
specially here rather than in `org-element--current-element' to avoid
the default paragraph fallback.
(org-element--current-element): Add a comment describing the pitfall.
*
testing/lisp/test-org-element.el (test-org-element/affiliated-keywords-parser):
Add more tests.

Reported-by: Tom Alexander <tom@fizz.buzz>
Link: https://orgmode.org/list/e2be976d-1bcf-4136-9968-33212dcd1f83@app.fastmail.com
2023-10-13 15:14:57 +03:00
Ihor Radchenko 0e3d0e3d19
org-element--collect-affiliated-keywords: Fix keywords before comment
* lisp/org-element.el (org-element--collect-affiliated-keywords):
Disallow affiliated keywords before a comment.
*
testing/lisp/test-org-element.el (test-org-element/affiliated-keywords-parser):
Add new test.
*
testing/lisp/test-org-element.el (test-org-element/cache-affiliated):
Fix test.

Reported-by: Tom Alexander <tom@fizz.buzz>
Link: https://orgmode.org/list/87c20267-d12e-4641-a1eb-3a7ac8181069@app.fastmail.com
2023-10-12 14:24:35 +03:00
Ihor Radchenko fba3fd56c4
org-element-org-data-parser: Allow leading blank lines before property drawer
* lisp/org-element.el (org-element--get-global-node-properties):
(org-element-org-data-parser):
(org-element--current-element): Allow blank lines at the beginning of
Org document.  Blank lines where allowed in the past (:contents-begin
started after the blank lines), but it was previously not possible to
have top-level property drawer in an Org document starting from blank
lines.  Now, it is possible.

* testing/lisp/test-org-element.el (test-org-element/org-data-parser):
Add new tests.

Reported-by: Tom Alexander <tom@fizz.buzz>
Link: https://orgmode.org/list/0ec8c4ae-4f5b-4e37-8c5c-f92ef497a461@app.fastmail.com
2023-10-12 13:34:08 +03:00
Ihor Radchenko fe23bec607
* lisp/org-element.el (org-element-subscript-parser): Fix edge case
Fix when both subscript and underline object match in
`org-element--object-lex'.
*
testing/lisp/test-org-element.el (test-org-element/underline-parser):
Add new test.

Reported-by: Tom Alexander <tom@fizz.buzz>
Link: https://orgmode.org/list/dad964f5-c764-4dd5-9829-ca38e3fbeb0d@app.fastmail.com
2023-10-10 15:05:38 +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
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
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 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 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
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
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
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