Commit Graph

16717 Commits

Author SHA1 Message Date
Bastien Guerry 80a676c722 Revert "org: Add font-lock rule for inline export snippets"
This reverts commit 9af8d55f07.
2021-05-01 12:00:08 +02:00
TEC 9af8d55f07 org: Add font-lock rule for inline export snippets
* lisp/org.el (org-set-font-lock-defaults): Add font-lock rule for
inline export snippets.
2021-05-01 11:59:46 +02:00
Bastien Guerry c1f576a7e5 Merge branch 'maint' 2021-05-01 11:57:37 +02:00
TEC 400d2d9fd7 org-src: Use point instead of column for coords
* lisp/org-src.el (org-src--coordinates)
(org-src--goto-coordinates): Use point instead of column.

Using a column-based approach fails to account for invisible regions
or display overlays that change the number of columns: for example,
showing a LaTeX \alpha as α.  In src edits which involve such
structures, this causes the point to be shifted undesirably.  By using
a point-based approach this issue does not occur.
2021-05-01 11:57:27 +02:00
Alan D. Salewski 9aa9f3b1f7 org-clock.el: clocktable ':formula %' now includes per-file time pct
* lisp/org-clock.el (org-clocktable-write-default): When ':formula %'
  is in-effect, show the per-file time percentage in the '%' column.

TINYCHANGE

This change only has an effect when multiple files are contributing to
a given clocktable (such as when ':scope agenda' has been specified).
The existing behavior is that such tables have an extra 'File' column,
and each individual file that contributes has its own summary line
with the headline value '*File time*'.  Those summary rows also
produce a rollup time value for the file in the 'Time' column.

Prior to this change, the built-in '%' formula does not produce a
calculation for those per-file times in the '%' column (the relevant
cells in the '%' column were blank).  With this change, the percentage
contribution of each individual file time to the total time is shown.

The more agenda files you have, the more useful this behavior becomes.

Signed-off-by: Alan D. Salewski <ads@salewski.email>
2021-05-01 11:51:18 +02:00
Bastien Guerry bb24248b82 lisp/ox-html.el: Set `org-html-head-include-scripts' to nil
* lisp/ox-html.el (org-html-scripts): Enhance docstring.
(org-html-head-include-scripts): Default to nil and enhance docstring.

Link: https://orgmode.org/list/498dbe2e-0cd2-c81e-7960-4a26c566a1f7@memebeam.org/
2021-05-01 11:25:51 +02:00
Anthony Carrico dcd7b576b7 lisp/ox-html.el (org-html-scripts): Small refactoring
* lisp/ox-html.el (org-html-scripts): Small refactoring.

This replays the Javascript refactoring of commit 471054136.

Link: https://orgmode.org/list/498dbe2e-0cd2-c81e-7960-4a26c566a1f7@memebeam.org/
2021-05-01 11:12:51 +02:00
Anthony Carrico 7c9bf397b5 lisp/ox-html.el (org-html-scripts): Small refactoring
* lisp/ox-html.el (org-html-scripts): Small refactoring.

This replays the Javascript refactoring of commit 471054136.

Link: https://orgmode.org/list/498dbe2e-0cd2-c81e-7960-4a26c566a1f7@memebeam.org/
2021-05-01 11:10:17 +02:00
Nick Daly 7da20ff219 lisp/ob-plantuml.el: New option `org-babel-plantuml-svg-text-to-path'
* lisp/ob-plantuml.el (org-babel-plantuml-svg-text-to-path): New option.
(org-babel-execute:plantuml): Use the new option to add a SVG-specific
post-export step that runs inkscape text-to-path replacement over
the output file.

TINYCHANGE
2021-05-01 10:58:25 +02:00
Utkarsh Singh 7c99d15557 org-table.el: Allow to import files with no .txt, .tsv or .csv
* lisp/org-table.el (org-table-import): Allow to import files
with no .txt, .tsv or .csv extension.

TINYCHANGE
2021-05-01 10:48:07 +02:00
Bastien Guerry 0a689bf6c5 lisp/ox-html.el: Add TEC as the maintainer
* lisp/ox-html.el: Add TEC as the maintainer.
2021-05-01 10:26:06 +02:00
Bastien Guerry ee507de478 lisp/org.el (org-ctrl-c-ctrl-c): Fix bug
* lisp/org.el (org-ctrl-c-ctrl-c): Fix bug.

