Commit Graph

19879 Commits

Author SHA1 Message Date
Nicolas Goaziou d7599e3f27 Preserve targets order according to rules
* lisp/org.el (org-refile-get-targets): Keep targets grouped according
  to `org-refile-targets' value.
2017-05-22 08:24:56 +02:00
Nicolas Goaziou 36a091fe67 Add test for `org-refile-get-targets'
* testing/lisp/test-org.el (test-org/refile-get-targets): Add test.
2017-05-22 08:21:50 +02:00
Nicolas Goaziou cadbef99f0 Merge branch 'maint' 2017-05-22 08:19:12 +02:00
Nicolas Goaziou 7560a49459 Remove duplicates in refile targets
* lisp/org.el (org-refile-get-targets): Remove duplicates in refile
  targets.
2017-05-22 08:16:42 +02:00
Nicolas Goaziou f335c3517d Add tests for org-refile-get-targets
* testing/lisp/test-org.el (test-org/refile-get-targets): New test.

Based on a patch from Sebastian Reuße <seb@wirrsal.net>.
2017-05-22 02:23:40 +02:00
Kyle Meyer 23ac37da7c Merge branch 'maint' 2017-05-21 14:54:59 -04:00
Kyle Meyer 0de7ad0430 org-store-link: Don't roll C-u behavior into C-u C-u behavior
* lisp/org.el (org-store-link): When a double C-u prefix argument is
given, do not reverse the meaning of the org-context-in-file-links
option.
* testing/lisp/test-org.el (test-org/store-link): Add tests.

This allows the user to fall back to the core link storing functions
without also reversing their org-context-in-file-links preference,
because wanting to do the former does not mean a user also wants to do
the latter.

Reported-by: York Zhao <gtdplatform@gmail.com>
<https://lists.gnu.org/archive/html/emacs-orgmode/2017-05/msg00254.html>
2017-05-21 14:52:30 -04:00
Nicolas Goaziou 8b79f8c91b Merge branch 'maint' 2017-05-21 11:09:02 +02:00
Nicolas Goaziou 39b3f45a7d org-colview: Fix {X%} and {X/} on recursive summaries
* lisp/org-colview.el (org-columns--summary-checkbox-count):
(org-columns--summary-checkbox-percent): Handle own output for higher
level summaries.
* testing/lisp/test-org-colview.el (test-org-colview/columns-summary):
  Add tests.
2017-05-21 11:08:11 +02:00
Kyle Meyer cca6e0dbc3 Merge branch 'maint' 2017-05-20 19:00:45 -04:00
Kyle Meyer ddf0063ce7 org-git-link.el: Silence byte-compiler
* contrib/lisp/org-git-link.el (org-git-open): Replace obsolete
string-to-int with string-to-number.  Don't use goto-line
non-interactively.
2017-05-20 19:00:25 -04:00
Kyle Meyer b9c5720618 org-git-link.el: Avoid cl.el aliases
* contrib/lisp/org-git-link.el (org-gitbare-open):
(org-git-open):
(org-git-find-gitdir):
(org-git-create-git-link): Prefer nth function to cl.el's first,
second, third.

org-git-link.el does not explicitly load cl.el, and variants without
the "cl-" prefix have been out of favor since Emacs 24.3.
2017-05-20 19:00:25 -04:00
Nicolas Goaziou fbc5375118 Merge branch 'maint' 2017-05-21 00:07:56 +02:00
Nicolas Goaziou 3e3e4e621b org-colview: Fix estimate's summary
* lisp/org-colview.el (org-columns--summary-estimate): Per last
  commit, do not make use of printf, since values are not numbers.
2017-05-21 00:06:31 +02:00
Nicolas Goaziou d71e708fe3 Merge branch 'maint' 2017-05-20 22:13:12 +02:00
Nicolas Goaziou ec5df01bd8 org-colview: Properly apply operator format strings on leaf nodes
* lisp/org-colview.el (org-columns--displayed-value): When value is
a number and a format string is specified, apply it.
* testing/lisp/test-org-colview.el (test-org-colview/columns-summary):
  Add tests.

