Commit Graph

15232 Commits

Author SHA1 Message Date
Nicolas Goaziou 12f93c112b Use `org-flag-subtree' instead of `outline-hide-subtree'
* lisp/org-agenda.el (org-agenda-show-1):
* lisp/org-archive.el (org-archive-to-archive-sibling):
* lisp/org-crypt.el (org-encrypt-entry):
* lisp/org-feed.el (org-feed-update):
* lisp/org.el (org-set-visibility-according-to-property):
(org-move-subtree-down):
(org-paste-subtree):
(org-yank-generic):
* testing/lisp/test-org-inlinetask.el (test-org-inlinetask/folding-directly-consecutive-tasks/1): Use `org-flag-subtree' instead of `outline-hide-subtree'.

`outline-hide-subtree' leaves overlays on top of white spaces,
particularly at the end of the buffer. `org-flag-subtree' does not.
2019-05-11 09:48:53 +02:00
Nicolas Goaziou d79e80fc4a Merge branch 'maint' 2019-05-09 22:01:13 +02:00
Ingo Lohmar d1ce59571f Fix fast tag selection affecting wrong line
* lisp/org.el (org-fast-tag-selection): Wrap `save-window-excursion'
with `save-excursion'.

In the case when the tags are changed remotely from the agenda, and
the affected buffer is already visible in another window, the tag
change was applied to the currently visible line in the target buffer,
not the headline in the agenda.
2019-05-09 22:00:00 +02:00
Nicolas Goaziou f8d8da6491 Merge branch 'maint' 2019-05-07 09:36:41 +02:00
Nicolas Goaziou e91bf47e4d Fix docstring
* lisp/org.el (org-timestamp-change): Fix docstring.

Reported-by: Tim Landscheidt <tim@tim-landscheidt.de>
<http://lists.gnu.org/r/emacs-orgmode/2019-05/msg00047.html>
2019-05-07 07:32:20 +02:00
Nicolas Goaziou 9bbae3ce8f Merge branch 'maint' 2019-04-29 20:49:09 +02:00
Nicolas Goaziou 727c3f442b org-macro: Exit early when looking for keywords
* lisp/org-macro.el (org-macro--find-keyword-value): Change signature.
* testing/lisp/test-org-macro.el (test-org-macro/keyword): Remove
  a test.
2019-04-29 20:48:00 +02:00
Nicolas Goaziou 14132a356a Collect buffer-specific built-in macros in setup files
* lisp/org-macro.el (org-macro--set-template): New function.
(org-macro--collect-macros): Also collect "author", "email", "title"
and "date" macros.
(org-macro-initialize-templates): Do not collect previous macros here,
when it is too late.
(org-macro--find-date): New function.
* testing/lisp/test-org-macro.el (test-org/macro-replace-all): Remove
  test, since we cannot guarantee anymore that user-defined macros can
  take precedence over built-in ones.

Reported-by: emsenn <emsenn@emsenn.net>
<http://lists.gnu.org/r/emacs-orgmode/2019-04/msg00234.html>
2019-04-29 20:35:23 +02:00
Nicolas Goaziou 7cfc9ce95f Merge branch 'maint' 2019-04-27 18:54:51 +02:00
Kévin Le Gouguec 42abf5c695 Fix strike-through fontification on heading
* lisp/org.el (org-do-emphasis-faces): Fix face priority.
2019-04-27 18:52:57 +02:00
Eric Danan 72124726aa org-attach: Make dispatcher commands customizable
* lisp/org-attach.el (org-attach-commands): New custom variable.
(org-attach): Use the above variable.
2019-04-27 18:48:56 +02:00
Joaquín Aguirrezabalaga 4939b41750 ob-core: Fix :dir when :mkdirp is not defined
* lisp/ob-core.el (org-babel-execute-src-block): Fix behaviour of
  ":dir path" when ":mkdirp" is not defined.
* testing/lisp/test-ob.el (test-ob-core/dir-mkdirp): Add a test case.