Commit aea31b065 introduced a bug: C-c C-c on a row of a table that
has no #+plot line, (org-element-property :post-affiliated context)
would return nil, so we first need to check whether we are on a #+plot
line.
2021-05-01 08:52:35 +02:00
Bastien Guerry 84d6c31069 Merge branch 'maint' 2021-05-01 08:35:01 +02:00
Bastien Guerry d18071b4ff lisp/org-agenda.el: Make tags filtering case-sensitive
* lisp/org-agenda.el (org-agenda-filter)
(org-agenda-get-represented-tags)
(org-agenda-filter-make-matcher-tag-exp): Make tags filtering
case-sensitive.

This fixes a bug introduced in commit 13a1a4fb9.
2021-05-01 08:33:20 +02:00
Kyle Meyer d63dd37e78 Merge branch 'maint' 2021-05-01 00:40:00 -04:00
Pablo Barraza Cornejo 390063d8df ox-html.el/inline-image export: Fix caption numbering
* lisp/ox-html.el (org-html-standalone-image-p): Remove quote which
causes `org-html-standalone-image-p' to not check if
`org-html-standalone-image-predicate' is fbound and see if it's
initialized.

TINYCHANGE
2021-05-01 00:38:39 -04:00
Kyle Meyer df84100d0c org-display-inline-images: Silence byte-compiler on Emacs <26
* lisp/org.el (org-display-inline-images): Guard image-map use with
boundp check rather than version check.

Guarding with a boundp will pacify the byte-compiler and is a direct
check that the thing we care about is available, so there's no need to
rely on the version check.

Reported-by: Ihor Radchenko <yantar92@gmail.com>
Link: https://orgmode.org/list/87y2d2mqik.fsf@localhost
2021-05-01 00:38:39 -04:00
Kyle Meyer 869b7a21b9 org-open-file: Avoid make-process for Emacs 24 compatibility
* lisp/org.el (org-open-file): Select a pipe connection type with
process-connection-type rather than make-process, which isn't
available until Emacs 25.

This uses the alternative approach suggested by Eli Zaretskii in the
thread that led to 5db61eb0f (org.el: Avoid xdg-open silent failure,
2021-03-21): https://orgmode.org/list/83y2g96ta6.fsf@gnu.org

Reported-by: Ihor Radchenko <yantar92@gmail.com>
Link: https://orgmode.org/list/87y2d2mqik.fsf@localhost
2021-05-01 00:38:39 -04:00
Kyle Meyer 45a3d7a900 org-tags-expand: Mark unused argument to silence byte-compiler
* lisp/org.el (org-tags-expand): Mark DOWNCASED as unused.
2021-05-01 00:07:09 -04:00
Nicolas Goaziou e3153145f4 Merge branch 'maint' 2021-04-30 15:51:20 +02:00
Nicolas Goaziou e266fac1ed ox-texinfo: Property display images with relative file names
* lisp/ox-texinfo.el (org-texinfo--inline-image): Make sure to remove
leading "./" from file name.

Reported-by: Ramesh Nedunchezian <rameshnedunchezian@outlook.com>
<http://lists.gnu.org/r/emacs-orgmode/2021-04/msg00873.html>
2021-04-30 15:50:25 +02:00
Bastien Guerry f2bedc8881 lisp/ox-html.el: Remove type="text/javascript"
* lisp/ox-html.el (org-html-scripts, org-html-infojs-template)
(org-html-mathjax-template): Remove type="text/javascript".

Reported-by: TEC <tecosaur@gmail.com>
Link: https://orgmode.org/list/874kkkxqma.fsf@gmail.com/
2021-04-30 10:20:11 +02:00
TEC aea31b0656 org: Enable plotting with C-c C-c
* lisp/org.el (org-ctrl-c-ctrl-c): When at a table, call
`org-plot/gnuplot' if the current line starts with "#+plot".
2021-04-30 09:11:04 +02:00
Nicholas Savage c212b7dae8 ob-eval.el: Refactoring `org-babel-eval' to improve readability
* ob-eval.el (org-babel-eval): Improve documentation and rename local
variables to be consistent with `org-babel--shell-command-on-region'
* (org-babel--shell-command-on-region): Remove START and END as
parameters.
* (org-babel--shell-command-on-region): Refactored out parts of
function to `org-babel--write-temp-buffer-input-file' and `org-babel--get-shell-file-name'.

