* lisp/ox.el (org-export--smart-quote-status): When quotes are not
balanced, treat " literally and ' as apostrophes.
* testing/lisp/test-ox.el (test-org-export/activate-smart-quotes): Fix
test with unbalanced " and add new tests for unbalanced quotes.
Reported-by: Juan Manuel Macías <maciaschain@posteo.net>
Link: https://list.orgmode.org/orgmode/875xxfqdpt.fsf@posteo.net/
* lisp/ob-shell.el (org-babel-shell-initialize): force blocks to
always use the specified shell language
Sessions are initialized using `shell'. The `shell' command checks
`explicit-shell-file-name' for file to use before checking other
variables, like `shell-file-name'. Previously, only `shell-file-name'
was set. So, if the user had set the `explicit-shell-file-name',
session blocks would use that whereas non-session blocks would use
`shell-file-name', resulting in inconsistent behavior. This change
sets both variables so that even if the user changes the
`explicit-shell-file-name' or `shell-file-name', blocks will only use
the shell language specified by the block.
TINYCHANGE
* lisp/org-persist.el (org-persist--check-write-access): New function
checking write access to creating a directory and all the necessary
parents. The function is a refactoring of duplicated code that
previously checked one parent beyond what needs to be created.
(org-persist-write:index): Use the new function. Create
`org-persist-directory' together with all its parents. Gracefully
handle failure.
* lisp/org-persist.el: Use the new function when adding hooks to
`kill-emacs-hook'.
Reported-by: Al Oomens <aloomens@outlook.com>
Link: https://list.orgmode.org/MW4PR19MB6888F37194BA260AE5631770C4332@MW4PR19MB6888.namprd19.prod.outlook.com
* lisp/org-persist.el (org-persist--check-write-access): New function
checking write access to creating a directory and all the necessary
parents. The function is a refactoring of duplicated code that
previously checked one parent beyond what needs to be created.
(org-persist-write:index): Use the new function. Create
`org-persist-directory' together with all its parents. Gracefully
handle failure.
* lisp/org-persist.el: Use the new function when adding hooks to
`kill-emacs-hook'.
Reported-by: Al Oomens <aloomens@outlook.com>
Link: https://list.orgmode.org/MW4PR19MB6888F37194BA260AE5631770C4332@MW4PR19MB6888.namprd19.prod.outlook.com
* lisp/org.el (org-create-math-formula): Avoid using
`find-file-noselect' to check contents of the generated mathml
formula. `find-file-noselect' runs a number of hooks, which are not
necessary and may sometimes throw errors.
Link: https://orgmode.org/list/ut96a7$i6d$1@ciao.gmane.io
* lisp/ox-beamer.el (org-beamer--format-frame, org-beamer-template):
Only use `org-beamer-frame-environment' when a frame is marked as
fragile and the frame's contents include either \begin{frame} or
\end{frame}. When `org-beamer-frame-environment' is used and not
equal to "frame", add the property :beamer-define-frame to INFO and
set it to t. When that property is t, `org-beamer-template' emits a
definition of the alternative frame environment.
Refs: https://list.orgmode.org/orgmode/87bk7jeik8.fsf@localhost/https://list.orgmode.org/87a5nux3zr.fsf@t14.reltub.ca/T/
* lisp/ob-shell.el (org-babel-shell-initialize): force blocks to
always use the specified shell language
Sessions are initialized using `shell'. The `shell' command checks
`explicit-shell-file-name' for file to use before checking other
variables, like `shell-file-name'. Previously, only `shell-file-name'
was set. So, if the user had set the `explicit-shell-file-name',
session blocks would use that whereas non-session blocks would use
`shell-file-name', resulting in inconsistent behavior. This change
sets both variables so that even if the user changes the
`explicit-shell-file-name' or `shell-file-name', blocks will only use
the shell language specified by the block.
TINYCHANGE
A table with MxN dimensions is converted to a MxN matrix when given in
:var to a Calc source block. A table with a single row is converted
to a vector (i.e., row vector).
* lisp/ob-calc.el (org-babel-execute-src-block:calc): Construct the
right data structure to pass tables as matrices to Calc.
* testing/lisp/test-ob-calc.el: Add tests for ob-calc, and this new
feature.
* etc/ORG-NEWS: Announce the feature.
* mk/default.mk (BTEST_OB_LANGUAGES): Enable ob-calc tests by default.
* lisp/org-macs.el (org-with-file-buffer): New macro switching to a
file buffer temporarily and killing it if a buffer visiting file did
not exist previously.
(org-file-buffer-created): New variable set when buffer visiting file
has been created.
* lisp/ob-tangle.el (org-babel-tangle-file):
* lisp/org-archive.el (org-archive-subtree):
* lisp/org-refile.el (org-refile):
(org-refile-check-position):
(org-refile-new-child):
* lisp/ox-org.el (org-org-publish-to-org):
* lisp/ox-publish.el (org-publish-org-to):
(org-publish-find-property): Avoid calling `find-buffer-visiting' +
`find-file-noselect'. The latter calls the former. Instead, either
just call `find-file-noselect' or use `org-with-file-buffer'.
This commit addresses O(N_buffers) complexity in
`find-buffer-visiting', reducing the number of calls to it.
See Emacs bug#66117.
* lisp/ob-shell.el (org-babel-shell-initialize): force blocks to
always use the specified shell language
Sessions are initialized using `shell'. The `shell' command checks
`explicit-shell-file-name' for file to use before checking other
variables, like `shell-file-name'. Previously, only `shell-file-name'
was set. So, if the user had set the `explicit-shell-file-name',
session blocks would use that whereas non-session blocks would use
`shell-file-name', resulting in inconsistent behavior. This change
sets both variables so that even if the user changes the
`explicit-shell-file-name' or `shell-file-name', blocks will only use
the shell language specified by the block.
Submitted by: "Aaron L. Zeng" me@bcc32.com
TINYCHANGE
* lisp/org.el (org-insert-property-drawer): When folding style is
overlays, do not use outline folds to fold the property drawer.
Reported-by: Bruno Cardoso <cardoso.bc@gmail.com>
Link: https://orgmode.org/list/87wmq5btzn.fsf@gmail.com
* lisp/org-src.el (org-src-font-lock-fontify-block): Improve the translation
of local positions into org-buffer positions, and get rid of
assumption about the value of `point-min' while we're at it.
* lisp/org.el (org--warnings): New variable storing Org mode warnings
to be submitted together with bug reports.
(org-submit-bug-report): Add `org--warnings' to bug report template.
* lisp/org-element.el (org-element--cache-warn): Store cache warnings
for submission.
* lisp/org.el (org-update-parent-todo-statistics): Make sure that we
move to the end of updated cookie at the end of search loop, even when
the cookie has not been updated.
Reported-by: No Wayman <iarchivedmywholelife@gmail.com>
Link: https://orgmode.org/list/87le6pucnv.fsf@gmail.com
* lisp/ob-exp.el (org-babel-exp-do-export): Display warning when
:exports value is not known. Document nil return value.
(org-babel-exp-process-buffer): Do not remove code block when
`org-babel-exp-do-export' returns nil.
Reported-by: Max Nikulin <manikulin@gmail.com>
Link: https://orgmode.org/list/usc9jn$g2r$1@ciao.gmane.io
* lisp/org-macs.el (org-do-remove-indentation): Set
`buffer-invisibility-spec' to nil before detecting the column or
moving to a column.
This fixes src_block indentation removal for org-modern-mode but will
also correct other cases of hidden indentation.
TINYCHANGE
* lisp/org-macs.el (org-mks): Make sure that selection window is
closed upon exiting. See also fef873b1c.
Reported-by: Björn Bidar <bjorn.bidar@thaodan.de>
Link: https://orgmode.org/list/874jdg2ipo.fsf@
* lisp/ox-html.el (org-html-link):
* lisp/ox-latex.el (org-latex-link):
* lisp/ox-man.el (org-man-link):
* lisp/ox-md.el (org-md-link):
* lisp/ox-odt.el (org-odt-link--inline-image):
* lisp/ox-texinfo.el (org-texinfo-link): Preserve link type during
export for all the links, not just for a hard-coded subset.
* etc/ORG-NEWS (Built-in HTML, LaTeX, Man, Markdown, ODT, and Texinfo
exporters preserve the link protocol during export): Document the
breaking change.
Link: https://list.orgmode.org/orgmode/878r9nofpw.fsf@localhost/
Until now @dircategory/@direntry entries were added only if
both TEXINFO_DIR_CATEGORY and TEXINFO_DIR_TITLE were set.
And the setting of TEXINFO_DIR_TITLE had to be careful to
provide exactly the right syntax.
This patch changes various things in this regard:
- Always generate a @dircategory/@direntry.
- Default TEXINFO_DIR_CATEGORY to "Misc".
- Use the document title by default if TEXINFO_DIR_DESC is missing.
- Rename TEXINFO_DIR_TITLE to TEXINFO_DIR_NAME.
- Use the filename by default when TEXINFO_DIR_NAME is missing.
- Try and make it harder to provide a direntry that does not
have the right format or refers to a different filename than
the one we're outputting to.
* lisp/ox-texinfo.el (texinfo): Add entry for TEXINFO_DIR_NAME.
(org-texinfo-template): Use sane defaults for `@direntry` and `@dircategory`.
* doc/org-manual.org (Texinfo specific export settings): Adjust accordingly.
(Info directory file, A Texinfo example, Export Setup): Update examples
to use the new syntax.
* etc/ORG-NEWS (Version 9.7 / New features): Add entry.
* lisp/ob-core.el (org-babel-get-colnames): When table starts with
horizontal lines, consider column names to be the first non-hline row.
(org-babel-disassemble-tables): When detecting automatic column names,
do not assign colnames when the first row is an hline.
* doc/org-manual.org (Passing arguments): Update the manual, detailing
that leading hline rows are skipped for :colnames yes.
Link: https://orgmode.org/list/87wmqexjoj.fsf@localhost
* lisp/ob-latex.el (org-babel-expand-body:latex):
* lisp/ob-lilypond.el (org-babel-expand-body:lilypond):
* lisp/ob-org.el (org-babel-expand-body:org):
* lisp/ob-sql.el (org-babel-sql-expand-vars): Pass FIXEDCASE and
LITERAL arguments to `replace-regexp-in-string'. This avoids changing
case and special handling of \N constructs in the replacement string.
* lisp/ob-gnuplot.el (org-babel-expand-body:gnuplot): Pass FIXEDCASE
and LITERAL arguments to `replace-regexp-in-string'. This prevents it
from "smartly" altering the replacement text case when the variable
name is upcased like $C or $FOO; and from interpreting \N constructs.
Reported-by: Paul Stansell <paulstansell@gmail.com>
Link: https://orgmode.org/list/CAMJKaZyH0ZwaitHxCTdd2ZGMKOZtVCvwVf_OEuRe9crPbqG9jA@mail.gmail.com
* lisp/org-mobile.el (org-mobile-create-index-file): Fix argument
order in the call to `expand-file-name'.
Reported-by: Fabian Brosda <f.brosda@gmx.de>
Link: https://orgmode.org/list/87a5ngxzcr.fsf@gmx.de
* lisp/org-fold-core.el (org-fold-core-region): Do not just update
folds before/after. Refresh newlines created by splicing a fold by
unfolding in the middle of an existing fold. Then, fold list between
from/to will not cover the folds right before from and right after to.
Reported-by: StrawberryTea <look@strawberrytea.xyz>
Link: https://orgmode.org/list/878r2xfk60.fsf@strawberrytea.xyz
* lisp/ob-babel.el (org-babel-demarcate-block): Modify a copy
of (org-element-at-point) to replace the old source block with 2 or 3
new modified copies by means of `org-element-interpret-data'. The 1st
source block contains the text from the body of the old block before
point or region, the 2nd block contains the body text after point or
body text within region, and in case of region, the 3rd block contains
the text after region. The caption and the name are deleted from the
1 or 2 blocks below the upper source block. Indent all blocks
immediately after insertion. Use :post-blank to control white lines
between inserted blocks. Leave point at the last inserted block.
Trying to split when point or region is not within the body of the old
source block raises an user-error.
* lisp/ob-babel (org-get-src-block-info): add the "within blank lines
after a source block" condition to the doc-string to match it with the
doc-string of and a comment in `org-babel-demarcate-block'.
* testing/lisp/test-ob.el (test-ob/demarcate-block-split-duplication)
(test-ob/demarcate-block-split-prefix-point)
(test-ob/demarcate-block-split-prefix-region)
(test-ob/demarcate-block-split-user-errors)
(test-ob/demarcate-block-wrap-point)
(test-ob/demarcate-block-wrap-region): New tests to check test cases
that broke earlier versions of this patch.
Link: https://list.orgmode.org/7e41f9b6e9026a404e256f33371e974c@posteo.net/
* lisp/org-agenda.el (org-agenda-write): Make sure headlines are not
duplicated when writing to an `org' file, even if they are repeated in
the agenda view.
For example, a headline may appear multiple times in the agenda
view (for example, if it has multiple time stamps). But
org-agenda-write should write it only once to the output `org' file.
TINYCHANGE
* lisp/org-fold-core.el (org-fold-core-region): Make sure that we
refresh fontification of newlines after folds when unfolding is
requested across multiple non-intersecting folds.
Reported-by: StrawberryTea <look@strawberrytea.xyz>
Link: https://orgmode.org/list/87y1b0m0ij.fsf@strawberrytea.xyz
* org-archive.el (org-add-archive-files): Use `seq-uniq' with TESTFN
`file-equal-p' to de-duplicate the list of gathered files.
Previously, `org-uniquify' was used. This de-duplicates the
file-names, but not necessarily the files. The problem occurs if the
list of file-names includes distinct file-names that reference the
same file (symbolic links, for example).
TINYCHANGE
* lisp/ox-beamer.el (org-beamer-template): Do not try to define
`org-beamer-frame-environement' when it is set to "frame" - the same
as the existing frame environment.
Reported-by: Pedro Andres Aranda Gutierrez <paaguti@gmail.com>
Link: https://orgmode.org/list/87a5nh1r9h.fsf@t14.reltub.ca
* lisp/ob-core.el (org-babel-do-in-edit-buffer): Avoid throwing an
error when something is not right with the code block. We already
ignore errors when major mode fails to load and we generally don't
want this macro to fail as it is used during indentation.
Link: https://list.orgmode.org/orgmode/87wmqo3it5.fsf@localhost/
* lisp/org.el (org-up-heading-safe): Fix return value, making sure
that the returned level is not reduced. This is what other code
expects and what used to be the case before refactoring, in previous
version of the function.
* testing/lisp/test-org.el (test-org/up-heading-safe): Add test.
Reported-by: E.L.K. <some.any.key@gmail.com>
Link: https://orgmode.org/list/CAF+cOoPuh8rzVRoV9-pGSP3SVRm-M8ZQrM=xGB+o4TqJat_O-A@mail.gmail.com
* lisp/org-table.el (org-table-to-lisp): When parsing table, keep text
properties. These text properties are required to calculate table
alignment with invisible text.
* testing/lisp/test-org-table.el (test-org-table/align): Add new test.
Reported-by: Kostadin Ninev <dinkonin@gmail.com>
Link: https://orgmode.org/list/1709041784097.2987395179.620232376@gmail.com
* lisp/ol.el (org-target-link-regexp-limit): New constant defining
maximum regexp limit where `org-target-link-regexp' is still safe to
use without triggering "Regexp too long" error.
(org-target-link-regexps): New variable holding a series of shorter
regexps to be used instead of too long single
`org-target-link-regexp'.
(org--re-list-search-forward): New function like `re-search-forward',
but accepting a list of regexps.
(org--re-list-looking-at): New function like `looking-at', but
accepting a list of regexps.
(org-update-radio-target-regexp): When `org-target-link-regexp' is too
long, set `org-target-link-regexps', partitioning the link target list
into smaller regexps.
* lisp/org-element.el (org-element-link-parser):
(org-element--object-lex):
* lisp/org.el (org-activate-target-links): Use
`org--re-list-search-forward' and `org--re-list-looking-at' when
`org-target-link-regexps' is non-nil.
* testing/lisp/test-org-element.el (test-org-element/link-parser): Add
tests.
Reported-by: Rudolf Adamkovič <salutis@me.com>
Link: https://list.orgmode.org/orgmode/m2lenax5m6.fsf@me.com/
* lisp/ob-tangle.el: Add new custom option
`org-babel-tangle-remove-file-before-write'.
(org-babel-tangle): Remove file before writing according to the value
of `org-babel-tangle-remove-file-before-write'.
The variable `org-babel-tangle-remove-file-before-write' adds support
for the current and old behaviour of `org-babel-tangle'.
Link: https://list.orgmode.org/orgmode/877cjzhjtg.fsf@liolin.ch/
Co-authored-by: Ihor Radchenko <yantar92@posteo.net>
TINYCHANGE
* lisp/org-colview.el (org-columns--compute-spec): Do not assume that
all the children of an entry have the same LAST-LEVEL. Handle
situation when the first child has lower level:
* Heading
****** Child 1
** Child 2
** Child 3
Reported-by: Uwe Brauer <oub@mat.ucm.es>
Link: https://orgmode.org/list/87wn8yj2i5.fsf@localhost
* lisp/oc-basic.el (org-cite-basic--print-bibtex-string): New function
approximately parsing Bibtex strings and dropping {...}.
(org-cite-basic--print-entry): Use the new function.
* testing/examples/Basic.bib:
*
testing/lisp/test-oc-basic.el (test-org-cite-basic/export-bibliography):
Add test.
Reported-by: Dominik Schrempf <dominik.schrempf@gmail.com>
Link: https://orgmode.org/list/CAF+0kSg8O3RQBG1wXoHjMEHwnGFz0gaDkTTSGv+ZaOt4d4myCA@mail.gmail.com
* lisp/org-element-ast.el (org-element-set-element): When setting
plain-text node, return the new node instead of immutable old one.
* testing/lisp/test-org-element.el (test-org-element/set): Add test.
* lisp/org-agenda.el (org-agenda-get-deadlines, org-agenda-get-scheduled):
Use minimum of warning/delay days specified in timestamp cookie and the
limit specified by `org-agenda-skip-deadline-prewarning-if-scheduled' or
`org-agenda-skip-scheduled-delay-if-deadline`, respectively.
* testing/lisp/test-org-agenda.el (test-org-agenda/skip-deadline-prewarning-if-scheduled):
New test.
Link: https://orgmode.org/list/59e48dfe744dc9409ff47183255bc64e92d26d88.camel@timruffing.de
TINYCHANGE
* lisp/org-entities.el (seq): Require seq.el - it is not preloaded in
Emacs <28.
* lisp/org.el (org--image-yank-media-handler): Suppress warning and
throw an error about `file-name-with-extension'. This function is not
supposed to be called in older Emacs.
* lisp/oc-basic.el (org-cite-basic--shorten-names): Provide third
argument for `mapconcat'. It is mandatory in Emacs <29.
* lisp/org.el (org--image-yank-media-handler): Suppress warning and
throw and error in Emacs <29.
(org--dnd-rmc): Do not try to call `use-dialog-box-p' in Emacs <29.
* lisp/org-fold-core.el (org-fold-core--update-buffer-folds): New
function updating buffer folds in copied text for current buffer.
(org-fold-core-decouple-indirect-buffer-folds): Use the new function.
* lisp/org-element.el (org-element--generate-copy-script): Synchronize
folds.
* lisp/org-agenda.el (org-agenda-get-restriction-and-command): When
agenda selection is aborted or completed by any means, quit agenda
command selection window.
Reported-by: Björn Bidar <bjorn.bidar@thaodan.de>
Link: https://list.orgmode.org/orgmode/87il2ai916.fsf@/
* lisp/org.el (org-activate-folds): When a fold is created by link
abbreviation, and a link ends at eol, do not force the newline after
the ]] to have the same face as the link.
Reported-by: Rohit Patnaik <quanticle@quanticle.net>
Link: https://orgmode.org/list/6d440976-6747-4ce6-8913-b63931dd017f@app.fastmail.com
* lisp/org-fold-core.el (org-fold-core-get-folding-spec): When SPEC is
nil, do not rely upon 'invisible property value to determine the fold.
Examine unique property set by `org-fold-region' instead.
* lisp/org-element.el (org-element--generate-copy-script): In buffer
copy, copy over all the overlay properties, not just 'invisible. This
is needed to copy folding overlays correctly - they use more than just
'invisible property.
* lisp/org-table.el (org-table-to-lisp): Refactored.
* etc/ORG-NEWS: Document changes.
`org-table-to-lisp' is significantly faster.
It no longer uses regexps, nor clobbers the global regexp state.
* lisp/org.el (org-fontify-meta-lines-and-blocks-1): Do not assert
that `org-src-fontify-natively' only applies to code blocks. Allow
other blocks with language specifier to be fontified, but keep this
behavior undocumented.
Reported-by: Rudi C <rudiwillalwaysloveyou@gmail.com>
Link: https://orgmode.org/list/CAE9z9A3ko27NeN0oYFs_aBWV_cUbNm5YQTLrRux16dHsixsMBA@mail.gmail.com
Align with `org-bibtex-create'.
* lisp/ol-bibtex.el (org-bibtex-write):
* lisp/ol-bibtex.el (org-bibtex-yank): New optional argument
UPDATE-HEADING to update heading at point instead of creating a new
heading.
(org-bibtex-create): Rename NONEW argument to UPDATE-HEADING.
* etc/ORG-NEWS (~org-bibtex-yank~ accepts a prefix argument):
(New optional argument =UPDATE-HEADING= for ~org-bibtex-yank~):
Announce the change.
Link: https://list.orgmode.org/orgmode/4868155.GXAFRqVoOG@gt1/
* lisp/org.el (org-activate-folds): New fontification function to
arrange faces at newlines after folds to be the same as face before
the fold.
(org-set-font-lock-defaults): Add the new fontification function.
* lisp/org-fold-core.el (org-fold-core-region): Refresh fontification
of newlines after folds when folding/unfolding.
Reported-by: StrawberryTea <look@strawberrytea.xyz>
Link: https://orgmode.org/list/87plwoqrfv.fsf@strawberrytea.xyz
* lisp/ol.el (org-store-link): Refactor org-id links to use standard
`org-store-link-functions'.
(org-link-search): Create new headings at appropriate level.
(org-link-precise-link-target): New function extracting logic to
identify a precise link target, e.g. a heading, named object, or text
search.
(org-link-try-link-store-functions): Extract logic to call external
link store functions. Pass them a new `interactive?' argument.
* lisp/ol-bbdb.el (org-bbdb-store-link):
* lisp/ol-bibtex.el (org-bibtex-store-link):
* lisp/ol-docview.el (org-docview-store-link):
* lisp/ol-eshell.el (org-eshell-store-link):
* lisp/ol-eww.el (org-eww-store-link):
* lisp/ol-gnus.el (org-gnus-store-link):
* lisp/ol-info.el (org-info-store-link):
* lisp/ol-irc.el (org-irc-store-link):
* lisp/ol-man.el (org-man-store-link):
* lisp/ol-mhe.el (org-mhe-store-link):
* lisp/ol-rmail.el (org-rmail-store-link): Accept optional arg.
* lisp/org-id.el (org-id-link-consider-parent-id): New option to allow
a parent heading with an id to be considered as a link target.
(org-id-link-use-context): New option to add context to org-id links.
(org-id-get): Add optional `inherit' argument which considers parents'
IDs if the current entry does not have one.
(org-id-store-link): Consider IDs of parent headings as link targets
when current heading has no ID and `org-id-link-consider-parent-id' is
set. Add a search string to the link when enabled.
(org-id-store-link-maybe): Function set as :store option for custom id
link property. Move logic from `org-store-link' here to determine when
an org-id link should be stored using `org-id-store-link'.
(org-id-open): Recognise search strings after "::" in org-id links.
* lisp/org-lint.el: Add checker for "::" in ID properties.
* testing/lisp/test-ol.el: Add tests for
`org-link-precise-link-target' and `org-id-store-link' functions,
testing new options.
* doc/org-manual.org: Update documentation about links.
* etc/ORG-NEWS: Document changes and new options.
These feature allows for more precise links when using org-id to link to
org headings, without requiring every single headline to have an id.
Link: https://list.orgmode.org/118435e8-0b20-46fd-af6a-88de8e19fac6@app.fastmail.com/
* lisp/org.el (org-insert-heading): Change optional argument TOP to
LEVEL, accepting a number to force a specific heading level.
* testing/lisp/test-org.el (test-org/insert-heading): Add tests.
* etc/ORG-NEWS: Document changes.
* lisp/ox-latex.el (org-latex-inline-src-block): Export code blocks
without language as verbatim.
* lisp/ox-man.el (org-man-inline-src-block):
(org-man-src-block): Do not try to call source-highlight executable
when code block language is missing.
* lisp/ox-odt.el (org-odt-do-format-code):
* lisp/ox-texinfo.el (org-texinfo-src-block): Do not throw error when
code block language is missing.
Reproducer (not available on the list):
To reproduce my problem you can write create an org-mode buffer (C-x b
1.org M-x org-mode) with the following content:
#+begin_src lua :tangle yes :noweb yes
aaa
<<second>>
#+end_src
#+name: second
#+begin_src
bbb
#+end_src
Then enable exporting to texinfo and export the buffer:
M-: (require 'ox-texinfo)
C-c C-e i t
The folllowing backtrace appears (providing you already enabled
debugging on errors):
Debugger entered--Lisp error: (wrong-type-argument stringp nil)
apply(debug error (wrong-type-argument stringp nil))
edebug(error (wrong-type-argument stringp nil))
signal(wrong-type-argument (stringp nil))
edebug-signal(wrong-type-argument (stringp nil))
string-match("lisp" nil nil t)
string-match-p("lisp" nil)
(edebug-after (edebug-before 1) 5 (string-match-p "lisp" (edebug-after (edebug-before 2) 4
(org-element-property :language (edebug-after 0 3 src-block)))))
Reported-by: pva-outdoor@yandex.ru
Link: https://list.orgmode.org/orgmode/87jzn7oz1u.fsf@yandex.ru/
* lisp/org-persist.el (org-persist--report-time): This information
might be interesting, but not really necessary for users. At least
one user also asked to disable the time reporting.
* lisp/org-agenda.el (org-agenda-format-item): Do not store truncated
category in 'org-category property when `org-agenda-prefix-format'
causes truncation. This leads to agenda filters assuming truncated
version of the category as the true value, which is incorrect.
Reported-by: John Mathena <jmmathena@gmail.com>
Link: https://orgmode.org/list/CADywB5Lonxw-t1H7cvK+Au3oWq=EsB=Bthj13pt03MRP-Fn-4w@mail.gmail.com
* lisp/org-cycle.el:
* lisp/org.el (org-cycle): Move variable aliases right before new
variable name definitions in org-cycle.el. Otherwise, if users set
the aliased variable values before loading Org-mode, they might get
overwritten by the default value.
Reported-by: Ruiyang Wu <ywwry66@gmail.com>
Link: https://orgmode.org/list/F3A95086-B4BF-4C08-AF7A-8D7DE6FE30CF@gmail.com
* lisp/org-cycle.el:
* lisp/org.el (org-cycle): Move variable aliases right before new
variable name definitions in org-cycle.el. Otherwise, if users set
the aliased variable values before loading Org-mode, they might get
overwritten by the default value.
Reported-by: Ruiyang Wu <ywwry66@gmail.com>
Link: https://orgmode.org/list/F3A95086-B4BF-4C08-AF7A-8D7DE6FE30CF@gmail.com
* lisp/org-capture.el (org-capture-set-target-location): Do not demand
file path to be a string in capture targets. Other non-string values
are also allowed and checked in `org-capture-expand-file' that is
called later.
This commit fixes the changes introduced in 0a58a53ed.
Reported-by: Derek Chen-Becker <derek@chen-becker.org>
Link: https://orgmode.org/list/CAMbmz5nnXY1V1cPObfdw9wyM_GbiuYQ5_rksJ6gcO3Af+HOmSQ@mail.gmail.com
* lisp/ox-beamer.el (org-beamer-frame-environment): A new customize
variable. It contains the name of an environment that serves as an
alias for the beamer frame environment.
(org-beamer-template): Insert the `org-beamer-frame-environment'
environment definition into the beamer document.
* lisp/org-lint.el (org-lint-beamer-frame): Check the body of each
frame for an occurrence of \begin{orgframe} or \end{orgframe}, or
whatever environment name is in `org-beamer-frame-environment' [4].
The warning includes advice to see `org-beamer-frame-environment'.
* etc/ORG-NEWS (New option ~org-beamer-frame-environment~): Announce
the new option.
Rationale: Code with \begin{frame} or \end{frame} cannot be embedded
in a verbatim environment inside a beamer frame due to a design
decision made by the beamer developers [1]. As suggested in that
report, defining an alias for the beamer frame environment will allow
such verbatim examples to compile correctly [2].
This solution also works with instances of \againframe.
Refs:
[1] https://github.com/josephwright/beamer/issues/360
[2] https://github.com/josephwright/beamer/issues/360#issuecomment-708705250
[3] https://list.orgmode.org/orgmode/87le8eg1hs.fsf@localhost/T/
[4] https://list.orgmode.org/orgmode/87il38i5tb.fsf@localhost/T/
* lisp/org.el (org-dynamic-block-insert-dblock): When insert command
for a dynamic block is not interactive, do not try to call it
interactively.
Reported-by: chris <inkbottle007@gmail.com>
Link: https://orgmode.org/list/5790810.DvuYhMxLoT@nixos
* org.el (org-latex-to-html-convert-command): Add a note in the
docstring about proper shell-quoting.
It can trip you up because wrongly quoted input still works with some
math snippets, so the command may work during testing but not later
when you have different math snippets in play.
TINYCHANGE