Commit Graph

23915 Commits

Author SHA1 Message Date
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
Kyle Meyer c93066d8e2 Merge branch 'maint' 2021-04-26 23:01:06 -04:00
Kyle Meyer 37f291ac08 guide: Fix kbd syntax
* doc/org-guide.org (HTML Export): Fix kdb syntax.
2021-04-26 22:52:16 -04:00
Cheong Yiu Fung 58cacdf0e0 org-manual.org: Fix syntax
* doc/org-manual.org (HTML export commands): Fix kbd representation.

TINYCHANGE
2021-04-26 22:52:06 -04: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 edadbb8bab Merge branch 'maint' 2021-04-19 10:09:04 +02:00
Erik Hetzner f6eca6505d manual: Fix publish options
* doc/org-manual.org (Publishing sample configuration):
* doc/org-guide.org (Publishing):
Fix stylesheet setting in publish: :style is not a valid option; use
:html-head instead. :table-of-contents is not a valid option; use
:with-toc instead. :publishing-function is required.
2021-04-19 10:08:37 +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 949270d4bf Merge branch 'maint' 2021-04-19 01:10:20 +02:00
Nicolas Goaziou 140df469ed manual: Remove date keyword
* doc/org-manual.org: Remove date keyword.

It uses an invalid macro call.  Also, Texinfo export does not support
date keyword anyway.
2021-04-19 01:08:59 +02:00
Nicolas Goaziou 962690ef6a ORG-NEWS: Mention DOI links export
* etc/ORG-NEWS (Export DOI links): New entry.
2021-04-18 14:08:08 +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
Nicolas Goaziou e4f4a153df Merge branch 'maint' 2021-04-18 11:56:48 +02:00
Jorge P. de Morais Neto d317d77d8e manual: Fix typo about org-latex-images-centered
* doc/org-manual.org (Images in LaTeX export): Fix typo about
org-latex-images-centered.
2021-04-18 11:56:20 +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