Commit Graph

537 Commits

Author SHA1 Message Date
Bastien 806ac1b7f6 *el: Fix indentation 2021-09-29 09:22:47 +02:00
Marco Wahl 4063d4c2d7 org: Rename for more consistency
* lisp/org.el (org-get-previous-sibling): Rename from
  org-get-last-sibling to be more consistent with the rest of Emacs.
  org-get-last-sibling stays as obsolete alias.
2021-09-20 00:27:02 +02:00
Kyle Meyer a246a13187 Merge branch 'km/from-emacs-master' 2021-09-12 23:35:16 -04:00
Eli Zaretskii d2deb188a6 Backport commit ff4de1bd8 from Emacs
* lisp/org.el:
* lisp/org-list.el (org-list-to-generic):
* lisp/org-compat.el: In comments, quote 'like this'.

Fix quoting style in Lisp comments
ff4de1bd88b8be4a7071884910ff601eb10fbad5
Eli Zaretskii
Sun Sep 12 19:51:06 2021 +0300
2021-09-12 23:34:08 -04:00
Stefan Kangas 9961abf75a Backport commit fc4b956c7 from Emacs
; Fix symbol quoting typos
fc4b956c7cb2fba8ed2a18865a7686c6cfa5d030
Stefan Kangas
Sun Sep 12 18:36:49 2021 +0200
2021-09-12 23:34:07 -04:00
Marco Wahl 3664447eb2 org-compat: Silence byte compiler for Emacsversion < 28
Check availablility of function directory-empty-p directly instead of
relying on Emacs version.

Thanks Maxim and Kyle for the help.  See
https://orgmode.org/list/87pmun8t2o.fsf@kyleam.com/ .
2021-08-15 11:01:39 +02:00
Marco Wahl 01877f4804 org-compat: Fix org-directory-empty-p
* lisp/org-compat.el: Remove COUNT parameter in call of
directory-files.  COUNT not available in Emacs < 28.
2021-08-10 22:38:00 +02:00
Marco Wahl 81eb8c5f9e attach: Fix for Emacs<28
* lisp/org-compat.el: Introduce org-directory-empty-p which is directory-empty-p from Emacs 28.
* lisp/org-attach.el (org-attach-sync): Use org-directory-empty-p instead of directory-empty-p.
* etc/ORG-NEWS: Note about org-directory-empty-p.

