Commit Graph

23301 Commits

Author SHA1 Message Date
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
Kyle Meyer 3cbbbd784f Merge branch 'maint' 2020-06-27 00:03:29 -04:00
Kyle Meyer 591ea3eafb ox: Prevent dispatcher from starting in scrolled window
* lisp/ox.el (org-export--dispatch-ui): Restore buffer position after
inserting text to avoid auto-scrolling at start.

When filling in the dispatch buffer, point ends up at the end of the
buffer, which can cause the buffer to be re-centered on point when
org-fit-window-to-buffer is called, in particular if scroll-margin is
above zero and there is a vertical split.  Avoid this by putting point
where it was before the buffer was refreshed.

Reported-by: Gustavo Barros <gusbrs.2016@gmail.com>
https://orgmode.org/list/87tv3a56vv.fsf@gmail.com
2020-06-26 23:59:24 -04:00
Marco Wahl fe45a89aa1 Merge branch 'maint' 2020-06-26 13:17:28 +02:00
Marco Wahl f471768a54 habit: Fix color of habit for the very first done
* lisp/org-habit.el (org-habit-build-graph): Check if on the very
first "done" and set the standard color for done.

Recent behavior: Give that very first done the color to mean "done
ahead of schedule".
2020-06-26 13:09:50 +02:00
Nicolas Goaziou b76ed658f1 ox-html: Remove useless translator
* lisp/ox-html.el (html): Remove `footnote-definition' translator
since 1) it does not exist and 2) footnote definitions are translated
as part of of the inner template.
2020-06-23 15:51:06 +02:00
Nicolas Goaziou 83f5c6dcd8 ox-md: Correctly export elements converted as HTML
* lisp/ox-md.el (org-md--identity):
(org-md--convert-to-html): New functions.
(md): Use new functions. Transparently export drawers.

According to <https://www.markdownguide.org/basic-syntax/#html>,
contents of elements converted to HTML must also be converted to HTML.

Reported-by: Dominique Dumont <domi.dumont@free.fr>
<http://lists.gnu.org/r/emacs-orgmode/2020-06/msg00397.html>
2020-06-23 15:49:12 +02:00
Nicolas Goaziou fe7201f52a ox-md: Re-order internal functions 2020-06-23 15:34:48 +02:00
Jb DOYON 2fa1dc34be contrib/ol-man.el: Add markdown support to org-man export
* contrib/lisp/ol-man.el (org-man-export): Format markdown links.
2020-06-22 23:58:32 -04:00
Marco Wahl 945f495b94 org: Enable join of multiple lines
* lisp/org.el (org-delete-indentation): Call delete-indentation via
the call-interactive wrapper to take into account a possibly selected
region.
2020-06-17 12:58:34 +02:00
Nicolas Goaziou e3a7247b68 table: Gracefully align hrule-only tables
* lisp/org-table.el (org-table-align): Try to align the table even
when it only consists of horizontal rules.
* testing/lisp/test-org-table.el (test-org-table/align): Add test.
2020-06-15 21:34:00 +02:00
Kyle Meyer a8cc4f7244 Merge branch 'maint' 2020-06-13 15:18:12 -04:00
Kyle Meyer ba6ca79af5 org.el: Fix #+end_src fontification error
* lisp/org.el (org-fontify-meta-lines-and-blocks-1): Rewrite the "line
begins with *" check so that it does not assume that match data has
remained intact.

The upstream call to org-src-font-lock-fontify-block overwrites the
match data in some cases.  As a result, (match-string 1) signals an
error and #+end_src is not fontified.  Wrapping the call to
org-src-font-lock-fontify-block with save-match-data would fix the
reported issue.  However, the position at the beginning of the line is
already stored in a variable, so use that information instead to check
whether the line starts with "*".

Reported-by: John Ciolfi <ciolfi@mathworks.com>
<r9r1ulpctz.fsf@ah-ciolfi-lah-ciolfi-l.dhcp.mathworks.com>
2020-06-13 15:17:58 -04:00
Nicolas Goaziou c709187173 Do not widen when folding all drawers
* lisp/org.el (org-cycle-hide-drawers): Do not widen drawer.
2020-06-13 17:51:30 +02:00
Leo Vivier 325922c606 org-element: Update docstring
* org-element.el (org-element-keyword-parser): Mention that `keyword'
is normalized by being upcased.
2020-06-13 17:32:07 +02:00
Nicolas Goaziou e2b62b4da8 Rewrite `org-forward-paragraph' and `org-backward-paragraph'
* lisp/org.el (org-forward-paragraph):
(org-backward-paragraph): Rewrite functions.  Add repeat argument.
Mimic more closely regular `forward|backward-paragraph' functions.
(org--forward-paragraph-once):
(org--backward-paragraph-once):
(org--paragraph-at-point): New functions.
* testing/lisp/test-org.el (test-org/forward-paragraph):
(test-org/backward-paragraph): Update tests.  Add some.

Signed-off-by: Nicolas Goaziou <mail@nicolasgoaziou.fr>
2020-06-13 17:22:48 +02:00
Kevin Liu 6882478cac capture: Fix org-capture-place-entry narrow bounds
* lisp/org-capture.el (org-capture-place-entry): Prevent breaking the
following headline inside the capture buffer.  This should match the
behavior from 9.3.
(org-capture-finalize): Reverts cb2774d1a, which solves a similar
problem but only in the finalize stage, so the subtree structure would
still be broken in the middle of editing the capture.
2020-06-13 10:47:21 +02:00