Commit Graph

23544 Commits

Author SHA1 Message Date
Stefan Kangas a50a42ceae Use lexical-binding cookie in some trivial files
* mk/org-fixup.el (org-make-org-version): Add lexical-binding cookie
to autogenerated files.
* lisp/org-install.el: Use lexical-binding.
2021-01-24 22:36:30 -05:00
Tara Lorenz 13e98e2a13 ox-latex.el: fix interpretation of org-latex-pdf-process
* ox-latex.el (org-latex-export-to-pdf):  The documentation for
`org-latex-pdf-process' states that "%bib" will be expanded into the
current binding of `org-latex-bibtex-compiler'.  However, the
`org-latex-export-to-pdf', where the expansion takes place, expects
"%bibtex" instead.  This fix will accept "%bib" as well as "%bibtex"
as markers for `org-latex-bib-compiler'.

This fixes a regression from f6187deca (ox-latex: Small refactor,
2015-09-13).

TINYCHANGE
2021-01-24 22:16:45 -05:00
Kyle Meyer b99beaad18 org-macs: Add basic tests for org-matcher-time
* testing/lisp/test-org-macs.el (test-org-matcher-time): Add tests.

This includes of a test for the missing hour modifier added in the
previous commit.
2021-01-24 22:16:45 -05:00
Daniel Gröber aeb9f036ff org-macs: Allow specifying relative time in hours
* lisp/org-macs.el (org-matcher-time): Handle hour ("h") time stamp
modifier.
* doc/org-manual.org (The date/time prompt): Document hour modifier.

This adds support for date expressions such as +12h to
org-matcher-time. The regexp this function uses to parse such relative
expressions already includes the "h" character but doesn't actually
handle that case.

AFAICT org-mode commit ec921a2a68 ("Support hourly repeat cookies")
neglected to add support here.

TINYCHANGE
2021-01-24 22:16:45 -05:00
tbanelwebmin@free.fr 9e8215f4a5 ob-C.el: Fix missing C, C++ declaration
* lisp/ob-C.el (org-babel-C-utility-header-to-C): Add declaration of
  strcmp() for C and C++.

* testing/examples/ob-C-test.org (Simple tests): Remove a spurious \n
  new line.
