Commit Graph

13504 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
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 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 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
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
Nicolas Goaziou 2a3443f142 Merge branch 'maint' 2017-04-29 11:48:45 +02:00
Nicolas Goaziou 91236a3db3 org-src: Fix indentation when tabs are involved
* lisp/org-src.el (org-src--source-type):
(org-src--tab-width): New variables.
(org-src--edit-element): Set variables above.

(org-src--contents-for-write-back): Re-indent properly non-blank lines
before inserting contents back into the source buffer.
(org-edit-src-code): Delegate block indentation to
`org-src--contents-for-write-back'.

* testing/lisp/test-org-src.el (test-org-src/indented-blocks): New
  test.

Reported-by: Brent Goodrick <bgoodr@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/113207>
2017-04-29 11:45:45 +02:00
Nicolas Goaziou b60edc480d org-duration: Small docstring improvement
* lisp/org-duration.el (org-duration-format): Remove ambiguous
  reference to a "next smallest unit".  Reword REQUIRED? description.
2017-04-29 10:37:39 +02:00
Nicolas Goaziou 75320ff205 org-clock: Small refactoring
* lisp/org-clock.el (org-clock-get-table-data): Use `org-get-heading'.
  Also, avoid calling `org-entry-properties' since getting "TIMESTAMP"
  or "TIMESTAMP_IA" properties can be very slow.
2017-04-29 10:35:04 +02:00
Nicolas Goaziou b4ba9f1770 Merge branch 'maint' 2017-04-29 10:26:59 +02:00
Nicolas Goaziou cb5ca4206f org-clock: Fix failing tests
* lisp/org-clock.el (org-clock-get-table-data): `org-get-heading' only
  accepts up to 2 arguments in Org 9.0.
2017-04-29 10:25:57 +02:00
Nicolas Goaziou 52a327e4e5 Merge branch 'maint' 2017-04-28 00:24:46 +02:00
Nicolas Goaziou 8dfcdedf44 org-colview: Fix agenda columns with diary entries
* lisp/org-colview.el (org-agenda-columns): Do not treat diary entries
  as headlines.

Reported-by: "Éibhear" <eibhear.geo@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/113282>
2017-04-28 00:23:49 +02:00
Nicolas Goaziou 32e1ca2933 Merge branch 'maint' 2017-04-25 23:47:22 +02:00
Allen Li da83e7d583 org-agenda: Store stuck project redo command
* lisp/org-agenda.el (org-agenda-list-stuck-projects): Store the redo
command in a text property so it is found correctly.

`org-agenda-redo' checks the `org-redo-cmd' text property, not
`org-agenda-redo-command'.

TINYCHANGE
2017-04-25 23:46:50 +02:00