Reported-by: Hendrik Tews <hendrik@askra.de>
<http://permalink.gmane.org/gmane.emacs.orgmode/113547>
2017-05-20 22:11:45 +02:00
Nicolas Goaziou 68429a99cc Merge branch 'maint' 2017-05-20 09:10:13 +02:00
Nicolas Goaziou 85a26f0cfe Fix "Stack overflow in regexp matcher" in `org-refresh-stats-properties'
* lisp/org.el (org-refresh-stats-properties): Simplify regexp.  Small
  refactoring.

Reported-by: Kevin Zettler <kevzettler@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/113555>
2017-05-20 09:09:03 +02:00
Nicolas Goaziou c7e8034360 Merge branch 'maint' 2017-05-19 16:30:07 +02:00
Nicolas Goaziou c848ade014 org-element: Fix suprious "nil" in dynamic-block interpreter
* lisp/org-element.el (org-element-dynamic-block-interpreter): Ignore
  empty arguments instead of displaying "nil".

Reported-by: John Kitchin <jkitchin@andrew.cmu.edu>
<http://permalink.gmane.org/gmane.emacs.orgmode/113551>
2017-05-19 16:29:12 +02:00
Yuri D. Lensky 9e4a1704ab org-capture.el: Fix handling of variable capture location
* lisp/org-capture.el (org-capture-expand-file): Fix handling of
  variable capture location.
2017-05-19 16:07:27 +02:00
Marco Wahl ab79f112b4 org-agenda: Friendlier agenda tag filter user interface
* lisp/org-agenda.el (org-agenda-filter-by-tag): Added little texts
  for the tag-char item and the tag-chooser item.
2017-05-19 09:17:05 +02:00
Nicolas Goaziou 71f7506dc5 Merge branch 'maint' 2017-05-19 09:09:52 +02:00
Nicolas Goaziou f70eb7d2e8 org-clock: Fix missing properties in Clock table
* lisp/org-clock.el (org-clocktable-write-default): Do not ignore
  properties specified by :properties parameter.

* testing/lisp/test-org-clock.el (test-org-clock/clocktable/properties):
  New test.

The regression was introduced in b897ab722.

Reported-by: Dale <dale@codefu.org>
<http://permalink.gmane.org/gmane.emacs.orgmode/112219>
2017-05-19 09:09:32 +02:00
Kyle Meyer bda9a49056 Merge branch 'maint' 2017-05-18 14:50:42 -04:00
Kyle Meyer 9d9f5179e7 org-sort: Read compare-func in interactive calls
* lisp/org-macs.el (org-read-function): New function.
* lisp/org-table.el (org-table-sort-lines): Make WITH-CASE an optional
argument to match org-sort-entries and org-sort-list.
* lisp/org.el (org-sort-entries):
* lisp/org-table.el (org-table-sort-lines):
* lisp/org-list.el (org-sort-list): Read COMPARE-FUNC when called
interactively rather than being restricted to the default behavior of
sort-subr's PREDICATE parameter.  Only prompt for for GETKEY-FUNC and
COMPARE-FUNC during an interactive call, like org-table-sort-lines
already did for GETKEY-FUNC, but use an argument rather than relying
on the brittle called-interactively-p.

Suggested-by: Zhitao Gong <zhitaao.gong@gmail.com>
<https://lists.gnu.org/archive/html/emacs-orgmode/2017-05/msg00040.html>
2017-05-18 14:46:33 -04:00
Sebastian Reuße 2906e50177 org-refile: Fix inconsistency when listing refile targets
* org.el (org-refile-get-targets): Setting org-refile-use-outline-path
to `file' or `buffer-name' causes an additional target for the file’s
root node to be inserted. This functionality was absent when using
`full-file-path'. We now add this since it is convenient and makes the
behavior more consistent.
2017-05-17 14:37:54 +02:00
Nicolas Goaziou 865ac0952b Merge branch 'maint' 2017-05-15 18:29:23 +02:00
Nicolas Berthier 2c9f6fcef9 Fontify inline source blocks when exporting to HTML
* lisp/ox-html.el (org-html-inline-src-block): Fontify inline source
blocks.
2017-05-15 18:28:34 +02:00
Nicolas Goaziou 82066d1a0c Merge branch 'maint' 2017-05-15 14:05:19 +02:00
Nicolas Goaziou 3c7ef9f8e8 org.texi: Silence Texinfo
* doc/org.texi (HTML Specific export settings): Silence Texinfo.
2017-05-15 14:04:38 +02:00
Nicolas Goaziou da68c2cc35 Merge branch 'maint' 2017-05-15 08:41:31 +02:00
Nicolas Goaziou 44a81a11a6 org.texi: Fix typo
* doc/org.texi (Tables in @LaTeX{} export): Fix typo.

Reported-by: Robert Klein <roklein@roklein.de>
<http://permalink.gmane.org/gmane.emacs.orgmode/113490>
2017-05-15 08:41:12 +02:00
Kyle Meyer 134d35e7cb Merge branch 'maint' 2017-05-15 00:04:16 -04:00
Philipp Stephani 5eeccc7230 Backport commit 3c4c8ca06 from Emacs
* lisp/ob-ref.el (org-babel-ref-resolve): Fix unescaped character
literal.

Fix all unescaped character literals
3c4c8ca06e3306ccbcd07e354eb51abe53b52d22
Philipp Stephani
Sun May 7 13:22:34 2017 +0200
2017-05-15 00:02:53 -04:00
Nicolas Goaziou dcda03170d Merge branch 'maint' 2017-05-15 00:35:12 +02:00
Nicolas Goaziou 93e5d92383 org-clock: Disambiguate character syntax
* lisp/org-clock.el (org-clock-put-overlay): Escape character in
  character syntax.
2017-05-15 00:34:58 +02:00
Nicolas Goaziou 8fba95ea8a Merge branch 'maint' 2017-05-15 00:20:03 +02:00
Nicolas Goaziou 134500e7c1 org.texi: Fix Texinfo compilation 2017-05-15 00:19:41 +02:00
Nicolas Goaziou 42f3daf6cf Merge branch 'maint' 2017-05-14 23:54:39 +02:00
Lambda Coder 6ce21caac5 Editorial revisions to the manual
* doc/org.texi: Exporting chapter
2017-05-14 23:43:33 +02:00
Nicolas Goaziou dbe2424b07 Adjust `org-at-timestamp-p' behavior
* lisp/org.el (org-at-timestamp-p): Change optional argument
  behaviour.  Remove interactive call.
