org-mode.git
17 min agotest-org: Add test maint
Nicolas Goaziou [Mon, 16 Jan 2017 21:26:47 +0000 (22:26 +0100)]
test-org: Add test

* testing/lisp/test-org.el (test-org/clone-with-time-shift): Add test.

20 min agoorg-clone-subtree-with-time-shift: Fix timestamp search
Kyle Meyer [Mon, 16 Jan 2017 17:56:01 +0000 (12:56 -0500)]
org-clone-subtree-with-time-shift: Fix timestamp search

* lisp/org.el (org-clone-subtree-with-time-shift): Move to the
  beginning of the heading before the timestamp search so that the
  user will be prompted for a time shift even if point is after the
  timestamp.

This also prevents an "Invalid search bound" error if point is on the
blank line following a body-less heading:

   * single line <2017-02-28 Wed>
    <point here>

Reported-by: Karl Voit <devnull@Karl-Voit.at>
<http://permalink.gmane.org/gmane.emacs.orgmode/111456>

24 hours agoox-publish: Fix docstring typo
Kyle Meyer [Sun, 15 Jan 2017 21:40:54 +0000 (16:40 -0500)]
ox-publish: Fix docstring typo

* lisp/ox-publish.el (org-publish-property): Fix docstring typo.

47 hours agoFix `org-drag-element-backward' with point just below a headline
Nicolas Goaziou [Sat, 14 Jan 2017 22:23:26 +0000 (23:23 +0100)]
Fix `org-drag-element-backward' with point just below a headline

* lisp/org.el (org-drag-element-backward): When point is on empty
  lines below a headline, call `org-move-subtree-up'.
* testing/lisp/test-org.el (test-org/drag-element-backward): Add test.

2 days agoorg-mobile: Silence byte-compiler
Nicolas Goaziou [Sat, 14 Jan 2017 15:16:08 +0000 (16:16 +0100)]
org-mobile: Silence byte-compiler

2 days agoorg-mobile: Fix `org-mobile-push' with stick agendas
Nicolas Goaziou [Sat, 14 Jan 2017 15:12:43 +0000 (16:12 +0100)]
org-mobile: Fix `org-mobile-push' with stick agendas

* lisp/org-mobile.el (org-mobile-push): Do not move back to non-sticky
  agendas once called.

Reported-by: Ian Dunn <dunni@gnu.org>
<http://permalink.gmane.org/gmane.emacs.orgmode/111334>

2 days agoorg.texi: Document COMMENT and
Nicolas Goaziou [Fri, 13 Jan 2017 23:22:43 +0000 (00:22 +0100)]
org.texi: Document COMMENT and

* doc/org.texi (Internal archiving): Fix typo.
(Agenda views): Document that COMMENT trees are skipped by default
when building agenda views.
(Comment lines): Add a concept index entry.

3 days agoorg.texi: Small improvements
Nicolas Goaziou [Fri, 13 Jan 2017 09:36:21 +0000 (10:36 +0100)]
org.texi: Small improvements

* doc/org.texi (Agenda column view): Add empty line between items.
  Replace some parenthesis.

4 days agoox-odt: Fix verse environment
Nicolas Goaziou [Thu, 12 Jan 2017 14:27:39 +0000 (15:27 +0100)]
ox-odt: Fix verse environment

* lisp/ox-odt.el (org-odt--encode-tabs-and-spaces): Small refactoring.
(org-odt-verse-block): Only replace leading blanks.

4 days agoox-html: Fix verse environment
Nicolas Goaziou [Thu, 12 Jan 2017 13:47:32 +0000 (14:47 +0100)]
ox-html: Fix verse environment

* lisp/ox-html.el (org-html-verse-block): Do not insert duplicates
  "br" close-tags.  Refactor code.

4 days agoorg-element: Fix `org-element-normalize-contents'
Nicolas Goaziou [Thu, 12 Jan 2017 13:33:17 +0000 (14:33 +0100)]
org-element: Fix `org-element-normalize-contents'

* lisp/org-element.el (org-element-normalize-contents): Fix return
  value when any line after the first has no indentation.
* testing/lisp/test-org-element.el (test-org-element/normalize-contents):
  Add test.

4 days agoox-html: Fix docstrings style
Nicolas Goaziou [Thu, 12 Jan 2017 08:58:50 +0000 (09:58 +0100)]
ox-html: Fix docstrings style

* lisp/ox-html.el (org-html-close-tag):
(org-html-doctype):
(org-html--make-attribute-string): Fix docstring style.

4 days agoox-html: Remove spurious white space when closing a tag
Nicolas Goaziou [Thu, 12 Jan 2017 08:54:22 +0000 (09:54 +0100)]
ox-html: Remove spurious white space when closing a tag

* lisp/ox-html.el (org-html-close-tag): Remove spurious white space
  when no attribute is given.  Add a docstring.

5 days agoox: Fix "user-error: Unable to resolve link nil" message
Nicolas Goaziou [Wed, 11 Jan 2017 20:00:37 +0000 (21:00 +0100)]
ox: Fix "user-error: Unable to resolve link nil" message

* lisp/ox.el (org-export-resolve-fuzzy-link): Fix typo preventing to
report the proper path of the broken link.

Reported-by: Eric S Fraga <e.fraga@ucl.ac.uk>
<http://permalink.gmane.org/gmane.emacs.orgmode/111357>

5 days agoox-latex: Silence byte-compiler
Nicolas Goaziou [Wed, 11 Jan 2017 11:36:49 +0000 (12:36 +0100)]
ox-latex: Silence byte-compiler

* lisp/ox-latex.el (org-latex-format-headline-default-function):
(org-latex-format-inlinetask-default-function): Silence byte-compiler.

5 days agoox-latex: Properly escape special characters in tags
Nicolas Goaziou [Wed, 11 Jan 2017 11:20:05 +0000 (12:20 +0100)]
ox-latex: Properly escape special characters in tags

* lisp/ox-latex.el (org-latex-format-headline-default-function):
(org-latex-format-inlinetask-default-function): Use
`org-latex--protect-text' instead of `org-latex-plain-text' to format
tags.