This removes two parameters from
`org-babel--shell-command-on-region'. It appears that START and END
were parameters only because shell-command-on-region has them. This
function is only called by org-babel-eval so it looks safe to remove
those parameters, since they are always (point-min) and (point-max)
and are never changed. Given the way the function works and that it
is, it is unlikely that any user code relies on it.
2021-04-30 08:56:33 +02:00
Bastien Guerry ead3f5d498 Merge branch 'maint' 2021-04-30 08:52:13 +02:00
Aaron L. Zeng e2ffee96d2 ol.el: Fix confusing variable name
* ol.el (org-link--open-help): Fix a confusing variable name.  No
behavior changes.

TINYCHANGE
2021-04-30 08:51:54 +02:00
Bastien Guerry 856591010e Merge branch 'maint' 2021-04-29 16:07:39 +02:00
tbanel 38f87a26b5 ob-C.el: Fix a number a regressions related to table parameters
* ob-C.el (org-babel-C-expand-C, org-babel-C-header-to-C,
org-babel-C-expand-D): Add a `TYPE' parameter to
`org-babel-C-header-to-C' so that the helper functions return the
correct type.  Previoulsy for tables of non-strings the helper
functions would attempt to return a string, leading to compilation
errors.

* ob-C.el (org-babel-C-header-to-C): Correctly quote header elements.
Before, if the elisp value was not a string, it would not quote it,
leading to a syntax error.

* ob-C.el (org-babel-C-utility-header-to-C): Include `string.h' in
header `get_column_num' requires `strcmp', leading to compilation
errors.

* ob-C.el (org-babel-C-var-to-C): prefered declaration of a table in D
differs from C and C++. Example in C: `int table[2][3] = ...;'. In D:
`int[3][2] table=...;'

This patch is mainly based on Asa Zeren <asaizeren@gmail.com> patch of
Nov 5 2020, which was not commited at that time.
2021-04-29 15:31:51 +02:00
TEC 44f409e21e
org-plot: replace ignore-error with condition-case
* lisp/org-plot.el (org-plot/gnuplot): `ignore-error' was introduced
in Emacs 27, and Org's minimum supported Emacs is 24.  So, to maintain
compliance I replaced the `ignore-error' call with a `condition-case`.
2021-04-29 00:49:52 +08:00
Ihor Radchenko 232d9a0600 Bypass read-only state in org-entry-put
* lisp/org.el (org-entry-put): Ignore read-only state of the buffer.

Fixes bug when ID property is not insered when creating ID in an
indirect read-only org-goto buffer. [1]

[1] https://orgmode.org/list/8ffe2da5-e2cb-f44c-0a46-b19873c0bdf2@gmx.de/
2021-04-28 17:25:43 +02:00
Stefan Monnier 17ef1b39b0 ox: Fix various uses of the non-lexical-binding ELisp dialect
* lisp/ox.el (org-export--get-global-options,
org-export-insert-default-template): Use lexical-binding.
(org-export--generate-copy-script): Return a closure rather than
list starting with `lambda`.
(org-export-async-start): Turn it into a function (there seems to be
no reason this was a macro).  Use `write-region` rather than
`with-temp-file`.  Always use `utf-8-emacs-unix` coding system since
it's more efficient and is guaranteed to handle all chars.
Use lexical-binding in the temp file as well.
Actually set `debug-on-error` if `org-export-async-debug` says so.
(org-export-to-buffer, org-export-to-file): Pass a closure rather than
list starting with `lambda` to `org-export-async-start`.
2021-04-28 10:40:32 +02:00
Bastien Guerry 047fa8c319 Merge branch 'maint' 2021-04-28 09:23:29 +02:00
Maxim Nikulin 24a7ed50b3 org-protocol.el: Fix detection of old-style URIs
* lisp/org-protocol.el (org-protocol-check-filename-for-protocol): Avoid
incorrect regexp in check whether command line argument uses new syntax.
Fix failures of org-protocol tests.

Question mark was not escaped in the previous version 928e67df7e,
so any string was matched by lazy "*".  Match in never used,
thus `string-match-p` would be better, but actually regexp is redundant
here.

