Commit Graph

19737 Commits

Author SHA1 Message Date
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
Nicolas Goaziou 41a42abc1b Merge branch 'maint' 2017-05-12 00:15:46 +02:00
Nicolas Goaziou ffa5a93764 org-agenda: Fix consecutive bulk marks on the same task
* lisp/org-agenda.el (org-agenda-bulk-unmark-all): Do not reset
  markers stored in `org-agenda-bulk-marked-entries'.  These markers
  are not specific to bulk actions and need not be modified by
  side-effect.

Reported-by: Adrian Bradd <adrian.bradd@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/112895>
2017-05-12 00:13:09 +02:00
Kyle Meyer 6fee6b6cde Merge branch 'maint' 2017-05-09 14:49:59 -04:00
Kyle Meyer f4bb79a10c Add tests for org-sort-list and org-sort-entries
* testing/lisp/test-org-list.el:
* testing/lisp/test-org.el: New test.
2017-05-09 14:49:22 -04:00
Kyle Meyer 1eab2bb5e2 org-link-edit.el: Sync with upstream
Update to version 1.1.1 (e975aebf8).
2017-05-09 14:49:22 -04:00
Nicolas Goaziou 9a297d6531 org-attach: Silence byte-compiler
* lisp/org-attach.el (org-attach-attach): Tiny refactoring.
2017-05-09 17:56:24 +02:00
Oleh Krehel e23b806bd8 lisp/org-attach.el (org-attach-attach): Add dired-dwim-target-directory
Use case: have two windows open side-by-side. One has an Org-mode
file, the other - a Dired buffer with a file we want to attach.

With this change, and user's `dired-dwim-target' setting, the prompt
for file to attach will start in the Dired buffer's directory.
2017-05-09 17:30:18 +02:00
Kyle Meyer c801ef0328 org-sort: Go back to calling org-sort-* functions interactively
* lisp/org.el (org-sort): Revert change from c1addc825 that replaced
org-call-with-arg with funcall because org-table-sort-lines changes
its behavior based on the return value of called-interactively-p.
2017-05-08 23:57:30 -04:00
Kyle Meyer c1addc8252 org-sort: Call org-sort-* functions non-interactively
* lisp/org.el (org-sort): Use funcall instead of org-call-with-arg,
and make WITH-CASE an optional argument.
* lisp/org-table.el (org-table-sort-lines): Make WITH-CASE an optional
argument.
2017-05-08 11:13:19 -04:00
Nicolas Goaziou f4fca13598 Merge branch 'maint' 2017-05-08 11:39:34 +02:00
Thierry Banel e89ca9c5d2 ob-gnuplot: escape % character in output
lisp/ob-gnuplot.el (org-babel-execute:gnuplot): escape % percent
character in output messages coming from GnuPlot.
2017-05-08 11:38:45 +02:00
Nicolas Goaziou 93b5e5087f Merge branch 'maint' 2017-05-08 11:26:33 +02:00
Nicolas Goaziou f1da21f7d9 ob-core: Fix regression
* lisp/ob-core.el (org-babel-balanced-split): Fix regression
  introduced in 500abcd7fb.

* testing/lisp/test-ob.el (test-ob/balanced-split): Add tests.

Reported-by: Eric S Fraga <e.fraga@ucl.ac.uk>
<http://permalink.gmane.org/gmane.emacs.orgmode/113401>
2017-05-08 11:25:17 +02:00
Nicolas Goaziou 31cf5b2a9a ox-publish: Add missing `file-truename'
* lisp/ox-publish.el (org-publish--expand-file-name): Add missing
  `file-truename'.
2017-05-08 08:48:40 +02:00
Sebastian Reuße c4b2ac861f ORG-NEWS: Update new features 2017-05-06 16:18:36 -04:00
Sebastian Reuße 1188beaa3b org-refile: Optionally prefix refile targets with buffer name
* org.el (org-refile-get-targets): Add case to optionally prefix
refile targets with the buffer name.
(org-refile-use-outline-path): Add new option setting and document.

Having an option to use the buffer name as a prefix is convenient,
since this will work hand in hand with uniquify to only show those
parts of the filesystem path needed to disambiguate buffers of
identically named files, as opposed to prefixing refile targets with
the full filesystem path.
2017-05-06 12:01:20 -04:00
Sebastian Reuße 53bcf91a96 org-refile: Escape slashes only in headline of refile target
* org.el (org-refile-get-targets): Only escape slashes in headline
part of refile target; leave any file-system path component (when
enabled) unescaped.