2021-01-14 21:20:00 +01:00
TRS-80 1806abdc39 org-footnote: Fix inserting new footnote mangling drawers
* org-footnote.el (org-footnote-create-definition): Replace
  `forward-line' with `org-end-of-meta-data' to skip over any
  properties and/or drawers that may be present on the
  `org-footnote-section' heading (default "Footnotes").

TINYCHANGE
2021-01-14 00:16:40 -05:00
Christian Garbs d02c0218ef testing/lisp/test-org-archive.el: Fix test
* testing/lisp/test-org-archive.el
(test-org-archive/datetree): Fix test for locales that don't use
English weekday names.
2021-01-14 00:15:34 -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
Stefan Monnier 248dfcd711 Backport commit 5ada3eece from Emacs
* lisp/org-refile.el (org-copy): Fix missing obsoletion version.

5ada3eecec79703a84e2f2c38cae16ef4b2600cc
Stefan Monnier
Thu Dec 17 18:21:47 2020 -0500
2021-01-07 00:13:50 -05:00
Nicolas Goaziou 332da69b3c element: Fix table.el parsing... again!
* lisp/org-element.el (org-element--current-element): Properly parse
table.el tables ending at limit.

Reported-by: Kaushal Modi <kaushal.modi@gmail.com>
<http://lists.gnu.org/r/emacs-orgmode/2021-01/msg00067.html>
2021-01-05 18:06:31 +01:00
Kyle Meyer 273391c978 duration: Avoid recursive load error
* lisp/org-duration.el (org-duration-units): Guard against recursive
load error when org-duration-units is set via the Customize interface
before org-duration is loaded.

This follows the same approach used by erc-nickserv-identify-mode in
the Emacs repository.

Reported-by: Mario Bourgoin <m.bourgoin@gmail.com>
Ref: https://orgmode.org/list/CAM0Tqh+u+L+UgZizJrH+a+W7Lo1stPJgTsRABxD3HobOnOCrNA@mail.gmail.com
2021-01-04 00:30:00 -05:00
Kyle Meyer 99eafe3787 Update copyright year to 2021 2021-01-01 14:59:01 -05:00
Kyle Meyer bd1c3187cf .dir-locals.el: Set indent-tabs-mode to nil in Elisp sources
Despite .dir-locals.el having a catchall value of t for
indent-tabs-mode, Org's Elisp files are a mix of tabs and spaces.
Emacs has used a value of nil for indent-tabs-mode since 93d4412046
(Set indent-tabs-mode to nil in (most) Elisp sources, 2015-04-15).  Do
the same.

Ref: https://orgmode.org/list/87eejsg9vw.fsf@gnu.org
2020-12-23 00:00:26 -05:00
Nicolas Goaziou 97f1d8e340 element: Improve table.el tables dectection
* lisp/org-element.el (org-element--current-element): Limit possible
false positives.
2020-12-22 14:54:43 +01:00
Nicolas Goaziou 118da7d280 element: Fix table.el tables parsing
* lisp/org-element.el (org-element--current-element): Fix regexp
matching a non-data-line.  Use rx.

Reported-by: Nick Dokos <ndokos@gmail.com>
<http://lists.gnu.org/r/emacs-orgmode/2020-12/msg00561.html>
2020-12-22 12:43:48 +01:00
Bastien abedf386b3 lisp/org.el: Bump version to 9.4.4 2020-12-22 10:18:23 +01:00
Bastien 5e7c09e277 org-agenda.el and org-capture.el: Remove `generated-autoload-file'
* lisp/org-agenda.el: Remove `generated-autoload-file' local
variable.

* lisp/org-capture.el: Ditto.

This is a continuation of a4e6a6fa7 which fixes fae16ed8f.
Reported-by: Andrii Kolomoiets <andreyk.mad@gmail.com>
2020-12-22 09:22:14 +01:00
Marco Wahl 6ec2bb04e3 org-macs: Improve navigation in org-mks window
* lisp/org-macs.el (org--mks-read-key): New function parameter
navigation-keys to enable navigation keys. M-v has been added to the
navigation keys.
(org-mks): Supress spurious output in minibuffer.

This commit is a reaction to
https://orgmode.org/list/trinity-b89ea3b3-3d0d-4648-bcfc-0054a4a7fdaa-1607976126186@3c-app-mailcom-bs08/
2020-12-16 22:15:39 +01:00
Bastien 86af7e0c2f lisp/org.el: Bump version to 9.4.3 2020-12-16 10:41:33 +01:00
Bastien a4e6a6fa77 lisp/org.el: Remove local variable `generated-autoload-file'
* lisp/org.el: Remove local variable `generated-autoload-file'.

Fix fae16ed8f and https://debbugs.gnu.org/cgi/bugreport.cgi?bug=45259.
2020-12-16 10:40:18 +01:00
Fatih Aydin 5ee39c3524 ox-html: Add margin to fix overflow visibility problem
* lisp/ox-html.el (org-html-style-default): Add the margin-top
property to pre.src:hover:before so that the programming language is
fully visible.

TINYCHANGE
2020-12-16 00:43:39 -05:00
Jan Lübke a4d0607e19 contrib/org-mac-link.el: fix Mail.app link compatibility with macOS 11
* org-mac-link.el (org-mac-message-open): Replace angular brackets
with encoded version (< to %3C and > to %3E) so macOS 11 Big Sur can
open the message in mail.app.

macOS 11 does not open the mail link with angular brackets any more.
This fix is backwards compatible.  I have tested it on macOS 10.15.7.

TINYCHANGE
2020-12-16 00:40:09 -05:00
Bastien a846152e4d doc/org-manual.org: Enhance examples
* doc/org-manual.org (Link Abbreviations): Enhance examples.
2020-12-15 14:56:45 +01:00
Bastien 678f4d4b35 doc/org-manual.org: Remove a reference
* doc/org-manual.org (Cache results of evaluation): Remove a
reference.

The reference leads to a bug report that does not clearly explain the
situation here.  Also, it contains the string "@somewhere" that fails
to be correctly exported in Texinfo.
2020-12-15 09:02:45 +01:00
Marco Wahl 01f57aa0df org-macs: Make org-mks window navigable when needed
* lisp/org-macs.el (org-mks): Activate keys for scrolling when the
whole text does not fit into the visible portion of the window.

https://orgmode.org/list/trinity-ac492dc8-9edb-46e6-871a-fdbb9eaa3116-1607796126691@3c-app-mailcom-bs06/
2020-12-14 12:56:42 +01:00
Bastien 162e0e3e6e lisp/org.el: Bump version to 9.4.2 2020-12-13 21:10:13 +01:00
Juri Linkov 57a70d5053 ob-ruby.el: Funcall command if it's a function from inf-ruby-implementations
* lisp/ob-ruby.el (org-babel-ruby-initiate-session): When 'command'
is a function from 'inf-ruby-implementations', use 'funcall' to get
a command string for the first arg of 'run-ruby-or-pop-to-buffer'.
This is like what 'run-ruby' does.

Reported-by: Aaron Madlon-Kay <aaron@madlon-kay.com>
Ref: https://orgmode.org/list/CAHvKJZsAUtYOKV1bH_r9BXqE_d6k11qg4dfxvqCUVUxjmGohGw@mail.gmail.com
2020-12-13 14:54:09 -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 8fafb71fea org-startup-options: Fix docstring typo
* lisp/org.el (org-startup-options): Fix docstring typo.
2020-12-12 23:17:30 -05:00
Kyle Meyer 5dc375434c Clean up spacing to pass Emacs's pre-commit check
* lisp/org-agenda.el (org-agenda-todo): Avoid space before tab in
indent.

This is in preparation for syncing with the Emacs repo.
2020-12-12 14:41:42 -05:00
Kyle Meyer 61f37f2e1a lisp/org.el: Bump version to 9.4.1
* lisp/org.el: Bump version to 9.4.1.
2020-12-12 14:34:08 -05:00
Kévin Le Gouguec 8fde9fc905 Offer alternative to disabling electric-indent-mode
* etc/ORG-NEWS (=RET= and =C-j= now obey ~electric-indent-mode~):
Mention alternative values for org-adapt-indentation.
2020-12-12 18:30:59 +01:00
Bastien 7ce1a666d8 lisp/ob-abc.el: Fix link to William Waites homepage 2020-12-11 08:57:44 +01:00
Ihor Radchenko a03f17e49f Fix org-in-archived-heading-p
* lisp/org.el (org-in-archived-heading-p): When called on a heading
with a tag containing org-archive-tag string as a substring, that
heading was incorrectly recognised as archived.  Changed matching
against the whole :tag1:tag2:...: string to matching against tag list
as returned by `org-get-tags'.
* testing/lisp/test-org.el (test-org/in-archived-heading-p): Add test
when one of the heading tags contains org-archive-tag as a substring.
2020-12-10 22:25:12 -05:00
Kyle Meyer cf02219e72 org: Reset saved scroll position on new cycling sequence
* lisp/org.el (org-optimize-window-after-visibility-change): Reset
org-scroll-position-to-restore if it is not a repeated call.