5 days agoorg-capture: Fix :jump-+to-captured when `org-capture-bookmark' is nil
Nicolas Goaziou [Wed, 11 Jan 2017 08:52:57 +0000 (09:52 +0100)]
org-capture: Fix :jump-+to-captured when `org-capture-bookmark' is nil

* lisp/org-capture.el (org-capture-bookmark-last-stored-position):
  Rename to ...
(org-capture-store-last-position): ... this.  Also store last position
unconditionally.
* lisp/org-capture.el (org-capture-finalize): Apply renaming.

5 days agoorg-capture: Improve error message for date/weektree capture
Nicolas Goaziou [Wed, 11 Jan 2017 08:17:18 +0000 (09:17 +0100)]
org-capture: Improve error message for date/weektree capture

* lisp/org-capture.el (org-capture-set-target-location): Raise an
  error when target location is not an Org buffer.

Reported-by: Simao <smm@imap.cc>
<http://permalink.gmane.org/gmane.emacs.orgmode/111320>

5 days agoox: Fix comments removal during export
Nicolas Goaziou [Tue, 10 Jan 2017 23:00:29 +0000 (00:00 +0100)]
ox: Fix comments removal during export

* lisp/ox.el (org-export--skip-p): Handle comments and comment blocks
  removal.
(org-export--delete-comments): Rename to...
(org-export--delete-comment-trees): ... this.  Now only take care of
commented trees and inlinetasks.

* testing/lisp/test-ox.el (test-org-export/comments): Add test.
(org-test-with-parsed-data): Apply renaming.

7 days ago; * doc/org.texi (Key bindings and useful functions): Beautify table.
Gregor Zattler [Sun, 8 Jan 2017 21:56:50 +0000 (22:56 +0100)]
; * doc/org.texi (Key bindings and useful functions): Beautify table.

Correctly render table of org-babel key bindings even in info
mode. [tiny change]

Copyright-paperwork-exempt: yes

10 days agoUpdate copyright years
Kyle Meyer [Fri, 6 Jan 2017 01:19:23 +0000 (20:19 -0500)]
Update copyright years

10 days agoBackport commit 2ec41c415 from Emacs
Stefan Monnier [Wed, 4 Jan 2017 05:40:45 +0000 (00:40 -0500)]
Backport commit 2ec41c415 from Emacs

* lisp/org-agenda.el (org-agenda-get-restriction-and-command):
Avoid add-to-list on local variables.

Avoid add-to-list on local variables
2ec41c415f39990561cc9da4c9bad0b69bfad489
Stefan Monnier
Wed Jan 4 00:40:45 2017 -0500

11 days agoorg-agenda: Fix effort filtering for entries with tags
Nicolas Goaziou [Wed, 4 Jan 2017 22:28:58 +0000 (23:28 +0100)]
org-agenda: Fix effort filtering for entries with tags