It is not documented what browser or desktop environment adds extra
slash before "?".  Accordingly to
mid:A2B0655F-BF28-4943-BC05-99021BFDA1B3@robewald.de, Windows may be
involved.  Likely it happens with double slash after schema as in
org-protocol://capture?url=URL&title=TITLE due to subprotocol is
considered as host name and URI is normalized by adding a slash
as mandatory path part before "?" query.  So just reverting the original
commit will likely cause a regression.  Another guess is that
with single or triple slash (org-protocol:/capture?url=URL)
subprotocol is a part of path thus no "smart" actions are necessary.
2021-04-28 09:23:22 +02:00
Bastien Guerry ebcee052fd Revert "org.el (org-sort-remove-invisible): Remove spurious spaces"
This reverts commit 5be650714d.
2021-04-28 08:48:29 +02:00
TEC 2a1b0d8ae0 ox-html.el: add lang label to authinfo src blocks
* lisp/ox-html.el (org-html-style-default): `authinfo-mode' is defined
in Emacs 27. As such, in the CSS add an "Authinfo" lang label to
authinfo src blocks.
2021-04-28 08:27:32 +02:00
Bastien Guerry a51c0f22b8 ox-html.el (org-html-scripts, org-html-style-default): Use defcustom
* ox-html.el (org-html-scripts, org-html-style-default): Turn
into configurable options.
2021-04-28 08:25:28 +02:00
TEC 70c4903c9f lisp/ox-html.el: Enhance `org-html-style-default'
* lisp/ox-html.el (org-html-style-default): Enhance.
2021-04-28 08:21:04 +02:00
TEC 00cd6de31b ox-html.el: Limit maximum content width and center
* lisp/ox-html.el (org-html-style-default): Improve appearance and
legibility on large screens buy centering and limiting the content
width to the upper end of advised line width, ~140 characters.
2021-04-28 08:17:13 +02:00
TEC ce04ec0e55 ox-html.el: remove CDATA strings
* lisp/ox-html.el (org-html-scripts, org-html-style-default)
(org-html-infojs-template): Remove CDATA strings, now obsolete.

See https://developer.mozilla.org/en-US/docs/Web/API/CDATASection#specifications
2021-04-28 08:15:45 +02:00
Juan Manuel Macias 5be650714d org.el (org-sort-remove-invisible): Remove spurious spaces
* org.el (org-sort-remove-invisible): Remove spurious spaces.

TINYCHANGE
2021-04-28 07:45:05 +02:00
David Asabina 08e62edb3a org-protocol: Fix missing '+' in js snippet
* org-protocol (org-protocol-capture): Add missing plus-sign to
javascript snippet to allow readers of the doc string to use example
snippet with minimal edits.

TINYCHANGE
2021-04-28 07:38:08 +02:00
Bastien Guerry 73fda22519 Merge branch 'maint' 2021-04-28 07:37:55 +02:00
David Asabina a32f015aac org-protocol: Fix missing '+' in js snippet
* org-protocol (org-protocol-capture): Add missing plus-sign to
javascript snippet to allow readers of the doc string to use example
snippet with minimal edits.

TINYCHANGE
2021-04-28 07:37:45 +02:00
Eric Abrahamsen 0c4e844c86 Remove default binding for org-table-blank-field
* lisp/org-keys.el: The command isn't useful enough to occupy such a
useful keybinding as "C-c SPC".
2021-04-28 05:50:17 +02:00
Nicolas Goaziou ff72928da1 Merge branch 'maint' 2021-04-27 23:27:56 +02:00
Nicolas Goaziou e9f03779bc ol-info: Fix description when storing "info" link
* lisp/ol-info.el (org-info-store-link): Fix typo.