The org-scroll-position-to-restore variable is used to save the
position, but the position may be from a cycling sequence other than
the current one.  Reset it at the start of a sequence.
2020-12-10 00:48:29 -05:00
Kyle Meyer 4f8ac0a7a3 org.el: Fix cycling hang when %p is in frame-title-format
* lisp/org.el (org-optimize-window-after-visibility-change): Guard
against calling set-window-start with a nil POS argument.

org-optimize-window-after-visibility-change calls set-window-start
with org-scroll-position-to-restore when it is a repeat call
(i.e. last-command and this-command match).  However,
org-scroll-position-to-restore may not have yet been set yet (e.g. if
org-startup-folded is at its default value of showeverything).

Calling set-window-start appears to generally be a noop, but, for a
reason that I don't understand, it triggers a hang when %p is in
frame-title-format.

Reported-by: Massimo Lauria <massimo.lauria@uniroma1.it>
Ref: https://orgmode.org/list/CAJCFsEEHJXP4nKZpWdzheMM5O0Dq-tT+v0u0FsT+3Q0mi4v10A@mail.gmail.com
2020-12-10 00:48:24 -05:00
Kyle Meyer 2eb5f0741f org-fixup-indentation: Fix regression in logbook adjustment
* lisp/org.el (org-fixup-indentation): Don't call indent-line-to with
a negative value.
* testing/lisp/test-org.el (test-org/promote):
(test-org/demote): Add tests.