* lisp/org-agenda.el (org-agenda-compare-effort): Fix retrieval of
  `effort-minutes' property from entries with tags.

Reported-by: wtm <wtmonroe.ls@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/111194>

11 days agoorg-agenda: Fix UI bug with effort filter
Nicolas Goaziou [Wed, 4 Jan 2017 22:09:00 +0000 (23:09 +0100)]
org-agenda: Fix UI bug with effort filter

* lisp/org-agenda.el (org-agenda-filter-by-effort): "0" key
  effectively selects the last effort duration instead of the first
  one.  Do not accept invalid keys, i.e., do not treat most of invalid
  keys as "0".

11 days agoImprove documentation about agenda filters
Nicolas Goaziou [Wed, 4 Jan 2017 22:07:23 +0000 (23:07 +0100)]
Improve documentation about agenda filters

* doc/org.texi (Filtering/limiting agenda items): Add reference to
  `org-agenda-effort-filter-preset'.  Document prefix arguments for
  `org-agenda-filter-by-effort'.  Fix typo.
(Agenda commands): Remove index entries for unreferenced variables.
Tiny clean-up.

13 days agoFix "invalid face reference" when filtering agenda by effort
Nicolas Goaziou [Tue, 3 Jan 2017 21:11:11 +0000 (22:11 +0100)]
Fix "invalid face reference" when filtering agenda by effort

* lisp/org-faces.el (org-agenda-filter-effort): New face.
(org-agenda-filter-category): Fix docstring.

Reported-by: wtm <wtmonroe.ls@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/111132>

13 days agoob-shell: Fix wrong variable assignment binding
Nicolas Goaziou [Tue, 3 Jan 2017 17:23:40 +0000 (18:23 +0100)]
ob-shell: Fix wrong variable assignment binding

* lisp/ob-shell.el (org-babel-shell-initialize): Provide bindings to
  handle variable assignments for all the supported shells.
(org-babel--variable-assignments:sh-generic):
(org-babel--variable-assignments:bash_array):
(org-babel--variable-assignments:bash_assoc):
(org-babel--variable-assignments:bash): Rename using an internal
naming scheme since they are not meant to be called directly from
"ob-core.el".
(org-babel-variable-assignments:shell): Apply renaming.

Reported-by: David Dynerman <emperordali@block-party.net>
<http://permalink.gmane.org/gmane.emacs.orgmode/111139>

2 weeks agoob-ruby: Silence byte-compiler
Nicolas Goaziou [Sun, 1 Jan 2017 23:13:12 +0000 (00:13 +0100)]
ob-ruby: Silence byte-compiler

2 weeks agoUpdate ob-ruby for inf-ruby 2.5
Rick Frankel [Mon, 26 Dec 2016 20:00:32 +0000 (15:00 -0500)]
Update ob-ruby for inf-ruby 2.5

 * lisp/ob-ruby.el (org-babel-ruby-initiate-session): `run-ruby` has
   very different semantics in inf-ruby 2.5. Set ruby command to the
   default which used to be set by `run-ruby` and try and find already
   existing buffer before invocation.

2 weeks agoUpdate copyright years
Nicolas Goaziou [Sun, 1 Jan 2017 10:19:15 +0000 (11:19 +0100)]
Update copyright years

* lisp/org-crypt.el:
* lisp/ox-publish.el: Update copyright years.

2 weeks agoox-publish: Back-port `org-publish-property'
Nicolas Goaziou [Sun, 1 Jan 2017 09:43:48 +0000 (10:43 +0100)]
ox-publish: Back-port `org-publish-property'

* lisp/ox-publish.el (org-publish-property): New function.

2 weeks agoorg-crypt: Fix data loss when providing an empty key
Nicolas Goaziou [Sun, 1 Jan 2017 09:26:22 +0000 (10:26 +0100)]
org-crypt: Fix data loss when providing an empty key

* lisp/org-crypt.el (org-encrypt-entry): Insert original text back
  upon encryption failure.

Reported-by: fxiny <wtimew@libero.it>
<http://permalink.gmane.org/gmane.emacs.orgmode/111115>

2 weeks agoox-publish: Fix `org-publish-get-project-from-filename' and :include
Nicolas Goaziou [Sat, 31 Dec 2016 11:28:02 +0000 (12:28 +0100)]
ox-publish: Fix `org-publish-get-project-from-filename' and :include

* lisp/ox-publish.el (org-publish-get-project-from-filename): Properly
  check included files.  Complete docstring.  Refactor code.

2 weeks agoox-publish: Fix :base-extension set to `any'
Nicolas Goaziou [Thu, 29 Dec 2016 20:14:23 +0000 (21:14 +0100)]
ox-publish: Fix :base-extension set to `any'

* lisp/ox-publish.el (org-publish-get-project-from-filename): Handle
  case when :base-extension is `any'.
(org-publish-project-alist): Improve docstring.

Reported-by: Arun Isaac <arunisaac@systemreboot.net>
<http://permalink.gmane.org/gmane.emacs.orgmode/111085>

2 weeks agoReveal tags after setting them
Alexey Lebedeff [Sun, 25 Dec 2016 10:24:04 +0000 (13:24 +0300)]
Reveal tags after setting them

* lisp/org.el (org-set-tags): Reveal newly inserted tags.
* testing/lisp/test-org.el (test-org/set-tags): New test.

Sometimes freshly added tags can be sucked into invisible outline
region (denoted by ellipsis) - and to see them you need to do the full
global visibilty cycle.

2 weeks agoorg-clock: Fix ":formula %" with disparate duration formats
Nicolas Goaziou [Thu, 29 Dec 2016 00:19:00 +0000 (01:19 +0100)]
org-clock: Fix ":formula %" with disparate duration formats

* lisp/org-clock.el (org-clock-time%): Handle various duration
  formats.  Refactor code.

* testing/lisp/test-org-clock.el (test-org-clock/clocktable): Add
  tests.

Reported-by: Andreas Mueller <lists@0x7.ch>
<http://permalink.gmane.org/gmane.emacs.orgmode/111067>

2 weeks agoox-publish: Fix typos
Nicolas Goaziou [Tue, 27 Dec 2016 07:30:01 +0000 (08:30 +0100)]
ox-publish: Fix typos

3 weeks agoFix following links starting with square brackets
Nicolas Goaziou [Mon, 26 Dec 2016 09:29:54 +0000 (10:29 +0100)]
Fix following links starting with square brackets

* lisp/org.el (org-link-search): Improve regexp.
* testing/lisp/test-org.el (test-org/fuzzy-links): Add tests.

3 weeks agoFix `org-compile-file' release_9.0.3
Nicolas Goaziou [Thu, 22 Dec 2016 12:12:19 +0000 (13:12 +0100)]
Fix `org-compile-file'