Reported-by: Alex <alex.giorev@gmail.com>
<http://lists.gnu.org/r/emacs-orgmode/2021-04/msg00696.html>
2021-04-27 23:26:55 +02:00
Cheong Yiu Fung a1184f7d61 Add `ancestors-full' visibility setup to `org-show-context-detail'
* lisp/org.el(org-show-context-detail): Add `ancestors-full' visibility setup.
(org-show-set-visibility): Update accordingly.
* testing/lisp/test-org.el: Add tests.
2021-04-27 22:26:29 +02:00
Nicolas Goaziou 10e22f57f7 ol: Inserting help links ask for description again
* lisp/ol.el (org-store-link): Allow a store function to
set :description to nil without falling back to link value.
(org-link--store-help): Set :description to nil.
2021-04-27 21:58:55 +02:00
Protesilaos Stavrou 667cb6f1ae org-faces.el: Use fixed-pitch
* org-faces.el (org-hide, org-date, org-table, org-formula)
(org-code, org-block, org-verbatim): Use fixed-pitch.

Link: https://orgmode.org/list/875z8njaol.fsf@protesilaos.com/
2021-04-27 21:26:37 +02:00
Nicolas Goaziou beb010a3a5 ol: Fix storing link from a keybinding help buffer
* lisp/ol.el (org-link--store-help): Store the function attached to
the binding instead of the binding itself.
2021-04-27 17:50:18 +02:00
Nicolas Goaziou 3d353b0065 ol: Fix org-link--store-help
* lisp/ol.el (org-link--store-help): Read symbol without relying on
a hack.
2021-04-27 17:47:34 +02:00
Nicolas Goaziou 3b1467daa6 ol: Add missing docstring
* lisp/ol.el (org-link--store-help): Add missing docstring.
2021-04-27 17:28:39 +02:00
Nicolas Goaziou 4f8a2758cb ol: Factorize "help" link store function
* lisp/ol.el (org-link--store-help): New function.
(org-store-link): Do not hard-code "help" links. Use regular
`org-link-set-parameters' process.
2021-04-27 17:26:11 +02:00
Bastien Guerry 17084f6425 Merge branch 'maint' 2021-04-27 10:21:53 +02:00
Bastien Guerry b1ff9afc3b ox.el: Remove .gpg extension from the exported file-name
* ox.el (org-export-output-file-name): Remove .gpg extension.

Reported-by: Adalricus Ovicula <adalricus@inventati.org>
Link: https://orgmode.org/list/87a74x7g6v.fsf@xenon.ovicula/

This is a rework of the previous reverted commit e8c24b66a.
2021-04-27 10:21:05 +02:00
Bastien Guerry 82707041b0 Revert "ox.el: Remove .gpg extension from the exported file-name"
This reverts commit e8c24b66af.
2021-04-27 10:16:13 +02:00
Bastien Guerry e8c24b66af ox.el: Remove .gpg extension from the exported file-name
* ox.el (org-export-output-file-name): Remove .gpg extension.

Reported-by: Adalricus Ovicula <adalricus@inventati.org>
Link: https://orgmode.org/list/87a74x7g6v.fsf@xenon.ovicula/
2021-04-27 10:04:27 +02:00
Bastien Guerry 94d8d8ff50 etc/ORG-NEWS: Announce the signature change for `org-tags-expand'
* lisp/org.el (org-tags-expand): Remove obsolete argument.

* etc/ORG-NEWS: Announce the signature change for `org-tags-expand'.
2021-04-27 09:51:21 +02:00
Yuri D. Lensky 8bdcf51acf lisp/org.el: Update previews correctly when color chnages.
* lisp/org.el (org-format-latex): When computing a hash that
determines if a preview needs to be re-generated, use the actual color
of the face rather than just the setting symbol.
2021-04-27 09:45:49 +02:00
Bastien Guerry 31d48755bf Merge branch 'maint' 2021-04-27 09:43:11 +02:00
Bastien Guerry 13a1a4fb96 Be more consistent about treating tags as case-sensitive
* lisp/org-agenda.el (org-agenda-finalize):
(org-agenda-format-item): Do not downcase tags.
(org-downcase-keep-props): Remove unused function.
(org-agenda-filter-expand-tags): Do not case-fold search.

* lisp/org.el (org-tags-expand): Document `downcased' argument as
obsolete and do not allow to expand downcased tags.

* testing/lisp/test-org.el (test-org/tags-expand): Remove test for
downcased tags expansion.

* doc/org-manual.org (TODO keywords, tags, properties, etc.):
Suggest that user-defined are usually lowercase, but don't make it
a requirement.

Reported-by: David Masterson <dsmasterson92630@outlook.com>
Link: https://orgmode.org/list/SJ0PR03MB5455D8D0C4F71AA495A9ABF79B709@SJ0PR03MB5455.namprd03.prod.outlook.com/
2021-04-27 09:41:26 +02:00
Bastien Guerry e6d9b642c9 Merge branch 'maint' 2021-04-27 09:29:29 +02:00
Bastien Guerry 26d1d29cf9 lisp/org.el: Small refactoring
* lisp/org.el (org--get-expected-indentation): Use
`org-element-lineage' to check whether the point is right at the
beginning of a logbook drawer.