TINYCHANGE
2019-04-25 10:36:40 +02:00
Nicolas Goaziou 0f9b7114d1 org-table: Fix `org-table-map-tables'
* lisp/org-table.el (org-table-map-tables): Apply function at the
  beginning of the table, not at the first affiliated keyword, if any.

Reported-by: Kaushal Modi <kaushal.modi@gmail.com>
<http://lists.gnu.org/r/emacs-orgmode/2019-04/msg00167.html>
2019-04-23 10:35:31 +02:00
Emmanuel Charpentier 5b7b0fa8fb ox-latex: Support a :scale parameter
* lisp/ox-latex.el (org-latex-image-default-scale): Nev variable.
(org-latex--inline-image): Handle new :scale parameter.
* doc/org-manual.org (Images in LaTeX export): document the new :scale

Introduce a :scale #+ATTR_LATEX parameter, as well as a "" default
value for it.  When present, it overrides :width and :height
parameters (as it does for ODT export and in ox-pandoc exporters).

Implementation: uses \scalebox for tikz/pgf images, "scale=" parameter
of \includegraphics in other cases.
2019-04-22 14:01:59 +02:00
Kyle Meyer b0add090cd Update stale link-related library names
* contrib/lisp/org-bibtex-extras.el: Update for rename of org-bibtex
to ol-bibtex.
* lisp/ox-icalendar.el: Update for rename of org-bbdb to ol-bbdb.

Reported-by: Jonas Bernoulli <jonas@bernoul.li>
<https://lists.gnu.org/archive/html/emacs-orgmode/2019-04/msg00143.html>
2019-04-20 15:02:54 -04:00
Nicolas Goaziou 65399aea48 ob-sql: Silence byte-compiler 2019-04-16 21:53:15 +02:00
Stefano Rodighiero f9a898d881 ob-sql: Option to reference connections in `sql-connection-alist'
* lisp/ob-sql.el (org-babel-find-db-connection-param): New function.

Provide a new param called :dbconnection, that can be used to
reference connections defined in `sql-connection-alist', a custom
variable defined in sql.el.

TINYCHANGE
2019-04-15 18:11:02 +02:00
Kyle Meyer 4f05529ac5 Merge branch 'maint' 2019-04-14 22:11:27 -04:00
Paul Eggert 9bf1bdaf25 Backport commit 7ddd08bd3 from Emacs
* lisp/org-table.el (org-table-range-regexp):
Omit or rewrite useless repetitions that risk being very slow in
the backtracking regexp engine in Emacs.

Omit/rewrite useless regexp repetitions
7ddd08bd3ebc48998062a7d29274cf080256a48f
Paul Eggert
Fri Apr 12 19:43:41 2019 -0700
2019-04-14 22:08:07 -04:00
Nicolas Goaziou ab311b85ae Merge branch 'maint' 2019-04-13 09:43:32 +02:00
Nicolas Goaziou 222408d70a org-table: Prevent expanding columns upon applying formulas
* lisp/org-table.el (org-table-recalculate): Prevent expanding columns
  upon applying formulas.
* testing/lisp/test-org-table.el (test-org-table/shrunk-columns): Add
  test.

Reported-by: Nick Dokos <ndokos@gmail.com>
<http://lists.gnu.org/r/emacs-orgmode/2019-04/msg00079.html>
2019-04-13 09:40:27 +02:00
Nicolas Goaziou 96b507bea8 org-table: Fix harmless code typo
* lisp/org-table.el (org-table-recalculate): Fix harmless code typo.
2019-04-13 09:30:19 +02:00
Nicolas Goaziou 09a1a24b73 ol: Fix `org-previous-link' skipping links
* lisp/ol.el (org-next-link): Do not skip links when searching
  backwards.