* lisp/org.el (org-compile-file): Ensure `out-dir' is always a string.

3 weeks agoFix org-clock-load
Matt Lundin [Mon, 19 Dec 2016 23:32:26 +0000 (17:32 -0600)]
Fix org-clock-load

Since commit fda64f1ae2110175662b52daa3a5ec0f967f0c0d on November 6,
org-clock-load no longer restores clocks in org-clock-persist-file. The
contents of the file look like this:

(setq org-clock-stored-history '(("/home/matt/org/inbox.org" . 39479) ("/home/matt/org/reading.org" . 63478)))

The files both exist; the position information is correct; and
org-clock-persist is t. And yet after calling org-clock-load,
org-clock-history, org-clock-loaded, and org-clock-stored-history remain
nil.

The problem, it seems, is that the logic/order of the if statement was
reversed in the commit above. The attached patch should fix the issue.

Best,
Matt

[4. text/x-diff; 0001-org-clock-Fix-org-clock-load.patch]
From 6d649016fbbfaa28c902ee1e71c20ecf332f8a14 Mon Sep 17 00:00:00 2001
From: Matt Lundin <mdl@imapmail.org>
Date: Mon, 19 Dec 2016 17:24:10 -0600
Subject: [PATCH] org-clock: Fix org-clock-load

* lisp/org-clock.el: (org-clock-load): Fix incorrect order in if
statement that was preventing org-load from loading stored data and
populating org-clock-history.

4 weeks agoorg-list: Clarify code
Nicolas Goaziou [Mon, 19 Dec 2016 11:06:30 +0000 (12:06 +0100)]
org-list: Clarify code

* lisp/org-list.el (org-list-item-body-column): Clarify code.

4 weeks agoorg-list: Fix "Stack overflow in regexp matcher"
Nicolas Goaziou [Fri, 16 Dec 2016 21:41:08 +0000 (22:41 +0100)]
org-list: Fix "Stack overflow in regexp matcher"

* lisp/org-list.el (org-list-item-body-column): Do not backtrack as
  much in regexp.

Reported-by: Vasilij Schneidermann <v.schneidermann@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/110885>

4 weeks agoorg-agenda: Fix "Wrong type argument: number-or-marker-p"
Nicolas Goaziou [Thu, 15 Dec 2016 21:16:19 +0000 (22:16 +0100)]
org-agenda: Fix "Wrong type argument: number-or-marker-p"

* lisp/org-agenda.el (org-agenda-get-deadlines):
(org-agenda-get-scheduled): Make sure deadline and schedule are
a number and not a string.

Reported-by: Jeffrey DeLeo <JeffreyDeLeo@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/110837>

4 weeks agoox-ascii: Fix internal and ID links
Nicolas Goaziou [Thu, 15 Dec 2016 14:59:11 +0000 (15:59 +0100)]
ox-ascii: Fix internal and ID links

* lisp/ox-ascii.el (org-ascii--describe-datum): New function.
(org-ascii--describe-links): Use new function.  Do not ignore fuzzy
links anymore when they contain a description.
(org-ascii-link): Use new function.  Better handling of internal
links.
* lisp/ox.el (org-export-dictionary): New entries: "See figure %s",
  "See listing %s", "See table %s".

Reported-by: Samuel Wales <samologist@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/110788>

4 weeks agoFix C-c C-c on inline tasks
Nicolas Goaziou [Thu, 15 Dec 2016 13:24:01 +0000 (14:24 +0100)]
Fix C-c C-c on inline tasks

* lisp/org.el (org-ctrl-c-ctrl-c): Properly recognize inlinetasks as
  a valid context.

4 weeks agoorg-macs: Tiny refactoring
Nicolas Goaziou [Wed, 14 Dec 2016 23:02:58 +0000 (00:02 +0100)]
org-macs: Tiny refactoring

* lisp/org-macs.el (org-match-line): Use (beginning-of-line) instead
  of (goto-char (point-at-bol)).

4 weeks agoorg-info: Fix docstrings
Nicolas Goaziou [Wed, 14 Dec 2016 20:37:03 +0000 (21:37 +0100)]
org-info: Fix docstrings

* lisp/org-info.el (org-info-other-documents):
(org-info-map-html-url): Fix docstrings.

Suggested-by: Chunyang Xu <mail@xuchunyang.me>
4 weeks agoox-beamer: Fix target export
Nicolas Goaziou [Wed, 14 Dec 2016 12:15:48 +0000 (13:15 +0100)]
ox-beamer: Fix target export

* lisp/ox-beamer.el (beamer): Let "latex" export-back-end handle
  targets.

4 weeks agoox: Fix internal references when using `org-export-(data-)with-backend' release_9.0.2
Nicolas Goaziou [Tue, 13 Dec 2016 21:11:41 +0000 (22:11 +0100)]
ox: Fix internal references when using `org-export-(data-)with-backend'

* lisp/ox.el (org-export-data-with-backend):
(org-export-with-backend): Preserve internal references once the local
back-end has been applied.

* testing/lisp/test-ox.el (test-org-export/get-reference): Add tests.

4 weeks agoox-latex: Fix typo
Nicolas Goaziou [Tue, 13 Dec 2016 13:15:07 +0000 (14:15 +0100)]
ox-latex: Fix typo

* lisp/ox-latex.el (org-latex--text-markup): Fix typo.

4 weeks agoox-latex: Fix links with special characters
Nicolas Goaziou [Tue, 13 Dec 2016 12:46:38 +0000 (13:46 +0100)]
ox-latex: Fix links with special characters

* lisp/ox-latex.el (org-latex--protect-text): Properly escape special
  characters.
(org-latex--text-markup): Adapt to change above.
(org-latex-inline-src-block): Follow `org-latex-text-markup-alist'
specifications.
(org-latex-link): Escape forbidden characters in URL.

4 weeks agoox-latex: Fix nested sub/super-scripts
Nicolas Goaziou [Tue, 13 Dec 2016 08:10:54 +0000 (09:10 +0100)]
ox-latex: Fix nested sub/super-scripts

* lisp/ox-latex.el (org-latex--wrap-latex-math-block): Prevent merging
  multiple sub/super-scripts at the same level.  Nested scripts are
  allowed.

4 weeks agoox-beamer: Fix last commit
Nicolas Goaziou [Tue, 13 Dec 2016 08:06:48 +0000 (09:06 +0100)]
ox-beamer: Fix last commit

