Commit Graph

5213 Commits

Author SHA1 Message Date
Bastien c67413a7b6 Merge branch 'maint' 2021-05-02 08:50:18 +02:00
Bastien 5584ffc6c4 lisp/org.el (org--backward-paragraph-once): Handle corner case
* lisp/org.el (org--backward-paragraph-once): Don't throw an error
when at the first headline after a single empty line.
2021-05-02 08:49:53 +02:00
Bastien feacffe865 Merge branch 'maint' 2021-05-02 07:10:46 +02:00
Bastien 5021bada95 lisp/org.el: Fix bug when unfolding a subtree
* lisp/org.el (org-cycle-internal-local): Use 'tree instead of
'canonical when setting the visibility of the subtree to unfold.

Reported-by: Yasushi SHOJI <yasushi.shoji@gmail.com>
Link: https://orgmode.org/list/CAELBRWLakDCbawmMdS5Qi0qh5FC2ixF82xNfCg75wMjmze6pbA@mail.gmail.com/
2021-05-02 07:09:55 +02:00
Bastien f84033b088 Merge branch 'maint' 2021-05-01 22:26:06 +02:00
Bastien ccd513a3c5 lisp/org.el: Don't let `visual-line-mode' override Org's keybindings
* lisp/org.el (org-mode): Don't let `visual-line-mode' override
Org's keybindings for C-a, C-e and C-k.

Reported-by: Gustavo Barros <gusbrs.2016@gmail.com>
Link: https://orgmode.org/list/87a6zkv3m2.fsf@gmail.com/
2021-05-01 22:24:57 +02:00
Ihor Radchenko 0a8079b4d7 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-05-01 18:45:15 +02:00
Bastien Guerry 6ceb4c1c89 Merge branch 'maint' 2021-05-01 18:40:26 +02:00
Bastien Guerry 842ab092ae lisp/org.el: Make `org-toggle-link-display' more consistent
* lisp/org.el (org-do-emphasis-faces): Don't hide with `org-link'
as the value for the invisible text property.

Before this commit, M-x org-toggle-link-display RET would also toggle
the emphasis markers.

Reported-by: Gustavo Barros <gusbrs.2016@gmail.com>
Link: https://orgmode.org/list/87o8jnzjao.fsf@gmail.com/
2021-05-01 18:38:31 +02:00
Bastien Guerry 6f72efd390 Merge branch 'maint' 2021-05-01 18:00:08 +02:00
Bastien Guerry fb30301888 lisp/org.el: Fix bug about inserting a heading before the first headline
* lisp/org.el (org-insert-heading): Fix bug when inserting a
heading before the first headline.

Reported-by: Gustavo Barros <gusbrs.2016@gmail.com>
Link: https://orgmode.org/list/875z73br32.fsf@gmail.com/
2021-05-01 17:59:20 +02:00
Gustavo Barros e8562a3327 date/time prompt: Provide support for HHhMM time input
* lisp/org.el (org-read-date-analyze): Add support for HHhMM time
input, in similar way as for am/pm times.
* doc/org-manual.org (The date/time prompt): Add example to illustrate
the feature.

TINYCHANGE
2021-05-01 17:40:17 +02:00
TEC eef9027cd2 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 12:00:20 +02:00
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 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
Kyle Meyer d63dd37e78 Merge branch 'maint' 2021-05-01 00:40:00 -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
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
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
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
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
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
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
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
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 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
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
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
Kyle Meyer c1fa5ea76f Merge branch 'maint' 2021-03-21 13:41:39 -04:00
Maxim Nikulin 5db61eb0f9 org.el: Avoid xdg-open silent failure
* lisp/org.el (org-open-file): Use 'pipe :connection-type instead of
'pty to prevent killing of background process on handler exit.
(Bug#44824)

Problem happens only in some desktop environments where configured
through `org-file-apps' or mailcap handlers launches actual viewer
(as defined in .desktop files and obtained from mimeapps.list)
in background.  E.g. xdg-open invokes "gio open" or kde-open5 for Gnome
or KDE accordingly and these handlers launches e.g. eog or okular in
background.  As soon as main process exits, temporary terminal session
created by `start-process-shell-command' is terminated.  As a result
background processes receive SIGHUP.

Previously command were executed with no buffer, so the change
does not affect "needsterminal" and "copiousoutput" mailcap features,
they are not supported as earlier.

If handler main process fails then show a message with exit reason.
Output (including error messages) is ignored as before.
Gtk application tends to report significant amount of failed asserts
hardly informative for majority of users.

TINYCHANGE
2021-03-21 10:38:39 -04:00
Kyle Meyer d477f61ee1 Merge branch 'km/from-emacs-master' 2021-03-14 22:07:30 -04:00
Mattias Engdegård f771d205cc Backport commit a0854f939 from Emacs
; Fix typos in doc strings
a0854f939ce3a1de2c8cbc5e38b106a8df4480f6
Mattias Engdegård
Fri Mar 12 12:12:14 2021 +0100
2021-03-14 17:57:07 -04:00
Kyle Meyer 5263eff5a3 org.el: Specify minimum Emacs version in Package-Requires header
* lisp/org.el: Specify minimum Emacs version in Package-Requires
header.

Suggested-by: Stefan Monnier <monnier@iro.umontreal.ca>
Link: https://orgmode.org/list/jwvv9a01l1o.fsf-monnier+emacs@gnu.org
2021-03-09 22:16:15 -05:00