(org-follow-timestamp-link):
(org-get-repeat):
(org-auto-repeat-maybe):
(org-time-stamp):
(org-timestamp-up-day):
(org-timestamp-down-day):
(org-toggle-timestamp-type):
(org-timestamp-change):
(org-goto-calendar):
(org-date-from-calendar):
(org-shiftup):
(org-shiftdown):
(org-shiftright):
(org-shiftleft):
(org-org-menu):
(org-fill-paragraph-with-timestamp-nobreak-p):
(org-shiftcontrolup):
(org-shiftcontroldown):
* lisp/org-agenda.el (org-agenda-date-later):
(org-agenda-date-prompt):
* lisp/org-clock.el (org-clock-timestamps-change):
* lisp/org-mouse.el (org-mouse-delete-timestamp):
(org-mouse-context-menu):
* lisp/org-table.el (org-table-copy-down): Update callers.

* testing/lisp/test-org.el (test-org/at-timestamp-p): Add tests.
2017-05-14 10:54:25 +02:00
Nicolas Goaziou cbbe00e30e org-element: Do not parse timestamps within planning line
* lisp/org-element.el (org-element-context): Do not parse timestamps
  within planning line.
* testing/lisp/test-org-element.el (test-org-element/context): Remove test.

Strictly speaking, timestamps within planning lines are parameters
values that use timestamp syntax, not real timestamps belonging to the
document contents.
2017-05-14 10:25:13 +02:00
Nicolas Goaziou de2a8b31e4 Fix typo in code comment 2017-05-14 00:21:18 +02:00
Nicolas Goaziou b72d29d685 Merge branch 'maint' 2017-05-13 09:21:31 +02:00
Nicolas Goaziou c0369a7984 org-element: Fix $...$ fragments followed by an apostrophe
* lisp/org-element.el (org-element-latex-fragment-parser):
* lisp/org.el (org-latex-regexps): Allow an apostrophe right after
  a fragment.

* testing/lisp/test-org-element.el (test-org-element/latex-fragment-parser):
  Add test.

In Text mode, and, as a consequence, in Org mode, "'" is not treated
as punctuation, but as word constituent.  The apostrophe isn't caught
by "\s." regexp.

Reported-by: Joe Corneli <holtzermann17@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/113464>
2017-05-13 09:18:07 +02:00
Nicolas Goaziou 79ac71d175 Tiny fix
* lisp/org.el (org-N-empty-lines-before-current): Insert empty lines
  before point, not after.
* testing/lisp/test-org.el (test-org/insert-heading): Add test.
2017-05-12 17:45:46 +02:00
Nicolas Goaziou 4f578a3f7f org-agenda: Small refactoring
* lisp/org-agenda.el (org-agenda-bulk-action): Small refactoring. Two
  `eval' less in the code base.
2017-05-12 01:19:51 +02:00
Nicolas Goaziou a842ae1d38 Merge branch 'maint' 2017-05-12 00:40:22 +02:00
Nicolas Goaziou 0255538701 org-agenda: Fix logging with bulk-deadlining
* lisp/org-agenda.el (org-agenda-bulk-action): Do not request logging
  writing a note when multiple entries are being re-deadline'd at the
  same time.

Reported-by: Allen Li <darkfeline@felesatra.moe>
<http://permalink.gmane.org/gmane.emacs.orgmode/113426>
2017-05-12 00:39:06 +02:00