* lisp/ox-beamer.el (org-beamer-link): Fix commit
  5c28ea6aad2245944bb4f626fe7b039bfbb2b91b.

5 weeks agoorg.texi: Fix some @xref usage
Nicolas Goaziou [Mon, 12 Dec 2016 20:24:45 +0000 (21:24 +0100)]
org.texi: Fix some @xref usage

* doc/org.texi (Literal examples): @xref is expected to be followed by
  punctuation.

5 weeks agoox-beamer: Fix Beamer internal links
Nicolas Goaziou [Mon, 12 Dec 2016 20:01:02 +0000 (21:01 +0100)]
ox-beamer: Fix Beamer internal links

* lisp/ox-beamer.el (org-beamer-link): Generate a label compatible
  with "latex" back-end.  Reduce code duplication with "ox-latex.el".

Reported-by: Eric S Fraga <e.fraga@ucl.ac.uk>
<http://permalink.gmane.org/gmane.emacs.orgmode/110771>

5 weeks agoorg-colview: Fix `org-agenda-overriding-columns-format'
Nicolas Goaziou [Sun, 11 Dec 2016 00:34:55 +0000 (01:34 +0100)]
org-colview: Fix `org-agenda-overriding-columns-format'

* lisp/org-colview.el (org-columns--collect-values): Change signature.
(org-agenda-columns): Apply signature change.

When calling `org-agenda-columns' compiled columns format is set
locally to Agenda buffer, but `org-columns--collect-values' is called
from source buffers.  Therefore, it uses default format instead of the
compiled one.

Reported-by: Christian Prothmann <ckprothmann@yahoo.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/110748>

5 weeks agoob-tangle: Fix last commit
Nicolas Goaziou [Fri, 9 Dec 2016 23:59:08 +0000 (00:59 +0100)]
ob-tangle: Fix last commit

* lisp/ob-tangle.el (org-babel-tangle-single-block):
  `org-babel-expand-noweb-references' specifically needs to be run in
  the Org document so as to resolve references.
* testing/lisp/test-ob-tangle.el (ob-tangle/continued-code-blocks-w-noweb-ref):
  Make sure a failing test doesn't leave a file behind it.

5 weeks agoob-tangle: Respect buffer local variables
Nicolas Goaziou [Fri, 9 Dec 2016 23:20:11 +0000 (00:20 +0100)]
ob-tangle: Respect buffer local variables

* lisp/ob-tangle.el (org-babel-spec-to-string): Move some processing...
(org-babel-tangle-single-block): ... there.  This function is called
with the Org buffer as its original buffer whereas the previous one is
not.

This is a follow-up to 026fb75, which was reverted.

Reported-by: David Dynerman <emperordali@block-party.net>
<http://permalink.gmane.org/gmane.emacs.orgmode/110670>

5 weeks agoRevert "ob-tangle: Respect buffer local variables"
Nicolas Goaziou [Fri, 9 Dec 2016 23:19:45 +0000 (00:19 +0100)]
Revert "ob-tangle: Respect buffer local variables"

This reverts commit 026fb75ddbddb8b8965c40b82a381ff5b8e92516.

5 weeks agoSimplify matching headlines in `org-link-search'
Nicolas Goaziou [Thu, 8 Dec 2016 21:40:18 +0000 (22:40 +0100)]
Simplify matching headlines in `org-link-search'

* lisp/org.el (org-link-search): Simplify matching headlines.

5 weeks agoBackport commit eeecac7 from Emacs
Paul Eggert [Wed, 7 Dec 2016 19:29:54 +0000 (11:29 -0800)]
Backport commit eeecac7 from Emacs

Fix minor quoting problems in doc strings
eeecac7ab9d1f8c3a29cffe4586e5fd2414dd671
Paul Eggert
Wed Dec 7 11:31:16 2016 -0800

5 weeks agoAllow coderef on otherwise empty lines
Nicolas Goaziou [Wed, 7 Dec 2016 22:11:10 +0000 (23:11 +0100)]
Allow coderef on otherwise empty lines

* lisp/org-src.el (org-src-coderef-regexp): Update regexp.
* lisp/ox.el (org-export-resolve-coderef): Use function above.

Reported-by: D M German <dmg@turingmachine.org>
<http://permalink.gmane.org/gmane.emacs.orgmode/110656>

5 weeks agoox-latex: Do not generate nested sub/superscripts
Nicolas Goaziou [Tue, 6 Dec 2016 23:45:52 +0000 (00:45 +0100)]
ox-latex: Do not generate nested sub/superscripts

* lisp/ox-latex.el (org-latex--wrap-latex-math-block): Do not wrap
  consecutive sub or super-scripts within the same block.

Reported-by: Scott Otterson <scotto@sharpleaf.org>
<http://permalink.gmane.org/gmane.emacs.orgmode/110589>

5 weeks agoFix SCHEDULED removal when repeating a task
Nicolas Goaziou [Tue, 6 Dec 2016 23:10:29 +0000 (00:10 +0100)]
Fix SCHEDULED removal when repeating a task

* lisp/org.el (org-auto-repeat-maybe): Fix bug where repeating a task
  containing a timestamp without a repeater would remove the scheduled
  date.

Reported-by: 毛晓伟 <maoweirm@126.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/110633>

6 weeks agodoc/org.texi: Editorial revisions to the manual
Lambda Coder [Fri, 2 Dec 2016 18:27:54 +0000 (10:27 -0800)]
doc/org.texi: Editorial revisions to the manual

Chapters edited in this revision:
* From Working with source code chapter to end of manual

6 weeks agoob-tangle: Respect buffer local variables
Nicolas Goaziou [Sat, 3 Dec 2016 22:55:28 +0000 (23:55 +0100)]
ob-tangle: Respect buffer local variables

* lisp/ob-tangle.el (org-babel-tangle): Make sure buffer local
  variables from Org document are taken into consideration in tangled
  document.

Reported-by: David Dynerman <emperordali@block-party.net>
<http://permalink.gmane.org/gmane.emacs.orgmode/110577>

6 weeks agoorg-agenda: Fix face for past scheduled time stamps
Nicolas Goaziou [Fri, 2 Dec 2016 22:24:38 +0000 (23:24 +0100)]
org-agenda: Fix face for past scheduled time stamps

* lisp/org-agenda.el (org-agenda-get-scheduled): Fix face.

6 weeks agoorg-agenda: Fix repeats with nil `org-agenda-repeating-timestamp-show-all'
Nicolas Goaziou [Fri, 2 Dec 2016 09:55:49 +0000 (10:55 +0100)]
org-agenda: Fix repeats with nil `org-agenda-repeating-timestamp-show-all'

* lisp/org-agenda.el (org-agenda-get-timestamps):
(org-agenda-get-deadlines):
(org-agenda-get-scheduled): When
`org-agenda-repeating-timestamp-show-all' is nil, only display repeat
before and repeat after today (or only repeat at today if those
coincide).  Also, computations of warnings are done with last repeat
before today instead of base date.