Reported-by: Ihor Radchenko <yantar92@gmail.com>
Link: https://orgmode.org/list/87pmygnr7h.fsf@localhost
2021-04-27 09:28:17 +02:00
Bastien Guerry bd10c31e70 Merge branch 'maint' 2021-04-27 08:43:35 +02:00
Bastien Guerry 730a05f787 org.el: Fix indentation of new notes in a logbook drawer
* lisp/org.el (org--get-expected-indentation): Fix indentation of
new notes in a logbook drawer when org-adapt-indentation is set to
'headline-data.

Reported-by: Gustavo Barros <gusbrs.2016@gmail.com>
Link: https://orgmode.org/list/878s9p4xtt.fsf@gnu.org/
2021-04-27 08:41:04 +02:00
Bastien Guerry 43f6ced0da lisp/org.el: Indent list items in drawers correctly
* lisp/org.el (org-fixup-indentation): Indent list items in drawers
correctly, by respecting existing relative indentation.
2021-04-27 08:37:32 +02:00
Bastien Guerry 29d4cc1802 Merge branch 'maint' 2021-04-26 21:52:25 +02:00
Bastien Guerry 058339d6e6 org-table.el: Fix a bug when displaying a table header
* lisp/org-table.el (org-table-row-get-visible-string): Fix wrong
beginning of the header string.
(org-table-header-set-header): Get the real beginning of the line.

Reported-by: "Oorja Sandhu" <oorja.sandhu@inoutbox.com>
Link: https://orgmode.org/list/7beea3b5-6fe5-4ba6-831e-19a88d87de6b@www.fastmail.com/
2021-04-26 21:51:12 +02:00
TEC ac3148ef8d
org-plot: Don't move point when plotting
* lisp/org-plot.el (org-plot/gnuplot): Expanding the `save-excursion'
block to include `org-plot/goto-nearest-table` prevents the current
point from being moved, and doesn't affect the rest of the function.
2021-04-26 23:51:12 +08:00
TEC 2c22bba4a2
org-plot: Expand file name of output image
* lisp/org-plot.el (org-plot/gnuplot-script): The gnuplot process this
generated content is sent to may be operating in a different directory,
and hence this may write to a different file than intended.  By
expanding the file name first, this is no longer a concern.
2021-04-26 23:51:12 +08:00
TEC 73a96c63a9
org-plot: Ignore gnuplot buffer read-only error
* lisp/org-plot.el (org-plot/gnuplot): When
`gnuplot-send-buffer-to-gnuplot` is called, it may emit the error
"kill-region: Text is read-only: #<buffer *gnuplot*>" when the plot
operation has been successful.  This prevents `org-plot/gnuplot` from
executing the rest of the function, which is undesirable.
It's preferable just to ignore this error.
2021-04-26 23:51:12 +08:00
TEC dadbd025fa
org-plot: Refresh inline images after plotting
* lisp/org-plot.el (org-plot/redisplay-img-in-buffer): New function
which searches the current Org buffer for overlays of a certain image,
and refreshes those overlays.
(org-plot/gnuplot): Use `org-plot/redisplay-img-in-buffer' after
plotting to redisplay any associated inline images.
2021-04-26 22:50:37 +08:00
TEC 0f7d2823fd
org-plot: Make checkdoc happier
* lisp/org-plot.el (org-plot/gnuplot-to-grid-data,
org--plot/values-stats, org--plot/sensible-tick-num,
org--plot/nice-frequency-pick, org--plot/merge-alists,
org--plot/prime-factors, org-plot/preset-plot-types,
org--plot/radar-setup-template, org-plot/gnuplot-term-extra,
org-plot/gnuplot): Rewrite docstrings to make checkdoc happier.
2021-04-26 22:50:36 +08:00
Bastien Guerry 97a2022382 Merge branch 'maint' 2021-04-26 14:24:03 +02:00
Bastien Guerry 29d21ea628 Revert "ox-html.el: Use classList and put in the public domain"
This reverts commit 4710541365.
2021-04-26 14:23:43 +02:00
Sameer Rahmani 4efab7681e ox-html.el: Add HTML_CONTENT_CLASS to support css classes in content tag
* lisp/ox-html.el (org-html-template): Added the support for a CSS
class name to the content tag which wraps the entire content. The CSS
class name can be set via in buffer HTML_CONTENT_CLASS property or
:html-content-class for org publish.