Reported-by: stardiviner <numbchild@gmail.com>
<http://lists.gnu.org/r/emacs-orgmode/2019-04/msg00022.html>
2019-04-10 15:26:46 +02:00
Nicolas Goaziou 21fa859c4d Merge branch 'maint' 2019-04-09 09:24:46 +02:00
Nicolas Goaziou 6efe53cf0b org-capture: Do not break planning when capturing items
* lisp/org-capture.el (org-capture-place-item): When there is no list
  to augment, insert new list after planning info and properties
  drawers.
* testing/lisp/test-org-capture.el (test-org-capture/item): Add tests.

Reported-by: Allen Li <darkfeline@felesatra.moe>
<http://lists.gnu.org/r/emacs-orgmode/2019-04/msg00060.html>
2019-04-09 09:23:00 +02:00
Nicolas Goaziou c0218ea746 org-src: New `org-src-get-lang-mode' function
* lisp/org-src.el (org-src-get-lang-mode): New function.
(org-src--get-lang-mode): Rename to `org-src-get-lang-mode'.
(org-src-font-lock-fontify-block):
(org-edit-latex-environment):
(org-edit-export-block):
(org-edit-src-code):
(org-edit-inline-src-code): Use new function.
2019-04-07 09:16:36 +02:00
Nicolas Goaziou 3375f039dd ol: Fix `org-next-link' in an item tag
* lisp/ol.el (org-next-link): Fix `org-next-link' in an item tag.
* testing/lisp/test-ol.el (test-ol/next-link): Add test.
2019-04-04 15:52:41 +02:00
Kyle Meyer 92a59795f1 Merge branch 'maint' 2019-04-02 19:07:21 -04:00
Paul Eggert b0324a7405 Backport commit f9ff60e0d from Emacs
* lisp/org-eshell.el (org-eshell-open):
* lisp/org.el (org-deadline-time-hour-regexp)
(org-scheduled-time-hour-regexp):
Avoid attempts to chain ranges, as this can be confusing.
For example, instead of [0-9-_.], use [0-9_.-].

Improve regexp advice again, and unchain ranges
f9ff60e0d7288e30cdbd1e43225059f1374441f1
Paul Eggert
Tue Apr 2 15:01:34 2019 -0700
2019-04-02 19:04:56 -04:00
Nicolas Goaziou da517aaeb8 Merge branch 'maint' 2019-04-02 22:12:10 +02:00
Nicolas Goaziou b913b7404b org-capture: Fix capture on empty entries
* lisp/org-capture.el (org-capture-fill-template): Prevent raising an
  error when template is an empty entry.
* testing/lisp/test-org-capture.el (test-org-caputre/entry): Add test.

Reported-by: Roland Everaert <reveatwork@gmail.com>
<http://lists.gnu.org/r/emacs-orgmode/2019-04/msg00019.html>
2019-04-02 22:10:50 +02:00
Bastien 01182eb775 org.el: Bump version number 2019-04-02 08:30:19 +02:00
Kyle Meyer d9afed12f4 Merge branch 'maint' 2019-03-24 20:44:13 -04:00
Paul Eggert 355eb9e08e Backport commit e14c0d748 from Emacs
* lisp/org-datetree.el (org-datetree--find-create):
* lisp/org-pcomplete.el (org-thing-at-point):
Fix regular expression and similar syntax.

More minor regex cleanup
e14c0d748efe35afc653151ff18c4dd93dcc456e
Paul Eggert
Tue Mar 19 18:47:53 2019 -0700
2019-03-24 20:39:52 -04:00
Paul Eggert c856b34bd1 Backport commit bc2a93d5b from Emacs
* lisp/org.el (org-increase-number-at-point)
(org-fill-line-break-nobreak-p):
Fix regular expression typos.