6 weeks agoorg-agenda: Small refactoring
Nicolas Goaziou [Fri, 2 Dec 2016 09:36:32 +0000 (10:36 +0100)]
org-agenda: Small refactoring

* lisp/org-agenda.el (org-agenda-deadline-face): Small refactoring.

6 weeks agoFix dpi calculation when previewing LaTeX snippets
Nicolas Goaziou [Wed, 30 Nov 2016 20:55:45 +0000 (21:55 +0100)]
Fix dpi calculation when previewing LaTeX snippets

* lisp/org.el (org--get-display-dpi): Fix docstring.
(org-create-formula-image): Use function above.

Reported-by: Scott Otterson <scotto@sharpleaf.org>
<http://permalink.gmane.org/gmane.emacs.orgmode/110526>

6 weeks agoorg-agenda: Fix priority for deadlines
Nicolas Goaziou [Tue, 29 Nov 2016 23:16:56 +0000 (00:16 +0100)]
org-agenda: Fix priority for deadlines

* lisp/org-agenda.el (org-agenda-get-deadlines): Fix priority
  computation.

Reported-by: Matt Lundin <mdl@imapmail.org>
<http://permalink.gmane.org/gmane.emacs.orgmode/110519>

6 weeks agoorg-agenda: Fix time of day presence
Nicolas Goaziou [Tue, 29 Nov 2016 22:55:15 +0000 (23:55 +0100)]
org-agenda: Fix time of day presence

* lisp/org-agenda.el (org-agenda-get-deadlines): Small refactoring.
(org-agenda-get-scheduled): Do no insert a time of day when current
entry is only a reminder of a previously scheduled task.

Reported-by: Matt Lundin <mdl@imapmail.org>
<http://permalink.gmane.org/gmane.emacs.orgmode/110517>

6 weeks agoRelax the match criteria for MathML header line
Lixin Chin [Tue, 29 Nov 2016 08:28:06 +0000 (09:28 +0100)]
Relax the match criteria for MathML header line

* lisp/org.el (org-create-math-formula): Allow the xmlns attribute to
  be preceded by any other mathml header attribute.

The problem here was that the match criteria for MathML assumed that
the xmlns attribute is the first listed in the top level MathML <math>
element.  Some LaTeX -> MathML converters (e.g., pandoc) will add
attributes before xmlns, which is still valid MathML.

6 weeks agoox-odt.el: Fix LaTeX formulae in opendocument exports
Lixin Chin [Tue, 29 Nov 2016 08:24:11 +0000 (09:24 +0100)]
ox-odt.el: Fix LaTeX formulae in opendocument exports

