Commit Graph

23567 Commits

Author SHA1 Message Date
Nicholas Vollmer 093b474e6a org-list: Operate on single line if no active region
* lisp/org-list.el (org-toggle-item): Operate on single line if no
active region.
2020-08-02 22:55:47 -04:00
Kyle Meyer df5a836375 ob-core: Call org-confirm-babel-evaluate with expanded noweb refs
* lisp/ob-core.el (org-babel-check-confirm-evaluate): Expand noweb
references in the body passed to org-confirm-babel-evaluate.
* testing/lisp/test-ob.el (test-ob/check-eval-noweb-expanded): New
test.

When noweb references are set to be expanded for evaluation,
org-confirm-babel-evaluate should receive the expanded body so that it
can make its decision based on what actually will be evaluated
(without resorting to calling org-babel-get-src-block-info itself).

Note that this results in up to three calls to
org-babel-expand-noweb-references.  Possible ways to avoid this are
discussed at the thread referenced below.

Reported-by: Tom Gillespie <tgbugs@gmail.com>
https://orgmode.org/list/CA+G3_PNi3uMvBiWgBdKuC3C6VJt1T1j-RKH43LRqYbr+4NS8ZA@mail.gmail.com/
2020-08-02 22:55:16 -04:00
Bassam Saeed b395f0abf6 ol.el: Fixed typo
* lisp/ol.el (org-link-parameters): Fixed typo 'ar' to 'are'

TINYCHANGE
2020-08-02 00:07:34 -04:00
Kyle Meyer a1e5bee5cb Merge branch 'maint' 2020-07-29 22:29:10 -04:00
Matt Huszagh 521d7f5fe4 org-manual.org: Modify file-desc header argument to match action
* doc/org-manual.org (Results of Evaluation): Correct description of
how file-desc behaves when no value is given.

TINYCHANGE
2020-07-29 22:24:04 -04:00
Kévin Le Gouguec 0fd9a6ad6c Fix recommendation in 9.4 release notes
Cf. <https://orgmode.org/list/87pn8huuq2.fsf@iki.fi/t/#m4f86f6baf790e88ab905007757487a1f481cc579>.

Reported-by: Jarmo Hurri <jarmo.hurri@iki.fi>

* etc/ORG-NEWS (=RET= and =C-j= now obey ~electric-indent-mode~):
Recommend disabling electric-indent-local-mode rather than
electric-indent-mode, as the latter impacts all buffers rather than
just the newly-created Org buffer.
2020-07-28 21:49:58 -04:00
Nicolas Goaziou 270aa438e2 Fix `org-show-children' error when called before first heading
* lisp/org.el (org-show-children): Fix `org-show-children' error when
called before first heading.
2020-07-27 19:22:46 +02:00
Kyle Meyer 82b496c0e9 Merge branch 'maint' 2020-07-22 23:33:07 -04:00
Leo Vivier c9abb4c29a org: Remove useless example in docstring
* lisp/org.el (org-find-olp): Remove useless example in docstring.

TINYCHANGE
2020-07-22 23:30:58 -04:00
Marco Wahl 7069dc3f32 org: New function to hide the body up to the first child
* lisp/org.el (org-hide-entry): New function. Counterpart to org-show-entry.
2020-07-21 12:14:10 +02:00
Kyle Meyer bb427f7bd6 Merge branch 'maint' 2020-07-18 20:15:32 -04:00
Kyle Meyer b2b587387e org-eldoc: Fix compatibility with Emacs 28
* contrib/lisp/org-eldoc.el (org-eldoc-documentation-function): Accept
and ignore additional arguments for compatibility with Emacs 28.
(org-eldoc-load): Use add-function to register
org-eldoc-documentation-function for Emacs versions 25 through 27, as
documented in eldoc-documentation-function.