TINYCHANGE
2021-04-26 10:49:24 +02:00
Jamie Bayne ea8f7610ce Allow user to set ob-lilypond header arguments
* ob-lilypond.el (org-babel-lilypond-set-header-args): Replace
hard-coded settings with user-configurable variable.
(org-babel-header-args:lilypond): Modify documentation.
(ob-lilypond-header-args): New variable.

TINYCHANGE
2021-04-26 10:26:07 +02:00
Ihor Radchenko 0260d2fcf6 Allow multiple %(expression) instances in org-agenda-prefix-format
* lisp/org-agenda.el (org-compile-prefix-format): Use non-greedy match
for %(expression).

Previously, format like "%-12.12s%(expr1) %(expr2)" would not be
parsed correctly because of greedy "(.+)" regexp used to match the
expressions.
2021-04-26 10:06:18 +02:00
TEC d96e897579 ox-html: Use <img> tags for svgs, not <object>
* lisp/ox-html.el (org-html--format-image, org-html--svg-image): Remove
special treatment of SVGs with <object>, and just use <img>.  This used
to be poorly supported, but since Firefox 4 / Chrome 28 / Safari 9 this
is no longer a concern (https://caniuse.com/svg-img) and the last
browser release that didn't support SVG images was in 2010 (SVG data
URIs took until 2015 to be fully supported, but this is a lesser
concern).
2021-04-26 09:54:13 +02:00
Nicholas Savage 38842b2ffa Refactor org-set-font-lock-defaults to improve code readability
* org.el (org-set-font-lock-defaults): Reduce number of local
variables to improve code readability.
2021-04-26 09:39:17 +02:00
Bastien Guerry 55ef8e8584 lisp/ob-sqlite.el: Add Nick Savage a the maintainer
* lisp/ob-sqlite.el: Add Nick Savage a the maintainer.

See https://orgmode.org/list/92248525-6f48-af1a-71f6-c0b29ade45fb@nicksavage.ca/
2021-04-25 14:15:39 +02:00
tbanel c43041cf1a ob-C.el: Fix regression which mixes int, double, char* types
* lisp/ob-C.el (org-babel-C-val-to-C-type): Distinguish C, C++, D
  declarations of two-dimensions data.  C and C++ are row major,
  whereas D is column major.

  (org-babel-C-var-to-C): Generate a `typedef' (in C, C++) or an
  `alias' (in D) to carry the type of every two-dimensions matrices.

  (org-babel-C-header-to-C): Move to preferred D declaration,
  `string[n] header;' instead of `string header[n];'.  Use previously
  generated `typedef' or `alias' as the return type of the `data_h()'
  generated access utility functions.

Reported-by: Richard Sent <richard.j.sent@tutamail.com>
2021-04-22 09:51:27 +02:00
Kyle Meyer e641d37360 Merge branch 'maint' 2021-04-19 22:55:58 -04:00
Kyle Meyer ca7219db7c Merge branch 'km/from-emacs-master' 2021-04-19 22:55:03 -04:00
Kyle Meyer 9b4dbe5f03 mouse: Honor org-checkbox face
* lisp/org-mouse.el: Use org-checkbox rather than bold for checkbox
face for consistent checkbox appearance.