The handling added in 11ef7454a (org.el (org-fixup-indentation): Fix
logbook drawers indentation, 2020-09-07) calls indent-line-to with a
value equal to the sum of current indentation and the DIFF argument,
but this can lead to a type error because DIFF may be negative.

Note that, aside from the headline-data test cases, the added tests on
top of the parent of e3b79ad2b (Allow a new value for
`org-adapt-indentation', 2020-02-09), which added the initial logbook
special case to org-fixup-indentation.

Reported-by: Duianto <otnaiud@gmail.com>
Ref: https://orgmode.org/list/CAE-tX7i5ew3ED3YX6jjx57qNuRtV0AumWKuE0W83YUUReKE5-g@mail.gmail.com
Reported-by: stardiviner <numbchild@gmail.com>
Ref: https://orgmode.org/list/CAL1eYuKObYzY2MHSQ+W08mW3TZ+83H45teOq_rHq9qz7-FEgKw@mail.gmail.com
2020-12-08 23:48:16 -05:00
Stefan Kangas 706ba90195 Backport commit 0a4aa2894 from Emacs
* lisp/org.el: Don't require 'font-lock'; it is preloaded since
version 22.1.

Remove redundant requires of 'font-lock'
0a4aa2894297c0fd9e735328bbb60b427e0ba5d4
Stefan Kangas
Thu Dec 3 08:50:14 2020 +0100
2020-12-03 19:20:23 -05:00
Kyle Meyer 3bb073b638 ol: Fix type error in org-link-search corner case
* lisp/ol.el (org-link-search): Account for orphan #+name keyword.

If #+name is followed by a blank line (making it an invalid affiliated
keyword), :name is nil.

Reported-by: Dima Kogan <dima@secretsauce.net>
Ref: https://orgmode.org/list/875z5xf7f7.fsf@secretsauce.net
2020-11-30 23:49:48 -05:00
Kyle Meyer c974467fe5 org-goto: Explicitly load org.el and org-refile.el
* lisp/org-goto.el: Require org.el and org-refile.el.

org-goto.el depends on org.el and org-refile.el being loaded, and the
autoloaded org-goto command may be called before org.el and
org-refile.el are loaded (and an org-refile.el load won't be triggered
just by visiting an Org file).

Reported-by: Omar Antolín Camarena <omar@matem.unam.mx>
Ref: https://orgmode.org/list/87h7pil2v5.fsf@matem.unam.mx
2020-11-28 17:21:14 -05:00
Juri Linkov f7e286ab96 ob-ruby.el: Don't reuse the same buffer among different named sessions
* lisp/ob-ruby.el (org-babel-ruby-initiate-session): Instead of
run-ruby that always insists on using the existing buffer, use
run-ruby-or-pop-to-buffer that allows using the buffer with the
same name as :session header arg.  Use the existing buffer
returned by inf-ruby-buffer only when :session header arg is nil.
https://github.com/nonsequitur/inf-ruby/issues/121
2020-11-28 16:34:24 -05:00
Nick Dokos 546b2ba26b org-odt-planning: Fix scheduled item output
* lisp/ox-odt.el (org-odt-planning): Use org-scheduled-string, not
  org-deadline-string, for scheduled items.

See <https://emacs.stackexchange.com/questions/61985/org-export-to-odt-incorrectly-use-deadline-for-scheduled> for an ECM.
2020-11-28 10:50:39 -05:00
Kyle Meyer b2717ca5a7 Update customize-package-emacs-version-alist
* lisp/org.el (customize-package-emacs-version-alist): Map Org 9.4 to
Emacs 27.2.

9.4.x, rather than 9.3.8, may be synced for the upcoming Emacs 27.2
release (bug#43268, <87lfeo3vzg.fsf@bzg.fr>).
2020-11-28 01:56:47 -05:00
Florian Dufour ccf81be2a2 org-capture.el: Add :tree-type 'month' in org-capture-templates description
* lisp/org-capture.el (org-capture-templates): Enhance description and
add 'month' value for :tree-type in description.

* doc/org-manual.org: Fix typo for displaying 'month' in :tree-type
property.

TINYCHANGE
2020-11-27 01:27:30 -05:00
Michael Albinus a368bf111a Backport commit 67a8bdb90 from Emacs
* lisp/ob-picolisp.el (org-babel-execute:picolisp):
* lisp/ob-screen.el (org-babel-default-header-args:screen): Use
null-device.  (Bug#3736)

Use null-device where appropriate
67a8bdb90c9b5865b7f17290c7135b1a5458c36d
Michael Albinus
Wed Nov 25 22:13:33 2020 +0100

[km] Resolved conflict in ob-screen.  "/dev/null" was relocated to
     org-babel-default-header-args in 0ab117bc5 (ob-screen: Accept
     :screenrc header argument, 2020-07-14).
2020-11-26 19:35:58 -05:00
Stefan Kangas 00bc3097cd Backport commit affe9b225 from Emacs
* lisp/org-agenda.el (org-agenda-mode):
* lisp/org-table.el (org-table-edit-formulas, orgtbl-mode):
* lisp/org.el: Don't call easy-menu-add, an obsolete XEmacs compat
alias.

Make XEmacs compat aliases easy-menu-{add,remove} obsolete
affe9b225de711429248a73f920dc9f38b15c932
Stefan Kangas
Tue Nov 24 18:06:05 2020 +0100
2020-11-26 19:31:48 -05:00
Cheong Yiu Fung 2d23d55ac5 ox-odt.el: quote output file name
* lisp/ox-odt.el (org-odt-do-convert): Add `shell-quote-argument'
around output file name.

TINYCHANGE
2020-11-22 22:24:51 -05:00
Stefan Kangas 0abb6de0cf Backport commit 430eb2f85 from Emacs
* lisp/org.el (org-org-menu, org-create-customize-menu):
Remove Emacs 20 compat code.

Remove Emacs 20 compat code from org.el
430eb2f850b26f7df8473de4d929b5665673a0a2
Stefan Kangas
Fri Nov 20 16:11:33 2020 +0100
2020-11-22 21:17:28 -05:00
Dieter Faulbaum 5272d97e5c manual: Repeat cookies should be in the same order as the repeats
* doc/org-manual.org (Repeated tasks): Reorder repeat cookies so that
their order matches the order of the labels at the beginning of the
sentence.

TINYCHANGE
2020-11-19 23:03:49 -05:00
Greg Minshall a5d765481d doc/org-manual.org: add reference to org-table-transpose-table-at-point
* doc/org-manual.org (Built-in Table Editor): Add
org-table-transpose-table-at-point to list of miscellaneous commands.
2020-11-19 22:54:21 -05:00