Commit Graph

23859 Commits

Author SHA1 Message Date
Nicolas Goaziou 54917a0d73 lint: Update macro checks
* lisp/org-lint.el (org-lint-invalid-macro-argument-and-template):
Ignore `eval' macros when checking spurious placeholders.
2021-04-16 16:37:29 +02:00
Stefan Monnier 8abdbbee39 macro: Improve speed for `eval' macros
* lisp/org-macro.el (org-macro--makeargs): New function.
(org-macro--set-templates): New function.
(org-macro--set-template): Remove function.
(org-macro-initialize-templates): Add optional argument to
signature. Add macro definitions as functions.
(org-macro-expand): Allow functions as macro definitions.
(org-macro--counter-increment): Handle nil argument.
* lisp/ox.el (org-export-as): Apply signature change for
`org-initialize-templates'.

The main difference with the previous behaviour is that missing
arguments are now treated as nil instead of the empty string.

See <http://lists.gnu.org/r/emacs-orgmode/2021-04/msg00219.html>.
2021-04-16 16:37:22 +02:00
Nicolas Goaziou 4941444f45 Merge branch 'maint' 2021-04-13 09:56:16 +02:00
Nicolas Goaziou bcc1b0f1bb ob-exp: Do not comma-escape inline source code
* lisp/ob-exp.el (org-babel-exp-code): Do not comma-escape inline
source code.
* testing/lisp/test-ob-exp.el (ob-exp/exports-inline-code): Add test.
2021-04-13 09:55:29 +02:00
Nicolas Goaziou 5d5d102254 Revert "element: Un-escape code in inline source blocks"
This reverts commit 4056e11ddc.

We shouldn't code escape inline source blocks, as escaping can be
inlined any time, at which point escape character is no longer treated
specially. E.g.,

    src_c{a
    ,* 2}

may become

    src_c{a ,* a}

where the comma is no longer an escape character.
2021-04-13 09:47:09 +02:00
Nicolas Goaziou b33face41c Merge branch 'maint' 2021-04-13 00:37:16 +02:00
Nicolas Goaziou 6dbd132e62 ox-texinfo: Fix footnotes ending on a special environment
* lisp/ox-texinfo.el (org-texinfo-footnote-reference): Prevent
a footnote from ending on an "@end" line.

Reported-by: Ramesh Nedunchezian <rameshnedunchezian@outlook.com>
<http://lists.gnu.org/r/emacs-orgmode/2021-04/msg00228.html>
2021-04-13 00:36:31 +02:00
Nicolas Goaziou b049f839b0 Merge branch 'maint' 2021-04-12 23:33:12 +02:00
Nicolas Goaziou 4056e11ddc element: Un-escape code in inline source blocks
* lisp/org-element.el (org-element-inline-src-block-parser): Un-escape
code in inline source blocks.
(org-element-inline-src-block-interpreter): Escape it again if
necessary.
* testing/lisp/test-org-element.el (test-org-element/inline-src-block-parser):
Add test.
2021-04-12 23:29:38 +02:00
Nicolas Goaziou bf98b12d5c Merge branch 'maint' 2021-04-10 12:29:28 +02:00
Nicolas Goaziou 94be20a334 ox-texinfo: Fix references to low-level headlines
* lisp/ox-texinfo.el (org-texinfo-headline): Provide an anchor for
low-level headlines.

Reported-by: Ramesh Nedunchezian <rameshnedunchezian@outlook.com>
<http://lists.gnu.org/r/emacs-orgmode/2021-04/msg00206.html>
2021-04-10 12:28:08 +02:00
Nicolas Goaziou 85a25e3169 Merge branch 'maint' 2021-04-10 12:08:33 +02:00
Nicolas Goaziou 19947a6e41 ox: Handle missing option value better
* lisp/ox.el (org-export--parse-option-keyword): Do not stop parsing
OPTIONS keyword when an option without a value is encountered.
* testing/lisp/test-ox.el (test-org-export/parse-option-keyword): Add
tset.

This is a followup to 7116914427.
2021-04-10 12:06:47 +02:00
Nicolas Goaziou 80bce047ff Merge branch 'maint' 2021-04-10 00:03:31 +02:00
Tom Gillespie b523ad491d ob-tangle.el: Fix coderef removal during tangling
* lisp/ob-tangle.el (orb-babel-tangle-single-block): Regularize
behavior when removing coderefs during tangling. This fixes an issue
where trailing whitespace would be retained when coderefs were removed
for tangling.
2021-04-10 00:01:49 +02:00
Nicolas Goaziou b07a31cbd7 Merge branch 'maint' 2021-04-09 23:43:36 +02:00
Nicolas Goaziou 5469bc4e55 colview: Ignore operators associated to special properties
* lisp/org-colview.el (org-columns--compute-spec): Ignore operator
associated to a special properties.

This is a followup to e1b8d1d2b4.
2021-04-09 23:41:32 +02:00
Nicolas Goaziou f63bb5eea8 Merge branch 'maint' 2021-04-09 22:49:54 +02:00
Nicolas Goaziou 7116914427 ox: Do not choke on incomplete OPTIONS items
* lisp/ox.el (org-export--parse-option-keyword): Prevent "End of
file during parsing" error when an OPTIONS item is incomplete.
* lisp/org-lint.el (org-lint-unknown-options-item): Check for
incomplete options items.
* testing/lisp/test-org-lint.el (test-org-lint/unknown-options-item):
Add test.
2021-04-09 22:47:57 +02:00
Nicolas Goaziou 0457d8d5a3 Merge branch 'maint' 2021-04-09 22:33:00 +02:00
Nicolas Goaziou f99f26306c ox-texinfo: Do not create menu for headlines without sectioning command
* lisp/ox-texinfo.el (org-texinfo--sectioning-structure): New function.
(org-texinfo-headline): Use new function.
(org-texinfo--menu-entries): Filter out headlines with no sectioning
command defined.

Reported-by: Ramesh Nedunchezian <rameshnedunchezian@outlook.com>
<http://lists.gnu.org/r/emacs-orgmode/2021-04/msg00196.html>
2021-04-09 22:29:50 +02:00
Nicolas Goaziou 2d78ea57cf Merge branch 'maint' 2021-04-07 19:50:02 +02:00
Nicolas Goaziou e1b8d1d2b4 org-colview: Do not choke when updating a special property
* lisp/org-colview.el (org-columns--compute-spec): Do not update
special properties, which are not set through property drawers.

Reported-by: Nick Dokos <ndokos@gmail.com>
<http://lists.gnu.org/r/emacs-orgmode/2021-04/msg00135.html>
2021-04-07 19:48:37 +02:00
Nicolas Goaziou 196aae41c5 Merge branch 'maint' 2021-04-06 13:50:46 +02:00
Nicolas Goaziou 7575678959 ox-latex: Fix texttt usage in headlines
* lisp/ox-latex.el (org-latex-headline): Properly call
`org-latex--protect-texttt' on verbatim objects.