The reason to escape slashes in refile targets is to make it clear
when a slash was part of a headline vs. part of the outline path.  It
makes sense to treat slashes in the file system part the same way as
outline paths, since this won’t result in any confusion and serves to
make target selection less noisy.
2017-05-06 12:01:09 -04:00
Nicolas Goaziou ac656ad7b9 Merge branch 'maint' 2017-05-06 09:03:14 +02:00
Łukasz Stelmach a4f29410e9 ox-s5: Update to work with refactored HTML backend
* contrib/lisp/ox-s5.el (org-s5-template): Adapt to changes introduced
by c9ca0b6d in the way :html-divs/org-html-divs are passed to ox-html.
2017-05-06 09:02:01 +02:00
Nicolas Goaziou 449f97abbb Merge branch 'maint' 2017-05-05 23:23:29 +02:00
Nicolas Goaziou 250b64b3cb ox-publish: Consistently cache properties
* lisp/ox-publish.el (org-publish-org-to):
(org-publish-collect-index):
(org-publish--store-crossrefs):
(org-publish-resolve-external-link): Use `file-truename' so that
caching keys do not depend on links in the file name.
2017-05-05 23:22:23 +02:00
Nicolas Goaziou c55770006a ox-publish: Fix last commit
* lisp/ox-publish.el (org-publish-get-project-from-filename): Fix last
  commit.
2017-05-05 19:56:58 +02:00
Nicolas Goaziou 6a4d3988b9 Merge branch 'maint' 2017-05-05 19:52:55 +02:00
Nicolas Goaziou d9c0a810f7 ox-publish: Use file true name as reference
* lisp/ox-publish.el (org-publish-file): Use file true name as
  reference.
2017-05-05 17:47:30 +02:00
Nicolas Goaziou 018ce94d88 ox-publish: Small refactoring
* lisp/ox-publish.el (org-publish-file): Use function dedicated to
  files instead of string related ones.  Small refactoring.
(org-publish-cache-get-file-property): Small refactoring.
2017-05-05 17:47:30 +02:00
Nicolas Goaziou 6539c41589 ox-publish: Fix publishing filenames with symbolic links
* lisp/ox-publish.el (org-publish-get-project-from-filename):
(org-publish-attachment):
(org-publish-projects):
(org-publish-org-sitemap): Use file comparison functions instead of
string ones so as to properly handle symbolic links in filenames.
2017-05-05 17:47:30 +02:00
Carsten Dominik 44de3efe75 * lisp/org-archive.el (org-archive-subtree): Honor
`org-archive-reversed-order' also on top level.
2017-05-05 11:59:10 +02:00
Kyle Meyer c28ec3a170 Merge branch 'maint' 2017-05-04 00:03:00 -04:00
Kyle Meyer fef346798f ox-extra: Merge sections from ignored headlines
* contrib/lisp/ox-extra.el (org-extra--merge-sections): New function.
(org-export-ignore-headlines): Merge multiple sections that result
from removing ignored headlines.

Prevent org-export-ignore-headlines from violating the one headline to
one section mapping that is relied on by at least one export backend,
ox-texinfo.  (ox-texinfo uses each section to generate the menu.)
2017-05-03 23:35:40 -04:00
Kyle Meyer fa1c6e92ac ox-extra: Use cl-lib
* contrib/lisp/ox-extra.el (org-latex-header-blocks-filter): Use "cl-"
prefix.
2017-05-03 23:35:40 -04:00
Marc Ihm cbe544edf3 ox-confluence: Export checkboxes; fix timestamps in headlines
* contrib/lisp/ox-confluence.el (org-confluence-item): Export
  checkboxes.
(org-confluence-timestamp): Fix timestamps in headlines.  Silence
byte-compiler.
2017-05-02 08:48:16 +02:00
Nicolas Goaziou cecdb2bd67 Merge branch 'maint' 2017-05-02 08:24:24 +02:00
Nicolas Goaziou 500abcd7fb ob-core: Fix `org-babel-balanced-split'
* lisp/ob-core.el (org-babel-balanced-split): Rewrite function.

Reported-by: Moritz Heidkamp <moritz@twoticketsplease.de>
<http://permalink.gmane.org/gmane.emacs.orgmode/113204>
2017-05-01 23:35:39 +02:00
Nicolas Goaziou 823c821bc8 ob-core: Small refactoring
* lisp/ob-core.el (org-babel-read): Small refactoring.
(org-babel--string-to-number): Use `string-match-p' instead of
`string-match'.
* lisp/org-compat.el (org-babel-number-p): Move obsolete alias.
2017-05-01 15:33:09 +02:00
Nicolas Goaziou 5bc540eae1 Merge branch 'maint' 2017-04-30 22:26:52 +02:00
Nicolas Goaziou 3502e6fa7c Fix indentation bug
* lisp/org.el (org--get-expected-indentation): Correctly indent line
  when last element in an item is not a greater element.
* testing/lisp/test-org.el (test-org/indent-line): Add test.
2017-04-30 22:26:10 +02:00
Kyle Meyer 27c3c75358 Merge branch 'maint' 2017-04-30 15:13:38 -04:00
Kyle Meyer 2a37760dfd Fix some documentation typos
* lisp/org-agenda.el (org-agenda-show-inherited-tags):
* lisp/org-element.el (Accessors and Setters):
(org-element-parse-buffer): Fix documentation typos.
2017-04-30 15:11:45 -04:00
Nicolas Goaziou cc80e7a8ce Merge branch 'maint' 2017-04-29 16:27:30 +02:00
Nathaniel Nicandro e527e49c38 ob-python: Honor the :python header argument in python src blocks
* lisp/ob-python.el (org-babel-execute:python):
`org-babel-python-command` should be set before calling
`org-babel-python-initiate-session`.

TINYCHANGE
2017-04-29 16:26:33 +02:00
Nicolas Goaziou 6834142d87 Merge branch 'maint' 2017-04-29 14:34:09 +02:00
Nicolas Goaziou 1332bbd616 ox: Do not trim leading and trailing blank lines from code
* lisp/ox.el (org-export-get-loc):
(org-export-unravel-code):
(org-export-format-code):
(org-export-format-code-default): Do not trim leading and trailing
blank lines from code during export.

* testing/lisp/test-ox.el (test-org-export/unravel-code): Update tests.
(test-org-export/format-code-default): Add tests.

Reported-by: Li DebugFan <debugfanli@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/113205>
2017-04-29 14:32:29 +02:00