See Emacs's fd020a2931 (eldoc: modify `eldoc-documentation-function'
using `add-function', 2014-12-05) and c0fcbd2c11 (Expose ElDoc
functions in a hook (Bug#28257), 2020-02-25) for more information on
the Emacs 25 and Emacs 28 changes, respectively.
2020-07-18 20:14:18 -04:00
Kyle Meyer 05fac0b765 org-macs.el: Silence byte-compiler under 'make single' 2020-07-15 23:37:21 -04:00
Kyle Meyer 454131d228 ob-screen: Quote session name before passing to string-match
* lisp/ob-screen.el (org-babel-screen-session-socketname): Quote
session name before giving it to string-match because the name may
have regexp characters.

While touching the line, make two cosmetic tweaks.
2020-07-15 23:28:00 -04:00
Kenneth D. Mankoff 0ab117bc57 ob-screen: Accept :screenrc header argument
* lisp/ob-screen.el (org-babel-default-header-args:screen): Add
default header argument `:screenrc' and value "/dev/null".
(org-babel-prep-session:screen): Use header argument in variable
`screenrc' and not hard-coded value.
2020-07-15 23:13:44 -04:00
Kenneth D. Mankoff 25bc790be5 ob-screen: Respect :session name. Don't prepend 'org-babel-session-'
* lisp/ob-screen.el (org-babel-prep-session:screen): Remove concat of
"org-babel-session-" string onto session name when creating session.
(org-babel-screen-session-socketname): Remove concat of
"org-babel-session-" string onto session name searching for existing
screen session.
2020-07-15 23:13:44 -04:00
Kenneth D. Mankoff 68b7415146 ob-screen: Execute last line in block (send newline)
* lisp/ob-screen.el (org-babel-screen-session-write-temp-file): Insert
newline after body.
2020-07-15 22:51:46 -04:00
Nicolas Goaziou ddfc469a1a id: Fix error about `agenda-archives'
* lisp/org-id.el (org-id-update-id-locations): Default extra files
also include a special symbol.  Be sure to remove it before calling
`file-truename'.
2020-07-14 19:07:14 +02:00
Nicolas Goaziou 91b2398293 Do not fill paragraph before region
* lisp/org.el (org-fill-paragraph): Do not fill paragraph before
region.
* testing/lisp/test-org.el (test-org/fill-paragraph): Add test.

Reported-by: Matt Lundin <mdl@imapmail.org>
<http://lists.gnu.org/r/emacs-orgmode/2020-07/msg00164.html>
2020-07-14 11:46:38 +02:00
Alexandru-Sergiu Marton fe41103d50 ox: Add Romanian smart quotes
* lisp/ox.el (org-export-smart-quotes-alist): Add Romanian variants for
  smart quotes.

TINYCHANGE
2020-07-13 18:17:37 +02:00
Kyle Meyer 95eaab7f44 agenda: Fold case when retrieving user-configured effort values
* lisp/org-agenda.el (org-agenda-filter-by-effort):
(org-agenda-filter-completion-function): Ignore case when querying
effort property key in org-global-properties since property keys are
documented as case-insensitive.
2020-07-09 00:33:09 -04:00
Kyle Meyer eac255d911 Merge branch 'maint' 2020-07-08 00:12:06 -04:00
Kyle Meyer e62ca4a1bf org-attach: Fix :type for org-attach-use-inheritance
* lisp/org-attach.el (org-attach-use-inheritance): Drop repeated :type
keyword that incorrectly marked the option as boolean.

Reported-by: Philip Blagoveschensky <philip@crabman.me>
https://orgmode.org/list/7036d668-eb09-ba4d-0b46-503fbc4a50ce@crabman.me
2020-07-08 00:11:34 -04:00
Nick Dokos bc4fa8a008 org: add property names from #+PROPERTY keywords to completion list
* lisp/org.el (org-buffer-property-keys): Enhance the completion list
with property names from #+PROPERTY keywords, not just property
drawers. Also, for each xxx_ALL property, make sure that the bare xxx
property is added too.

* testing/lisp/test-org.el (test-org/buffer-property-keys): Add test
cases for #+PROPERTY keywords and also for xxx_ALL --> xxx properties.

See https://emacs.stackexchange.com/questions/59448/ for details.

Modified-by: Kyle Meyer <kyle@kyleam.com>
  Cosmetic tweaks to _ALL stripping.
2020-07-07 23:37:54 -04:00
Nicolas Goaziou 353e8cc2b7 Fix paragraph filling
* lisp/org.el (org-fill-paragraph): Fix regression introduced in
e2b62b4da8.
* testing/lisp/test-org.el (test-org/fill-paragraph): New test.

Reported-by: stardiviner <numbchild@gmail.com>
<http://lists.gnu.org/r/emacs-orgmode/2020-07/msg00065.html>
2020-07-07 10:37:35 +02:00
Marco Wahl ab864a29be org: Improve consistency for org-ctrl-c-tab and children folding
* lisp/org.el (org-ctrl-c-tab): Don't move point when acting on
  outline level 0 (which is before first heading). This is consistent to
  the behavior for level > 0. And refactor some. And correct the
  docstring.
2020-07-07 00:39:35 +02:00
Marco Wahl 8b92bcd827 org: Enable org-show-entry before first heading
* lisp/org.el (org-show-entry): Before first heading show the region
  up to the first heading. Remove the now useless ignore-errors.

This behavior allows to reveal invisible text before the first
heading.
2020-07-07 00:12:39 +02:00
Nicolas Goaziou 07a4a72862 list: Fix regression when inserting items
* lisp/org-list.el (org-list-insert-item): Fix splitting item.
* testing/lisp/test-org-list.el (test-org-list/insert-item): Add test.

Reported-by: Duianto - <otnaiud@gmail.com>
<http://lists.gnu.org/r/emacs-orgmode/2020-07/msg00061.html>
2020-07-06 12:05:18 +02:00
Albert Krewinkel c78db89106 entities: rename section with eth and thorn to "Icelandic"
Eth and thorn are letters in the Icelandic alphabet, and the language
is in active use.

TINYCHANGE
2020-07-05 23:51:40 +02:00
Erik Hetzner ab80b26667 id: Fix behavior when `org-id-extra-files' is a symbol
* lisp/org-id.el (org-id-update-id-locations): When
`org-id-extra-files' is a symbol, it should be evaluated as a
variable.

In 9865e6bd8be65229be4eac4f459f62e47fab2be737a5020bb,
`org-id-update-id-locations' was rewritten, and the functionality to
allow the variable `org-id-extra-files' to be a symbol that references
another variable was removed.  This change restores that
functionality.
2020-07-05 23:47:51 +02:00
Marco Wahl cc570144f8 agenda: Call finalize-hook later
* lisp/org-agenda.el (org-agenda-finalize): Call the hooks after the
save-excursion.

This opens the way for hooks to position the cursor after agenda
generation.
2020-07-05 23:09:38 +02:00
Marco Wahl 97188a0cff Merge branch 'maint' 2020-07-05 21:27:19 +02:00
Marco Wahl 5d686811ac manual: Fix typo
* doc/org-manual.org (Clocking Work Time):

TINYCHANGE

Patch by Arun Isaac. See https://orgmode.org/list/20200705112846.16510-1-arunisaac@systemreboot.net/.
2020-07-05 21:22:31 +02:00
Marco Wahl 4dc8b57786 Merge remote-tracking branch 'origin/maint' into maint 2020-07-04 12:54:39 +02:00
Marco Wahl 3327fbb6d4 Merge branch 'maint' 2020-07-04 12:51:53 +02:00
Marco Wahl 5427a74071 habit: Fix of the fix of color for very first done of a habit
* lisp/org-habit.el (org-habit-build-graph): Check if there is a done
date at all.

Reported by Colin Baxter, see https://orgmode.org/list/877dvjve9v.fsf@yandex.com/.

See f471768a5 for the related fix.
2020-07-04 12:44:13 +02:00
Nicolas Goaziou a3f01e183f Tweak drawer visibility after isearch
* lisp/org-macs.el (org-flag-region): Control visibility state after
an isearch.
* lisp/org.el (org-mode): Remove an unused variable.
2020-07-04 09:56:20 +02:00
Nicolas Goaziou b6e7d3dcb6 news: Remove reference to `org-cycle-hide-property-drawers' 2020-07-03 22:07:12 +02:00
Nicolas Goaziou e3745fac1e Remove `org-hide-drawer' text property leftovers
* lisp/org-macs.el (org-save-outline-visibility):
(org-invisible-p):
* lisp/org.el (org-show-set-visibility):
(org--forward-paragraph-once):
(org--backward-paragraph-once): Remove reference to `org-hide-drawer',
no longer used to hide drawers.
2020-07-03 21:50:46 +02:00
Kyle Meyer 86fada6b5d Merge branch 'maint' 2020-07-03 02:31:57 -04:00
Nicholas Vollmer 99b8f36ab8 capture: org-capture pass KEYS with GOTO arg
* lisp/org-capture.el (org-capture): Pass `keys' arg to
`org-capture-goto-target'.