Reported-by: Greg Minshall <minshall@umich.edu>
<http://lists.gnu.org/r/emacs-orgmode/2021-04/msg00134.html>
2021-04-06 13:47:04 +02:00
Kyle Meyer 5a91a232f7 Merge branch 'maint' 2021-04-05 23:49:21 -04:00
Kyle Meyer 702e782cb6 org.el: Mark org-link-descriptive as buffer-local
* lisp/org.el (org-mode): Mark org-link-descriptive as buffer-local.

Calling org-toggle-link-display is an inherently buffer-local
operation because it works via the buffer-local
buffer-invisibility-spec, so toggling the global value leads to a
mismatched, invalid state in all other buffers.

Reported-by: Gustavo Barros <gusbrs.2016@gmail.com>
Ref: https://orgmode.org/list/87lfeqzm3a.fsf@gmail.com
Reported-by: Ingo Lohmar <ingo.lohmar@posteo.net>
Ref: https://orgmode.org/list/87pmzdhl4b.fsf@kenko.localhost.com
2021-04-05 22:15:10 -04:00
Nicolas Goaziou c881b60593 Merge branch 'maint' 2021-04-04 00:18:04 +02:00
TEC bcfe6f985c ox-latex: convert verbatim text in headings to texttt
* lisp/ox-latex.el (org-latex--protect-texttt): New function.
(org-latex--text-markup): Use new function.
(org-latex-headline): Convert any instances of \verb text with
\texttt.  This is required to work around LaTeX peculiarities that
would otherwise cause compilation to fail (see the code comment for
more information).
2021-04-04 00:16:42 +02:00
Nicolas Goaziou 635920c730 Merge branch 'maint' 2021-04-01 17:15:36 +02:00
Nicolas Goaziou f7e0e17e82 ox-texinfo: Fix colons removal in menu entries
* lisp/ox-texinfo.el (org-texinfo--format-entries): Fix regexp
matching unwanted colons.