Thanks Kyle identifying the issue.  Thanks Arthur for suggesting a
fix.
2021-08-10 22:20:48 +02:00
Kyle Meyer 35183b634b Merge branch 'km/from-emacs-master' 2021-06-27 23:33:00 -04:00
Stephen Berman bb572a3e8c Backport commit 19f2f2699 from Emacs
* lisp/org-compat.el (org--setup-calendar-bindings): Fix logic
in test of 'org-agenda-diary-file' (bug#48199).

Prevent Org mode from mistakenly changing Calendar keymap
19f2f2699499d87186c6f580e4ec79205d59c096
Stephen Berman
Fri Jun 25 11:11:43 2021 +0200
2021-06-27 23:32:23 -04:00
Nicolas Goaziou 6de34f2891 Move `org-file-url-p' to "org-macs.el", rename it to `org-url-p'
* lisp/org-macs.el (org-url-p): New function.
* lisp/org-compat.el (org-file-url-p): Make obsolete alias for
function above.
* lisp/org-lint.el (org-lint-non-existent-setupfile-parameter):
* lisp/org.el (org--collect-keywords-1):
(org-file-contents):
(org-edit-special): Use new function.
2021-05-18 16:31:39 +02:00
Bastien 336efd6dd9 lisp/*: Use version number when obsoleting
* lisp/org-compat.el:
* lisp/org-agenda.el:
* lisp/org-macs.el:
* lisp/org.el:
* lisp/ob-sqlite.el: Use version number when obsoleting.
2021-05-16 09:54:28 +02:00
Bastien 0f2ece647b Update Carsten's email address in some files 2021-05-07 16:50:57 +02:00
Nicolas Goaziou 62c90bef35 compat: Add `org-string-distance'
* lisp/ob-core.el (org-babel-edit-distance): Rename function
`org-string-distance' and move it to "org-compat.el".
(org-babel-check-src-block): Use `org-string-distance' instead.
* lisp/org-compat.el: Add `org-string-distance' for a future
deprecation in favor of `string-distance'.
2021-05-05 17:54:36 +02:00
Bastien d48276b894 Replace `org-speed-commands-user' by `org-speed-commands'
* etc/ORG-NEWS: Announce `org-speed-commands'.

* doc/org-manual.org (Speed Keys): Document `org-speed-commands'
instead of `org-speed-commands-user'.

* lisp/org-compat.el (org-speed-commands-user): Make an obsolete
variable.

* lisp/org-keys.el (org-speed-commands-user): Remove.
(org-speed-commands): Rename from `org-speed-commands-default' and
make a defcustom.  Add the docstring of `org-speed-commands-user'.
(org-speed-command-help): Throw a message about obsolete option
`org-speed-commands-user' when set in the user configuration.
(org-speed-command-activate): Update docstring.

Link: https://orgmode.org/list/87eeep3c1u.fsf@bzg.fr/
2021-05-03 16:30:04 +02:00
Sébastien Miquel 7c4d057cd4 org-compat.el (org-mode-flyspell-verify): Do not check code in headline
* lisp/org-compat.el (org-mode-flyspell-verify): Do not spell check
code, verbatim and LaTeX fragments in headline title.

TINYCHANGE
2021-03-14 22:50:53 -04:00
Kyle Meyer 26773a404e Merge branch 'maint' 2021-02-03 01:27:15 -05:00
Stefan Kangas 2ed1c20ff7 Remove Emacs 21 compat code for bookmark-after-jump-hook
* lisp/org-compat.el (bookmark-after-jump-hook): Remove Emacs 21
compat code.
2021-02-03 01:26:51 -05:00
Kyle Meyer a12449ac19 org-compat: Fix symbol quoting in a comment 2021-01-24 22:15:10 -05:00
Kyle Meyer 33de2bd8ef org-compat: Take in obsolete org-copy
* lisp/org-compat.el (org-copy): Move from org-refile.el.
* lisp/org-refile.el (org-copy): Move to org-compat.el.

Suggested-by: Marco Wahl <marcowahlsoft@gmail.com>
Ref: https://orgmode.org/list/87o8i2cpb2.fsf@gmail.com
2021-01-07 00:14:27 -05:00
Kyle Meyer 99eafe3787 Update copyright year to 2021 2021-01-01 14:59:01 -05:00
Kyle Meyer d7d714c7d5 Silence byte-compiler in Emacs repo
These show up in the Emacs repo (before and after the latest sync in
f22856a5c5), but for an unknown reason do not show up with `make
compile' or `make single' in the Org repo.

All of these functions are autoloaded.
2020-12-13 13:56:29 -05:00
Kyle Meyer 51c4cc1a8a Prefer symbol for eval-after-load's FILE argument
Call eval-after-load with a symbol rather than a string to avoid
potential name conflicts with files that do not provide the feature
(e.g., if a user configures speedbar in a file named "speedbar.el")

Reported-by: John Foerch <jjfoerch@gmail.com>
Ref: https://orgmode.org/list/CAEeGWGKfrV7w9qtPRpAhFtiOCH-+8_ydEe11EoMAkUkbTq1fuA@mail.gmail.com
2020-11-06 00:32:16 -05:00
Kyle Meyer 5417e384eb Merge branch 'maint' 2020-08-10 20:38:18 -04:00
Kévin Le Gouguec 81e2948472 Fix org-fontify-whole-*-line by setting face extension (bug#42184)
* lisp/org-faces.el (org-block): Set background extension beyond
end-of-line.
* lisp/org-compat.el (org--set-faces-extend): New function to
temporarily (re)set :extend for Emacs≥27.
* lisp/org.el (org-mode): Call it to set the extend attribute of
relevant faces to the correct value.
2020-08-10 20:22:25 -04:00
Nicolas Goaziou 1aa095ccf1 Fix drawer invisibility
* lisp/org.el (org-cycle-hide-drawers): Move back from "org-compat.el"
(org-cycle-hook):
(org-show-entry):
(org-set-startup-visibility):
(org-clean-visibility-after-subtree-move):
(org-sort-entries): Use `org-cycle-hide-drawers'.
(org-log-beginning):
(org--hide-wrapper-toggle):
(org-hide-drawer-all): Use `outline' invisibility spec for drawers.
(org-show-all): Rewrite taking into account drawers now have the same
invisibility spec as headlines.
(org-overview):
(org-content):
(org-tree-to-indirect-buffer): Use fast arguments for `org-show-all'.
(org-mode): Remove `org-hide-drawer' invisibility spec.
* lisp/org-compat.el (org-flag-drawer): Use `outline' for drawer
invisibility.
(org-cycle-hide-drawers): move back to "org.el".
* lisp/org-clock.el (org-clock-find-position): Use `outline' for
invisibility spec.
* lisp/org-agenda.el (org-agenda-show-and-scroll-up): Use
`org-cycle-hide-drawers'.
2020-06-06 17:01:21 +02:00
Bastien 7c913d1792 lisp/org-compat.el: Small fix in a "obsolete" declaration
* lisp/org-compat.el (org-cycle-hide-drawers): Mention to use
`org-hide-drawer-all' instead of `org-hide-drawer' as the latter
function does not exist anymore.
2020-05-22 16:03:44 +02:00
Kyle Meyer af3def5d06 Silence recent 'make single' compiler warnings
And remove the org-return-indent declaration in org-keys.el, which is
not needed as of d3e6b5800 (Make RET and C-j obey
`electric-indent-mode', 2020-05-05).
2020-05-09 22:36:00 -04:00
Nicolas Goaziou e73732f14a compat: Silence byte-compiler
* lisp/org-compat.el (org-cycle-hide-drawers): Ignore optional
argument.
2020-05-09 19:10:47 +02:00
Nicolas Goaziou 074ea1629c Deprecate `org-cycle-hide-drawers'
* lisp/org.el (org-hide-drawer-all): New function.
(org-cycle-hide-drawers): move...
* lisp/org-compat.el (org-cycle-hide-drawers): ... here.
* lisp/org-agenda.el (org-agenda-show-1): Remove use of
`org-cycle-hide-drawers'.
2020-05-09 15:30:02 +02:00
Nicolas Goaziou 8580ef6ec1 Rename `org-at-property-block-p'
* lisp/org.el (org-at-property-drawer-p): New name.
* lisp/org-compat.el (org-at-property-block-p): Obsolete alias.
2020-05-09 12:50:34 +02:00
Kévin Le Gouguec e47b053d9a compat: Add `org-newline-and-indent'
* lisp/org-compat.el (org-newline-and-indent): New function.
* lisp/org.el (org--newline): Use new function.
2020-05-07 21:34:32 +02:00
Kévin Le Gouguec d3e6b58004 Make RET and C-j obey `electric-indent-mode'
* lisp/org-compat.el (org-return-indent): Deprecate this command.
* lisp/org-keys.el (org-mode-map): Rebind C-j to a command emulating
`electric-newline-and-maybe-indent'.
* lisp/org.el (org-cdlatex-environment-indent): Stop using the now
obsolete function.
(org--newline): New helper function.
(org-return): Use it to transparently handle `electric-indent-mode'.
(org-return-and-maybe-indent): New command to emulate
`electric-newline-and-maybe-indent' while taking care of Org special
cases (tables, links, timestamps).
* testing/lisp/test-org.el (test-org/with-electric-indent,
test-org/without-electric-indent): New tests.
* testing/org-test.el (org-test-with-minor-mode): New helper to set a
minor mode to a specific state, and reset it afterward.
2020-05-07 12:14:30 +02:00
Nicolas Goaziou 62f197103f compat: Silence byte-compiler
* lisp/org-compat.el (org-hide-block-toggle-maybe): Tiny refactoring.
2020-04-18 19:37:41 +02:00
Nicolas Goaziou 4fbc36a057 Deprecate `org-hide-block-toggle-all'
* lisp/org.el (org-hide-block-toggle-all): move...
* lisp/org-compat.el (org-hide-block-toggle-all): ... here.
2020-04-18 18:34:56 +02:00
Nicolas Goaziou cd9e000d86 Deprecate `org-hide-block-toggle-maybe'
* lisp/org.el (org-hide-block-all): Use `org-hide-block-toggle'.
(org-hide-block-toggle-maybe): move...
* lisp/org-compat.el (org-hide-block-toggle-maybe): ... here.
2020-04-18 18:34:56 +02:00
Nicolas Goaziou b4f77b1f9a Deprecate `org-flag-drawer'
* testing/lisp/test-org.el (test-org/flag-drawer): Remove tests.
* lisp/org-clock.el (org-clock-jump-to-current-clock):
* lisp/org.el (org-cycle-hide-drawers): Use `org-hide-drawer-toggle'
instead.
(org-insert-drawer)
(org-hide-drawer-toggle): Use `org-flag-region' instead.
(org-flag-drawer): move...
* lisp/org-compat.el (org-flag-drawer): ... here.
2020-04-18 18:34:55 +02:00
Mattias Engdegård b78583a1c1 Backport commit 770f76f05 from Emacs
Make regexps smaller and faster by removing terms that are superfluous
by virtue of standing next to another term that matches more.  See
https://lists.gnu.org/archive/html/emacs-devel/2020-01/msg00949.html
for details.

* lisp/ob-core.el (org-babel-remove-result):
* lisp/ob-fortran.el (org-babel-fortran-ensure-main-wrap):
* lisp/org-capture.el (org-capture-set-target-location):
* lisp/org-compat.el (org-maybe-keyword-time-regexp):
* lisp/org-table.el (org-table-expand-lhs-ranges):
Remove subsumed repetitions.

Remove subsumed repetitions in regexps
770f76f050376bbd77a3cc8cf44db57cf855a27c
Mattias Engdegård
Thu Feb 20 16:05:18 2020 +0100
2020-03-15 22:51:31 -04:00
Nicolas Goaziou d9b1fb1e8c org-compat: Add missing definition
* lisp/org-compat.el (org-maybe-keyword-time-regexp): New variable.

This is a followup to 209fb501bd.
2020-03-12 09:57:24 +01:00
Nicolas Goaziou 209fb501bd org-compat: Mark `org-maybe-keyword-time-regexp' as obsolete
* lisp/org-compat.el (org-maybe-keyword-time-regexp): Make obsolete.
2020-03-12 09:08:27 +01:00
Nicolas Goaziou a63073ec04 Move obsolete aliases into "org-compat.el" 2020-02-23 12:57:07 +01:00
Bastien fae16ed8f5 Add `generated-autoload-file' buffer local variable
* lisp/org.el:
* lisp/org-num.el:
* lisp/org-macs.el:
* lisp/org-list.el:
* lisp/org-lint.el:
* lisp/org-keys.el:
* lisp/org-goto.el:
* lisp/org-duration.el:
* lisp/org-compat.el:
* lisp/org-colview.el:
* lisp/org-capture.el:
* lisp/org-agenda.el:
* lisp/ol.el: Add `generated-autoload-file' buffer local variable.

This is needed when compiling Org files within GNU Emacs.
2020-02-18 23:37:24 +01:00
Bastien a85f1603ec Merge branch 'maint' 2020-02-17 16:36:12 +01:00
Bastien 6accd0ef62 Fix fb188adda 2020-02-17 16:36:01 +01:00
Bastien cdf7d6414d Merge branch 'maint' 2020-02-17 16:29:38 +01:00
Bastien 016aa96f99 Revert "org-compat.el: Require 'org-agenda in a timely fashion"
This reverts commit 2f30ecffdf.
2020-02-17 16:29:21 +01:00
Bastien 19cdef520e Merge branch 'maint' 2020-02-17 14:51:47 +01:00
Bastien 2f30ecffdf org-compat.el: Require 'org-agenda in a timely fashion
* lisp/org-compat.el ("calendar"): Require 'org-agenda before
adding `org--setup-calendar-bindings' to `calendar-mode-hook'.

This fixes Emacs bug#38592.
2020-02-17 14:49:15 +01:00
Nicolas Goaziou 2fbbc23368 Fix build
* lisp/org-compat.el (org-file-properties): Prevent error at build
time about creating an alias for a local variable.
* lisp/org.el (org-keyword-properties): Slight change to docstring.
2020-01-03 11:07:28 +01:00
Kyle Meyer 93c11da002 Merge branch 'maint' 2020-01-01 13:39:26 -05:00