Allows programmatically visiting a specific template.
2020-07-03 02:31:31 -04:00
Nicolas Goaziou 0c0d00b931 lint: Silence byte-compiler 2020-07-02 19:36:34 +02:00
Nicolas Goaziou b0bbe512b4 src: Do not undo edit buffers back to empty state
* lisp/org-src.el (org-src--edit-element): Clear undo information once
the initial contents have been inserted.
* testing/lisp/test-org-src.el (test-org-src/undo): New test.
2020-07-02 19:30:14 +02:00
mfrasca 73e367fca4 table: Allow collapsing header into single line
* lisp/org-table.el (org-table-collapse-header): New function.

* lisp/org-plot.el (org-plot/gnuplot): Use org-table-collapse-header
and trust there will be no more leading `hline' symbols in lisp table.

* testing/lisp/test-org-table.el (test-org-table/to-lisp):
Adding tests to already existing to-lisp function.
(test-org-table/collapse-header): Adding tests to new
collapse-header function.

* testing/lisp/test-ox.el (test-org-export/has-header-p): Testing
exporting table with multi-line header.
2020-06-28 23:02:26 +02:00
mfrasca 0c1740c919 org-plot: reducing complexity of test
* lisp/org-plot.el (org-plot/gnuplot): readability of test, looking
for some non satisfying elements.
2020-06-28 08:45:11 +02:00
Nicolas Goaziou 07ae5456b1 lint: Checking local files in links also include attachments
* lisp/org-lint.el (org-lint-link-to-local-file): Also check
attachment.
2020-06-28 08:44:11 +02:00
Nicolas Goaziou 5d427aefb4 ox-md: Fix docstring.
* lisp/ox-md.el (org-md--identity): Add missing full stop.
2020-06-28 08:44:11 +02:00
Kyle Meyer 15029c8abb Merge branch 'maint' 2020-06-28 02:29:12 -04:00
Kyle Meyer 3ed035ce3b org.el: Clarify argument in org-todo's call to org-map-entries
* lisp/org.el (org-todo): Use nil instead of
org-loop-over-headlines-in-active-region as the MATCH argument.

org-loop-over-headlines-in-active-region isn't related to the MATCH
argument; it's related to SCOPE and decides the value of the let-bound
cl variable that's passed as SCOPE.  Note, though, that
org-loop-over-headlines-in-active-region is let-bound to nil around
the org-map-entries call, so this didn't cause any issues.
2020-06-28 02:27:49 -04:00
Kyle Meyer 8a2eb7d1bc org.el: Fix org-todo argument handling when looping over region
* lisp/org.el (org-todo): Replace backquote construct, which did not
properly quote argument, with closure.

Using "',arg" instead of ",arg" would also work.

Reported-by: Mario Frasca <mario@anche.no>
https://orgmode.org/list/ea64d98c-d7bf-eea0-40d4-00a1515bdb98@anche.no
2020-06-28 02:13:58 -04:00