Commit Graph

19897 Commits

Author SHA1 Message Date
Nicolas Goaziou 89bd7ad871 org-colview: Silence byte-compiler
* lisp/org-colview.el (org-columns--displayed-value): Silence
  byte-compiler.
2017-05-25 20:54:39 +02:00
Nicolas Goaziou 957850043a Prevent filling before a "n" macro where it could create list items
* lisp/org.el (org-fill-n-macro-as-item-nobreak-p): New function.
(org-setup-filling): Use new function.

* testing/lisp/test-org.el (test-org/fill-element): Add tests.

Reported-by: Kaushal Modi <kaushal.modi@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/113587>
2017-05-25 12:33:16 +02:00
Nicolas Goaziou ad89390219 org-macro: Implement the "n" macro
* lisp/org-macro.el (org-macro--counter-table): New variable.
(org-macro--counter-initialize):
(org-macro--counter-increment): New functions.
(org-macro-initialize-templates): Use new functions.

* doc/org.texi (Macro replacement): Document new macro.

* testing/lisp/test-org-macro.el (test-org-macro/n):
(test-org-macro/property): New tests.
2017-05-25 12:25:13 +02:00
Nicolas Goaziou 6b6476b89c Merge branch 'maint' 2017-05-25 11:10:19 +02:00
Nicolas Goaziou 118ec40c53 ox-publish: Fix symlink publishing
* lisp/ox-publish.el (org-publish-file): Do not expand symlinks so as
  to get proper publishing directory.

Reported-by: Julien Cubizolles <j.cubizolles@free.fr>
<http://permalink.gmane.org/gmane.emacs.orgmode/113611>
2017-05-25 11:08:02 +02:00
Bastien 30ceb5c794 Merge branch 'maint' 2017-05-23 20:46:54 +02:00
Bastien f4803cfad4 org-list.el (org-sort-list): Fix typo in prompt string
* lisp/org-list.el (org-sort-list): Fix typo in prompt string.
2017-05-23 20:46:42 +02:00
Nicolas Goaziou a023b31e48 Merge branch 'maint' 2017-05-23 18:15:42 +02:00
Nicolas Goaziou d6f096546e org-capture: Fix number of blank lines with :unnarrowed option
* lisp/org-capture.el (org-capture-finalize): Remove blank lines
  number fix, which only applies to narrowed capture buffers.
(org-capture-insert-template-here):
(org-capture-place-plain-text):
(org-capture-place-item):
(org-capture-place-entry): Do not hard-code number of blank lines
after entry.

Reported-by: Igor Perepelytsya <igorquail@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/113093>

Reported-by: Jay Dresser <jay@jaydresser.us>
<http://permalink.gmane.org/gmane.emacs.orgmode/113449>
2017-05-23 18:10:06 +02:00
U-IHM-NOTEBOOK\Olli b3497fdeb6 version 5.4 of org-index.el: better focus-commands 2017-05-22 21:10:03 +02:00
Nicolas Goaziou 61eb86e06c Merge branch 'maint' 2017-05-22 15:28:48 +02:00
Nicolas Goaziou 7f0391cfe0 org-colview: Remove error upon summarizing non-numbers with a format string
* lisp/org-colview.el (org-columns--displayed-value): Remove check.
* testing/lisp/test-org-colview.el (test-org-colview/columns-summary):
  Remove a test.

Reported-by: Hendrik Tews <hendrik@askra.de>
<http://permalink.gmane.org/gmane.emacs.orgmode/113600>
2017-05-22 15:27:17 +02:00
Nicolas Goaziou c2f4eec5dc `org-fill-paragraph' handles region
* lisp/org.el (org-fill-element): New function.
(org-fill-paragraph): Use new function.  Also handle region, when
called interactively.

* testing/lisp/test-org.el (test-org/fill-element): Renamed from
  test-org/fill-paragraph.  Update tests.

Reported-by: Oskar Kvist <oskar.kvist@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/113542>
2017-05-22 15:02:34 +02:00
Nicolas Goaziou 78a8078d64 Merge branch 'maint' 2017-05-22 14:18:41 +02:00
Nicolas Goaziou 9fd562f35a org-colview: Update new summarized value only when necessary
* lisp/org-colview.el (org-columns--compute-spec): Make sure current
  and new values do not differ only by leading or trailing blanks
  before replacing the former by the latter.

Reported-by: Hendrik Tews <hendrik@askra.de>
<http://permalink.gmane.org/gmane.emacs.orgmode/113597>
2017-05-22 14:17:01 +02:00
Nicolas Goaziou 2b44a1a74c Remove `org-protect-slash'
* lisp/org.el (org-protect-slash): Remove function.
(org-refile-get-targets): Apply removal.

This internal function is used only once throughout the code base.
2017-05-22 08:31:53 +02:00
Nicolas Goaziou b3088eea3f Update a test
* testing/lisp/test-org.el (test-org/refile-get-targets): Update test.
2017-05-22 08:26:22 +02:00
Nicolas Goaziou f10e19eabf Merge branch 'maint' 2017-05-22 08:25:56 +02:00
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