* lisp/ox-odt.el (org-odt--translate-latex-fragments): Apply signature
  change for `org-format-latex'.

Commit a24f339f58a5a97a813514b8768faf9131c83dd0 changed the signature
for `org-format-latex' (lisp/org.el) to add `beg' and `end' optional
parameters.  This led to an error in ox-odt.el when exporting an
odt document containing LaTeX formulae.

6 weeks agoIssue user-error when trying to drag before first element
Kyle Meyer [Mon, 28 Nov 2016 23:30:16 +0000 (18:30 -0500)]
Issue user-error when trying to drag before first element

* lisp/org.el (org-drag-element-backward):
(org-drag-element-forward): Check that org-element-at-point returns a
non-nil value to avoid a type-error when called before first element.

* testing/lisp/test-org.el (test-org/drag-element-backward):
(test-org/drag-element-forward): Add test for when point is before
first element.  Adjust existing should-error calls to specify
user-error.

7 weeks agoorg-agenda: Fix deadlines
Nicolas Goaziou [Mon, 28 Nov 2016 00:35:21 +0000 (01:35 +0100)]
org-agenda: Fix deadlines

* lisp/org-agenda.el (org-agenda-get-deadlines): Fix deadlines
  display.  Also improve priority adjustment.

7 weeks agoorg-agenda: Fix docstrings
Nicolas Goaziou [Sun, 27 Nov 2016 22:45:35 +0000 (23:45 +0100)]
org-agenda: Fix docstrings

* lisp/org-agenda.el (org-agenda-skip-scheduled-if-done): Tiny rewording.
(org-agenda-skip-deadline-if-done): Fix typo.

7 weeks agoorg-agenda: Fix done scheduled display
Nicolas Goaziou [Sun, 27 Nov 2016 22:43:00 +0000 (23:43 +0100)]
org-agenda: Fix done scheduled display

* lisp/org-agenda.el (org-agenda-get-scheduled): Skip done scheduled
  unconditionally whenever the base date is not the one currently
  considered.

7 weeks agoorg-agenda: Fix repeated time stamps
Nicolas Goaziou [Sun, 27 Nov 2016 22:08:34 +0000 (23:08 +0100)]
org-agenda: Fix repeated time stamps

* lisp/org-agenda.el (org-agenda-get-timestamps): Properly handle
  repeated time stamps.  Refactor code.  Improve docstring.

7 weeks agoTiny fix
Nicolas Goaziou [Sun, 27 Nov 2016 22:07:49 +0000 (23:07 +0100)]
Tiny fix

* lisp/org.el (org-at-clock-log-p): Use `beginning-of-line' instead of
  `move-beginning-of-line'.

7 weeks agoTiny docstring fix
Nicolas Goaziou [Sun, 27 Nov 2016 11:20:01 +0000 (12:20 +0100)]
Tiny docstring fix

* lisp/org.el (org-compile-file): Fix docstring.

7 weeks agoFix LaTeX preview
Nicolas Goaziou [Sun, 27 Nov 2016 11:07:11 +0000 (12:07 +0100)]
Fix LaTeX preview

* lisp/org.el (org-compile-file): Introduce new %O placeholder.
(org-preview-latex-process-alist): Use it.

* lisp/ox-latex.el (org-latex-pdf-process):
* lisp/ox-man.el (org-man-pdf-process):
* lisp/ox-texinfo.el (org-texinfo-info-process): Document it.

Reported-by: Scott Otterson <scotto@sharpleaf.org>
<http://permalink.gmane.org/gmane.emacs.orgmode/110464>

7 weeks agoorg-clock: Fix clock tables with file list scope
Nicolas Goaziou [Fri, 25 Nov 2016 23:15:44 +0000 (00:15 +0100)]
org-clock: Fix clock tables with file list scope

* lisp/org-clock.el (org-dblock-write:clocktable): Handle scope as
  a list of files.

Reported-by: Nikolay Kudryavtsev <nikolay.kudryavtsev@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/110452>

7 weeks agoorg-agenda: Fix "no-catch --cl-block-nil--"
Nicolas Goaziou [Fri, 25 Nov 2016 16:49:13 +0000 (17:49 +0100)]
org-agenda: Fix "no-catch --cl-block-nil--"

* lisp/org-agenda.el (org-agenda-get-category-icon): Use `cl-dolist'
  instead of `dolist'.

Reported-by: Karl Voit <devnull@Karl-Voit.at>
<http://permalink.gmane.org/gmane.emacs.orgmode/110443>

7 weeks agoox-latex: Fix error when compiling in a different than source file
Nicolas Goaziou [Fri, 25 Nov 2016 09:25:35 +0000 (10:25 +0100)]
ox-latex: Fix error when compiling in a different than source file

* lisp/ox-latex.el (org-latex-compile): List logfiles with their full
  name instead of relative ones.

Reported-by: Éric Würbel <eric.wurbel@univ-amu.fr>
<http://permalink.gmane.org/gmane.emacs.orgmode/110402>

7 weeks agoorg-agenda: Fix previous commit
Nicolas Goaziou [Fri, 25 Nov 2016 01:07:54 +0000 (02:07 +0100)]
org-agenda: Fix previous commit

* lisp/org-agenda.el (org-agenda-get-timestamps):
(org-agenda-get-deadlines): Apply `org-agenda--timestamp-to-absolute'
signature change.

7 weeks agoorg-agenda: Fix scheduled dates display
Nicolas Goaziou [Fri, 25 Nov 2016 00:51:42 +0000 (01:51 +0100)]
org-agenda: Fix scheduled dates display

* lisp/org.el (org-time-string-to-absolute): Change signature.
* lisp/org-agenda.el (org-agenda-get-scheduled): Fix various glitches
  in scheduled dates display.  Also fix such dates when
  `org-agenda-repeating-timestamp-show-all' is nil.  Apply signature
  change.

Reported-by: Samuel Wales <samologist@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/110116>

7 weeks agoob-js: Fix error when code block ends with a comment
Nicolas Goaziou [Mon, 21 Nov 2016 22:21:23 +0000 (23:21 +0100)]
ob-js: Fix error when code block ends with a comment

* lisp/ob-js.el (org-babel-js-function-wrapper): Isolate body within
  wrapper.

Reported-by: Compro Prasad <comproprasad@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/110390>

8 weeks agotest-ob: Fix failing test on MacOS
Nicolas Goaziou [Sun, 20 Nov 2016 08:36:42 +0000 (09:36 +0100)]
test-ob: Fix failing test on MacOS

* testing/lisp/test-ob.el (test-ob/indented-cached-org-bracket-link):
  Use `expand-file-name' to prevent introducing "//" patterns in file
  name.

Reported-by: David Talmage <david.talmage@shoutpoint.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/110285>

8 weeks agoox-html: Fix %d placeholder in pre/postamble string
Nicolas Goaziou [Sat, 19 Nov 2016 22:17:32 +0000 (23:17 +0100)]
ox-html: Fix %d placeholder in pre/postamble string

