Commit Graph

23567 Commits

Author SHA1 Message Date
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
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 20374f69e8 ob-exp: Restore evaluation query for lob calls during export
* lisp/ob-exp.el (org-babel-exp-results): Fix a regression from v9.0
that led to silently executing lob calls on export despite a non-nil
value of org-confirm-babel-evaluate.
* testing/lisp/test-ob-lob.el (test-ob-lob/confirm-evaluate): New test.

56bf3d789 (Babel: avoid superfluous confirmation for internal wrapper,
2013-04-10) let-bound org-confirm-babel-evaluate to nil in two spots
to prevent double querying for lob calls.  These overrides were no
longer needed following the refactoring in dbb375fdf (Simplify Babel
calls evaluation, 2016-06-16).  However, that commit dropped only one
of the spots, and, as a result, disabled confirmation unconditionally
when exporting lob calls.

Drop the remaining org-confirm-babel-evaluate override.

Reported-by: 吴锐扬 <ywwry66@gmail.com>
Ref: https://orgmode.org/list/5362C0A0-632F-4C87-8FA1-915F0F53D8B8@gmail.com
2020-11-01 18:34:16 -05:00
Kyle Meyer e8070d71ab Revert "org.el: Allow empty subtrees to be folded back"
* lisp/org.el (org-cycle-internal-local): Revert
ee3c3b5547, which does not appear to
have addressed the original issue and breaks cycling with empty lines.

Reported-by: B Goodr <bgoodr@gmail.com>
Ref: https://orgmode.org/list/CAJj=8EFJXFu9ZQ11cO24AAu=1jykW2Zr+=R4FLuKG=bLjfUe+g@mail.gmail.com
Reported-by: Mikhail Skorzhisnkii <mskorzhinskiy@eml.cc>
Ref: https://orgmode.org/list/87h7qu10ht.fsf@eml.cc
2020-10-26 23:52:01 -04:00
Stefan Kangas 47bf6005b3 Backport commit dd16e46bb from Emacs
; Prefer https to http in more URLs
dd16e46bb9d0099baea06d780ad8f62728addc2e
Stefan Kangas
Sat Oct 24 20:23:27 2020 +0200
2020-10-25 01:10:16 -04:00
Stefan Kangas 0193b543e9 Backport commit 4a575eb18 from Emacs
byte-compile-file: Make optional LOAD argument obsolete
4a575eb18cca3eed5019f2d2d2abeea1f0c07005
Stefan Kangas
Tue Oct 20 18:48:27 2020 +0200
2020-10-25 01:10:16 -04:00
Adrian Kummerlaender a442c2515d ob-python: Rename exec tmpfile handle to prevent conflict
* lisp/ob-python.el (org-babel-python--exec-tmpfile): Rename tmpfile handle
(org-babel-python-format-session-value): Rename tmpfile handle

Opening the exec tmpfile as a `f' variable shadows any such variable
that might by defined by the Python session context. e.g. my Org babel
files commonly pass single letter variables inside a session which is
broken by this behavior.

The new name `__org_babel_python_tmpfile' is in line with other org
mode specific Python variables set by ob-python.  This is unlikely to
conflict with the user's Python code.

TINYCHANGE
2020-10-24 07:01:27 -07:00
Aaron Madlon-Kay 3ce495cc44 ob-ruby.el: allow specification of ruby command w/header arg
b-ruby.el: Use the :ruby header arg

* lisp/ob-ruby.el (org-babel-execute:ruby): Locally set
`org-babel-ruby-command' using a header argument.

TINYCHANGE
2020-10-24 13:37:25 +02:00
Adam Spiers 752c466a63 org-agenda.el: Fix typo in docstring
* lisp/org-agenda.el (org-agenda-new-marker): Fix typo in docstring.

TINYCHANGE
2020-10-24 13:34:02 +02:00
Kyle Meyer edfafa9090 org.el: Autoload org-load-modules-maybe
* lisp/org.el (org-load-modules-maybe): Autoload.

org-store-link and orgtbl-mode both 1) call org-load-modules-maybe at
the start of their execution, 2) can be used outside of Org mode, and
3) are in libraries that do not load org.el (instead org.el loads
them).  Autoload org-load-modules-maybe to avoid an error if these are
called before org.el is loaded.

Reported-by: Tim Frana <tfr@mailbox.org>
Ref: https://orgmode.org/list/5e0f0216-44d8-c909-3757-4d95650445ef@mailbox.org
2020-10-20 00:39:28 -04:00
Martin Kampas 90b14cb409 org-colview: Fix done keywords highlighting in agenda buffers
* lisp/org-colview.el (org-agenda-columns): Populate
org-done-keywords from org-done-keywords-for-agenda or the done keywords
will use the same face as those not-done.

TINYCHANGE
2020-10-20 00:35:11 -04:00
Kevin J. Foley 2d1e2606e7 org-refile.el (org-refile): Add description of RFLOC to docstring
* lisp/org-refile.el (org-refile): Document structure of RFLOC
parameter.
2020-10-20 00:35:10 -04:00
Kyle Meyer b1de0c8e4b Fix regression in priority fontification
* lisp/org-agenda.el (org-agenda-fontify-priorities):
* lisp/org.el (org-font-lock-add-priority-faces): Fontify up to the
end of the closing bracket of the priority, as was the case before
v9.4.

7b1077def (Tiny enhancements to priority handling, 2020-01-30)
switched org-agenda-fontify-priorities and
org-font-lock-add-priority-faces over to using org-priority-regexp
rather than inline regexps.  For the inline regexps, the first group
ended at the closing bracket, but the first group in
org-priority-regexp includes an optional space, leading to the face
extending one character too far.

Restore the bound to the closing bracket by determining the bound
based on the second group, the priority label, instead.

Reported-by: Roman Rudakov <rrudakov@pm.me>
Helped-by: Protesilaos Stavrou <info@protesilaos.com>
Ref: https://orgmode.org/list/87r1r2kh77.fsf@pm.me
2020-10-11 02:04:11 -04:00
Nicholas Vollmer f0902bf185 org.el (org-display-outline-path): Fix invalid face reference error
* lisp/org.el (org-display-outline-path): Use an anonymous face when
adding default :height to outline path.
2020-10-07 00:41:46 -04:00
Stefan Kangas 9a6689f9ce Backport commit c6fa0ad31 from Emacs
; Prefer https to http in many URLs
c6fa0ad315e38167cb81a4d8c143cc53ad783cc3
Stefan Kangas
Thu Oct 1 15:28:15 2020 +0200
2020-10-04 15:06:39 -04:00
Stefan Kangas ddcccbc012 Backport commit 78eacf31e from Emacs
; Fix many typos in symbols in docs and comments
78eacf31e8fe182801ad1943fac717b75fcf286b
Stefan Kangas
Fri Oct 2 13:29:45 2020 +0200
2020-10-04 15:06:39 -04:00