Reported-by: Yaroslav Rogov <rogovyaroslav@gmail.com>
Link: https://orgmode.org/list/A7D22E5B-B1A3-4ADC-9808-121F0D0ECD60@gmail.com
2021-04-19 22:52:15 -04:00
Stefan Kangas e3f0ac7348 Backport commit 0a4dc7083 from Emacs
; Normalize and add missing first and last lines
0a4dc70830f5e8286b47120cabc750cca07a75c1
Stefan Kangas
Mon Apr 19 12:21:01 2021 +0200
2021-04-19 20:07:28 -04:00
Gustav Wikström 3d52843269 Org-id: Clarify customization documentation for org-id, ts option
* lisp/org-id.el (org-id-ts-format, org-id-method): Clarify docstrings.
* doc/org-manual.org (Handling Links): Mention org-id-method in
the manual.
2021-04-19 22:55:48 +02:00
Nicolas Goaziou 9402aaebe7 Merge branch 'maint' 2021-04-19 18:19:29 +02:00
Nicolas Goaziou bc3ed23d16 element: Interpret :post-blank property in strings
* lisp/org-element.el (org-element-interpret-data):
Interpret :post-blank property in strings.
* testing/lisp/test-org-element.el (test-org-element/interpret-data):
Add test.
2021-04-19 18:17:55 +02:00
Nicolas Goaziou f918ba1094 Merge branch 'maint' 2021-04-19 14:34:43 +02:00
Nicolas Goaziou a89d96e6a5 texinfo: Consider any variation on "Top" a reserved node name
* lisp/ox-texinfo.el (org-texinfo--get-node): Change node name if it
conflicts with variations like "top", since they also appear to be
reserved by Texinfo.
2021-04-19 14:32:53 +02:00
Nicolas Goaziou a9a95cbe93 lint: Silence byte-compiler
* lisp/org-lint.el (org-lint-invalid-macro-argument-and-template):
Silence byte-compiler.
2021-04-19 02:12:11 +02:00
Nicolas Goaziou 628bb4f324 lint: Improve checks for internal macros
* lisp/org-lint.el (org-lint-invalid-macro-argument-and-template): Add
arity checks for internal macros.
* testing/lisp/test-org-lint.el (test-org-lint/invalid-macro-argument-and-template):
Add tests.
2021-04-19 02:06:01 +02:00
Nicolas Goaziou 772f7acb65 macro: Fix modification-time macro
* lisp/org-macro.el (org-macro-initialize-templates): Make second
argument optional for modification-time macro.
2021-04-19 01:11:37 +02:00
Nicolas Goaziou 8c981b0cbf lint: Pacify byte-compiler
* lisp/org-lint.el (org-lint-invalid-macro-argument-and-template):
Pacify byte-compiler.
2021-04-18 14:04:55 +02:00
Nicolas Goaziou 9ba4c95242 Add DOI links export
* lisp/ol-doi.el: New file.
* lisp/ol.el (org-link-doi-server-url): Move to new file.
(org-link--open-doi): Remove function.
* lisp/org.el (org-modules): Autoload new library for backward
compatibility.

Reported-by: yarnton--- via "General discussions about Org-mode." <emacs-orgmode@gnu.org>
<http://lists.gnu.org/r/emacs-orgmode/2020-09/msg00908.html>
2021-04-18 14:02:06 +02:00
Kyle Meyer 664b653448 Merge branch 'km/from-emacs-master' 2021-04-18 02:12:44 -04:00
Stefan Monnier 8c29cbdef7 Backport commit c45bfd3c4 from Emacs
* lisp/ox-beamer.el (org-beamer-mode-map): Move initialization
into declaration.
(org-beamer-mode):
* lisp/org.el (org-cdlatex-mode):
* lisp/org-table.el (org-table-header-line-mode)
(org-table-follow-field-mode, orgtbl-mode):
* lisp/org-src.el (org-src-mode):
* lisp/org-list.el (org-list-checkbox-radio-mode):
* lisp/org-indent.el (org-indent-mode):
* lisp/org-capture.el (org-capture-mode):
Avoid old-style positional args to `define-minor-mode`.

* lisp/**/*.el: Avoid positional args to `define-minor-mode`
c45bfd3c4abbfa585c9199f4866b6b8046945117
Stefan Monnier
Sun Apr 11 23:47:14 2021 -0400
2021-04-18 02:11:35 -04:00
Kyle Meyer a02a3bd6ac Merge branch 'maint' 2021-04-17 15:19:41 -04:00
Stefan Kangas 3a7e1c047e Remove diary-list-entries Emacs 21 compat code
* lisp/org-agenda.el (org-get-entries-from-diary): Remove some
Emacs 21 compat code; 'list-diary-entries' was made obsolete in
favour of 'diary-list-entries' in 22.1 and removed in 24.1.
2021-04-17 15:18:04 -04:00