* lisp/ox-html.el (org-html-format-spec): Correctly apply
  `org-html-metadata-timestamp-format' on %d placeholder.

Reported-by: Pavel Panchekha <me@pavpanchekha.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/110374>

8 weeks agoMerge branch 'maint' of orgmode.org:org-mode into maint
Nicolas Goaziou [Sat, 19 Nov 2016 22:08:33 +0000 (23:08 +0100)]
Merge branch 'maint' of orgmode.org:org-mode into maint

8 weeks agoFix error when exporting body only of an empty buffer
Nicolas Goaziou [Sat, 19 Nov 2016 22:06:17 +0000 (23:06 +0100)]
Fix error when exporting body only of an empty buffer

* lisp/ox.el (org-export-filter-apply-functions): Return empty string
  instead of nil when a filter returns the empty string.

* testing/lisp/test-ox.el (test-org-export/export-scope): Add test.
(test-org-export/filter-apply-functions): New test.

Reported-by: "Stefan-W. Hahn" <stefan.hahn@s-hahn.de>
<http://permalink.gmane.org/gmane.emacs.orgmode/110371>

8 weeks agoBackport commit 5b0cddd from Emacs
Eli Zaretskii [Tue, 15 Nov 2016 17:01:07 +0000 (19:01 +0200)]
Backport commit 5b0cddd from Emacs

* doc/orgcard.tex: Change "GNU Emacs" to "this document" in copyright
notices.  (Bug#24520)

More fixes in copyright notices in etc/refcards/
5b0cddd91535025bbf0c69d17e2d4e470dd350c5
Eli Zaretskii
Tue Nov 15 19:01:07 2016 +0200

8 weeks agoBackport commit f994c20 from Emacs
Eli Zaretskii [Sun, 13 Nov 2016 16:20:59 +0000 (18:20 +0200)]
Backport commit f994c20 from Emacs

* doc/orgcard.tex: Update the copyright blurb.  (Bug#24520)

Update copyright text in refcards
f994c2046588b168c1a4a900879cdffaf9d02f01
Eli Zaretskii
Sun Nov 13 18:20:59 2016 +0200

8 weeks agoBackport commit dc152c5 from Emacs
Paul Eggert [Sun, 6 Nov 2016 07:33:43 +0000 (00:33 -0700)]
Backport commit dc152c5 from Emacs

Apple changed the spelling of its operating system again, to "macOS",
effective with macOS 10.12 Sierra (2016-09-20).  Change Emacs
documentation and comments to match this.  Stick with older OS
spellings ("OS X", "Mac OS X") when talking about older releases where
the older names are more correct.

Modernize usage of 'macOS' in doc and comments
dc152c54f4e44f5f2040883b03f71ff6aa66c893
Paul Eggert
Sun Nov 6 00:42:03 2016 -0700

8 weeks agoox-icalendar: Use \r\n instead of \n as line breaks
Nicolas Goaziou [Fri, 18 Nov 2016 22:03:01 +0000 (23:03 +0100)]
ox-icalendar: Use \r\n instead of \n as line breaks

* lisp/ox-icalendar.el (org-icalendar-fold-string): Break lines with
  \r\n instead of \n, per RFC 5545.

Reported-by: Stephen Eglen <sje30@cam.ac.uk>
<http://permalink.gmane.org/gmane.emacs.orgmode/110306>

8 weeks agoorg.texi: Small fixes release_9.0.1
Nicolas Goaziou [Fri, 18 Nov 2016 08:36:47 +0000 (09:36 +0100)]
org.texi: Small fixes

* doc/org.texi (Structure of code blocks): Remove too recent
  @indentedblock structure and fix some @ref, @xref, @pxref uses.

8 weeks agoorg.texi: Reword Babel chapter
Lambda Coder [Thu, 17 Nov 2016 22:28:37 +0000 (23:28 +0100)]
org.texi: Reword Babel chapter

* doc/org.texi (Template elements):
(Tables in @LaTeX{} export):
(Working with source code):
(Structure of code blocks):
(Editing source code):
(Exporting code blocks):
(Extracting source code):
(Evaluating code blocks):
(Library of Babel):
(Languages):
(Header arguments):
(Using header arguments):
(System-wide header arguments):
(Language-specific header arguments):
(Header arguments in Org mode properties):
(Language-specific header arguments in Org mode properties):
(Code block specific header arguments):
(Header arguments in function calls):
(Specific header arguments):
(var):
(results):
(file-desc):
(file):
(output-dir):
(dir):
(exports):
(comments):
(padline):
(no-expand):
(session):
(noweb):
(noweb-ref):
(noweb-sep):
(cache):
(sep):
(hlines):
(colnames):
(rownames):
(shebang):
(tangle-mode):
(eval):
(wrap):
(post):
(prologue):
(Results of evaluation):
(Noweb reference syntax):
(Key bindings and useful functions):
(Batch execution): Improve wording.

2 months agoorg.texi: Fix typo
Nicolas Goaziou [Sun, 13 Nov 2016 17:10:25 +0000 (18:10 +0100)]
org.texi: Fix typo

* doc/org.texi (External links): Fix typo.

2 months agoSmall fix to documentation
Nicolas Goaziou [Sun, 13 Nov 2016 17:08:15 +0000 (18:08 +0100)]
Small fix to documentation

* doc/org.texi (Setting tags): Remove misleading information.
* lisp/org.el (org-tag-alist): Fix consistency with
  `org-tag-persistent-alist'.