Commit Graph

23532 Commits

Author SHA1 Message Date
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
Kyle Meyer 104d92199e agenda: Fix toggling of archive files
* lisp/org-agenda.el (org-agenda-archives-mode): Turn archive mode off
if with-files in non-nil but files are already included so that a
repeated `vA` can toggle in the same manner as a repeated `va`.

Reported-by: Gustavo Barros <gusbrs.2016@gmail.com>
Ref: https://orgmode.org/list/87o8jxz5hu.fsf@gmail.com
2020-11-17 00:49:22 -05:00
Juri Linkov 9bb93006ea Backport commit 844e82f5a from Emacs
* lisp/ob-ruby.el (org-babel-ruby-initiate-session): Use :ruby header arg.
(org-babel-execute:ruby): Call org-babel-ruby-initiate-session with
`params'.
(org-babel-ruby-command): Mention :ruby header argument.

* lisp/org/ob-ruby.el (org-babel-ruby-initiate-session): Use :ruby header arg.
844e82f5a837a16c64e32ff9dd41a9e9b3ad3432
Juri Linkov
Sat Nov 14 22:18:38 2020 +0200
2020-11-14 15:50:30 -05:00
Kyle Meyer 23896ba683 ox-odt: Drop another (function (lambda ...))
* lisp/ox-odt.el (org-odt--image-size): Drop unnecessary `function'
call around `lambda'.

The previous commit from Emacs removed a (function (lambda ...))
instance immediately above.  Do the same here.
2020-11-14 15:44:26 -05:00
Stefan Kangas a97bb27f32 Backport commit 61dca6e92 from Emacs
* lisp/org/ox-odt.el (org-odt--image-size): Don't quote lambdas.

Don't quote lambdas in several places
61dca6e92ac972b832e889fbeab9b6131fc896fa
Stefan Kangas
Sat Nov 14 17:04:23 2020 +0100
2020-11-14 15:44:24 -05:00
Juri Linkov fd4eec036d Backport commit 79d04ae13 from Emacs
* lisp/org-element.el (org-element-parse-secondary-string):
Don't set buffer-local variables buffer-file-name and buffer-file-truename
in temporary buffer.

Don't set file name variable in org-element-parse-secondary-string (bug#44524)
79d04ae13ff33a93f631061d912168e9703251dd
Juri Linkov
Tue Nov 10 21:27:37 2020 +0200
2020-11-14 15:44:23 -05:00
Chen Li 1cc2222045 ol-wl: add maildir and rss to folder types
* contrib/lisp/ol-wl.el (org-wl-folder-types): Add maildir and rss.

with this commit, org-link can open maildir and rss folder.

more to read: http://wanderlust.github.io/wl-docs/wl.html#Folders~
2020-11-12 23:19:59 -05:00
Kyle Meyer 262777294f archive: Account for org-odd-levels-only in datetree calculations
* lisp/org-archive.el (org-archive-subtree): Honor org-odd-levels-only
when filling in org-archive-location placeholders with stars.
* testing/lisp/test-org-archive.el (test-org-archive/datetree): Add test.

Reported-by: Charles Tam <me@charlest.net>
Ref: https://orgmode.org/list/CAKu+9YVus=wPKGMY_vWp_7ND+oK7ZrRhN=1TXa2Cok3=8se1gg@mail.gmail.com
2020-11-12 00:59:53 -05:00
Kyle Meyer f6cf6bb6e2 manual: Mention org-agenda-set-effort
* doc/org-manual.org (Remote editing): Add entry for
org-agenda-set-effort.

Reported-by: Ian Garmaise <ian.g@phorixsol.com>
Ref: https://orgmode.org/list/CALWEx6WuTe_b2c-em8jTzx5k=XHGy1L=87tn5Ge9g3oHPp1fVA@mail.gmail.com
2020-11-12 00:45:57 -05:00
Bastien ff5fd323b1 contrib/lisp/ox-taskjuggler.el: Use non-obsolete variable names
* contrib/lisp/ox-taskjuggler.el (org-taskjuggler--build-task):
Use non-obsolete variable names.
2020-11-11 09:13:42 +01:00
Bastien 370cf49cd2 lisp/org.el: Use non-obsolete variable names
* lisp/org.el (org-set-regexps-and-options): Use non-obsolete
variable names.
2020-11-11 09:11:52 +01:00
Kyle Meyer 95af0a244f agenda: Consistently clear temporary agenda name
* lisp/org-agenda.el (org-agenda--get-buffer-name): New function.
(org-agenda-list): Move buffer name logic to shared function.
(org-search-view):
(org-todo-list):
(org-tags-view): Use org-agenda--get-buffer-name.
* testing/lisp/test-org-agenda.el
(test-org-agenda/sticky-agenda-name): Add test.

The different agenda commands repeat similar logic for determining the
buffer name, mixing in a tailored sticky buffer format.  However, only
org-agenda-list falls back to "*Org Agenda*" when org-agenda-sticky is
nil.  As a result, a buffer generated with org-follow-timestamp-link,
which gets a custom name, is not reset when commands other than
org-agenda-list generate a new agenda.

Move the logic from org-agenda-list to a helper function and use it
across the agenda-generating commands.

Reported-by: Garjola Dindi <garjola@garjola.net>
Ref: https://orgmode.org/list/87tuuj4lo9.fsf@pc-117-162.ovh.com
2020-11-09 01:07:35 -05:00
Kyle Meyer 49f4c364fd manual: Re-attach a footnote to its definition
With the conflict resolution in 9410fbe06 (Merge branch 'maint',
2020-09-06), what was footnote definition 89 got moved to 161, but the
reference remained 89.  Re-link the footnote and definition, and then
renumber and sort the footnotes.
2020-11-07 02:36:37 -05:00