Reported-by: Ramesh Nedunchezian <rameshnedunchezian@outlook.com>
<http://lists.gnu.org/r/emacs-orgmode/2021-04/msg00008.html>
2021-04-01 17:10:52 +02:00
Kyle Meyer f03cba1b6f Merge branch 'maint' 2021-03-30 23:55:51 -04:00
Stefan Kangas 3089fcd690 Remove redundant #' around lambdas
* contrib/lisp/org-choose.el (org-choose-get-highest-mark-index)
(org-choose-get-fn-map-group, org-choose-keep-sensible)
(org-choose-setup-vars):
* lisp/org-mouse.el (org-mode-hook, org-mouse-context-menu)
(org-mouse-popup-global-menu):
* lisp/ox-beamer.el (org-beamer--format-section):
* lisp/ox.el (org-export-insert-default-template): Remove redundant #'
around lambdas.
2021-03-30 23:54:22 -04:00
Kyle Meyer 1c0ce74a1f NEWS: Remove quote from in front of headline-data symbol
There's no need to quote the symbol when referring to it, just as
`symbol' rather than `'symbol' is used in docstrings.
2021-03-30 23:45:51 -04:00
Kyle Meyer d017cdb0ae NEWS: Group and move up electric-indent/adapt-indentation entries
Put the entry for "respecting electric-indent-mode" and the new value
of org-adapt-indentation near each other given that honoring
electric-indent-mode is likely to make many users aware of the
behavior that org-adapt-indentation controls (even if they weren't
aware that the option existed).

Also move these entries up in hopes of making them easier to discover.

Suggested-by: Tim Cross <theophilusx@gmail.com>
Ref: https://orgmode.org/list/87pmzhi7wp.fsf@gmail.com
2021-03-30 23:43:17 -04:00
Renato Ferreira 6a50e41ea5 org-agenda.el: Rename org-agenda-format-item parameters
* org-agenda.el (org-agenda-format-item): Rename parameters so they
don't clash with dynamic variables used by
`org-prefix-format-compiled'.

TINYCHANGE
2021-03-29 23:09:38 -04:00
Kyle Meyer 4d9dabc36f Merge branch 'maint' 2021-03-29 00:34:15 -04:00
Kyle Meyer 7c23fc7efa ob-ocaml: Update stale tuareg-mode link in commentary
Reported-by: Stefan Monnier <monnier@iro.umontreal.ca>
2021-03-29 00:33:49 -04:00
Maxim Nikulin 4de2fff87d Add quotes to emacsclient arguments in examples
* doc/org-manual.org:
* lisp/org-protocol.el: Quote emacsclient arguments
in examples to prevent interpreting of ampersands as intent
to run processes in background by bash and similar shells.
Single quotes may cause a problem with cmd.exe, so use
double quotes despite they are a bit less safe in bash and Co.
2021-03-29 00:32:29 -04:00
Maxim Nikulin a17243f9a5 org-manual.org: Fix typo in org-protocol capture example
* doc/org-manual.org: Use "&" as parameter separator in query part
of example for org-protocol capture URI.
2021-03-29 00:32:29 -04:00
Bastien 05277f5caf lisp/org.el: Fix previous merge commit 2021-03-28 17:54:50 +02:00
Bastien a169bdde3b Merge branch 'maint' 2021-03-28 17:54:17 +02:00
Bastien 287af207fe lisp/org.el: Bump version header to 9.4.5 2021-03-28 08:36:11 +02:00
Kyle Meyer 7a62a4d325 Merge branch 'maint' 2021-03-27 02:21:07 -04:00
Kyle Meyer e2e89cea87 Merge branch 'km/from-emacs-master' 2021-03-27 02:20:45 -04:00
Basil L. Contovounesios f10773675d Backport commit 331ddd803 from Emacs
* lisp/org-macs.el (org--string-from-props): Pacify warnings
about unknown functions in non-GUI bilds.

Address some --without-x byte-compilation warnings
331ddd803a72056d0f0c70e5a677e0d4a6300584
Basil L. Contovounesios
Fri Mar 26 17:35:34 2021 +0000
2021-03-27 02:18:35 -04:00
Sébastien Miquel 36622362d1 org.el (org-do-latex-and-related): Fix duplicate 'latex faces
* lisp/org.el (org-do-latex-and-related): Do not add a
'org-latex-and-related face beyond the fontification limit.
2021-03-27 02:05:30 -04:00
Stefan Kangas b7c26e9036 Backport commit 8b07994e2 from Emacs
Convert many more links to use HTTPS
8b07994e201e478df8a3431cbae5187b4cde1791
Stefan Kangas
Wed Mar 24 10:20:18 2021 +0100
2021-03-25 00:56:53 -04:00
Kyle Meyer 68db6fc064 Merge branch 'maint' 2021-03-25 00:53:11 -04:00
Kyle Meyer 478929ae61 ox-html: Fix org-html-format-drawer-function's docstring
* lisp/ox-html.el (org-html-format-drawer-function): Drop leftover
text from when an example used to be included.

adcebf38f (Fix errors reported by cus-test.el, 2013-11-14) dropped the
example but left the leading part.

Reported-by: Jean-Baptiste Mazon <jmazon@gmail.com>
Ref: https://orgmode.org/list/0e5569e6-15a7-d4c4-0558-8b0ef96a515c@gmail.com
2021-03-24 22:45:22 -04:00