Fix more regular expression typos
bc2a93d5b7c3d749b31927452e31b32bdb1b9108
Paul Eggert
Mon Mar 18 17:02:29 2019 -0700
2019-03-24 20:35:02 -04:00
Nicolas Goaziou 3a2ef56195 Fix last commit
* lisp/org.el (org-dynamic-block-define): Fix match.
2019-03-22 18:36:02 +01:00
Nicolas Goaziou 6c88d8e406 Fix multiple calls to `org-dynamic-block-alist'.
* lisp/org.el (org-dynamic-block-define): Update entry instead of
  piling up entries of the same type.
2019-03-22 18:32:51 +01:00
Nicolas Goaziou a39ee98873 Turn `org-dynamic-block-alist' into a defvar
* lisp/org.el (org-dynamic-block-alist): Make it a defvar.  Update docstring.
2019-03-22 18:32:40 +01:00
Nicolas Goaziou 273910d36c Merge branch 'maint' 2019-03-21 22:16:02 +01:00
Nicolas Goaziou 0ff705fac7 org-colview: Fix out of range error when hscroll is greater than header
* lisp/org-colview.el (org-columns-hscroll-title): Fix out of range
  error when hscroll is greater than header.
2019-03-21 22:15:04 +01:00
Nicolas Goaziou 64f36561ef Merge branch 'maint' 2019-03-21 21:51:36 +01:00
Sebastian Miele 719887958d ob-core: Add edit-prep in org-babel-make-language-alias
Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:
> Could you provide a commit message for your patch?

* lisp/ob-core.el (org-babel-make-language-alias): Add edit-prep to
  the list of defalias'ed functions.
2019-03-21 21:51:12 +01:00
Nicolas Goaziou 3e6153e48f Merge branch 'master' of code.orgmode.org:bzg/org-mode 2019-03-21 21:46:44 +01:00
Feng Shu 967f6c0dd0 org-agenda: Add org-agenda-breadcrumbs-separator
* lisp/org-agenda.el (org-agenda-breadcrumbs-separator): New variable.
(org-agenda-format-item): Use org-agenda-breadcrumbs-separator
* etc/ORG-NEWS (New variable: ~org-agenda-breadcrumbs-separator~): New variable.
2019-03-21 21:46:10 +01:00
Marco Wahl 5bee2fc955 org-agenda: Show the candidate for the kill
* lisp/org-agenda.el (org-agenda-kill): Display the subtree candidate
  for the kill with confirmation question.
2019-03-21 20:54:24 +01:00
Marco Wahl 2e92b9abb9 org-habit: C-u K in agenda toggles display all/today habits
* lisp/org-habit.el (org-habit-toggle-display-in-agenda): New command.
2019-03-18 17:06:28 +01:00
Marco Wahl ee1ec29405 org-agenda: Test if span makes sense
* lisp/org-agenda.el (org-agenda-list): Raise an error if span is
  negative.

Recent behavior was to create an agenda for one day.
2019-03-18 15:06:15 +01:00
Kyle Meyer c2f3f1912e Merge branch 'maint' 2019-03-17 22:56:24 -04:00
Mattias Engdegård 5746958954 Backport commit 8832cc5f9 from Emacs
* lisp/ob-abc.el (org-babel-expand-body:abc, org-babel-execute:abc):
* lisp/ob-forth.el (org-babel-forth-session-execute):
Add backslash in regexp for correctness.
* lisp/org-list.el (org-plain-list-ordered-item-terminator):
Add backslash in doc comment so that it appears as intended.

Fix some ineffective backslashes in string literals
8832cc5f91a420db6bea65f381a3fb3597eb7523
Mattias Engdegård
Sat Mar 16 11:38:58 2019 -0700
2019-03-17 22:52:48 -04:00
Paul Eggert 7c9bfa142f Backport commit 3739d51ef from Emacs
* lisp/org-agenda.el (org-agenda):
* lisp/org-clock.el (org-clock-out, org-clock-display):
* lisp/org.el (org-refile):
Don’t trust arbitrary strings to not contain "%" or "`" in
(message (concat STRING1 STRING2 ...)).

Be safer about "%" in message formats
3739d51ef3b935b30e40ba4534fe362bc685865f
Paul Eggert
Thu Mar 7 09:05:56 2019 -0800
2019-03-17 22:52:48 -04:00