org-mode.git
15 hours agoorg-agenda: Fix face for past scheduled time stamps maint
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.

25 hours 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.

25 hours 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.

2 days 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>

3 days 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>

3 days 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>

4 days 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.

4 days 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.

4 days 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.

5 days 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.

5 days 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.

5 days 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.

5 days 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.

5 days 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'.

6 days 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.

6 days 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 days 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 days 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>

8 days 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>

8 days 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.

8 days 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>

11 days 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>

13 days 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>

13 days 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>

13 days 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

13 days 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>

13 days 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

13 days 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

13 days 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

2 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>

2 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.

2 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 weeks 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 weeks 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'.

2 weeks agoFix docstring
Nicolas Goaziou [Sun, 13 Nov 2016 10:28:42 +0000 (11:28 +0100)]
Fix docstring

* lisp/org.el (org-link-search-must-match-exact-headline): Fix
  docstring.  Add :safe keyword.

2 weeks agoFix TODO keywords case sensitivity
Nicolas Goaziou [Sun, 13 Nov 2016 09:58:23 +0000 (10:58 +0100)]
Fix TODO keywords case sensitivity

* lisp/org.el (org-todo-regexp):
(org-not-done-regexp):
(org-not-done-heading-regexp):
(org-todo-line-regexp):
(org-complex-heading-regexp): Improve docstrings.

(org-insert-todo-heading):
(org-fix-position-after-promote):
(org-link-search):
(org-block-todo-from-children-or-siblings-or-parent):
(org-get-todo-state):
(org-priority):
(org-point-at-end-of-empty-headline):
* lisp/org-agenda.el (org-fix-agenda-info):
(org-agenda-get-todos):
(org-cmp-alpha):
* lisp/org-archive.el (org-archive-subtree):
(org-archive-all-done):
* lisp/org-list.el (org-toggle-item):
* lisp/org-pcomplete.el (pcomplete/org-mode/searchhead): Bind
`case-fold-search' to nil when matching aginst one of the regexp
above.

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

3 weeks agoSmall documentation fixes
Nicolas Goaziou [Sat, 12 Nov 2016 00:45:05 +0000 (01:45 +0100)]
Small documentation fixes

* doc/org.texi (The very busy C-c C-c key):
* lisp/org.el (org-startup-folded): Documentation fixes.

3 weeks agoRemove dependency on "gs" for preview LaTeX
Nicolas Goaziou [Sat, 12 Nov 2016 00:21:25 +0000 (01:21 +0100)]
Remove dependency on "gs" for preview LaTeX

* lisp/org.el (org-preview-latex-process-alist): Remove "gs"
  requirement.

Reported-by: Frederick Giasson <fred@fgiasson.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/110216>

3 weeks agoorg-clock: Add missing space in clock line
Nicolas Goaziou [Sat, 12 Nov 2016 00:09:00 +0000 (01:09 +0100)]
org-clock: Add missing space in clock line

* lisp/org-clock.el (org-clock-get-clock-string): Add missing space in
  clock line when no effort is defined.

Reported-by: Allen Li <vianchielfaura@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/110235>

3 weeks agoox: Fix duplicate internal references for same title headings
Nicolas Goaziou [Fri, 11 Nov 2016 16:47:09 +0000 (17:47 +0100)]
ox: Fix duplicate internal references for same title headings

* lisp/ox.el (org-export-get-reference): Ensure different elements or
  objects generating the same search cell do not get the same internal
  reference.
* testing/lisp/test-ox.el (test-org-export/get-reference): Add test.

Reported-by: mstrey@strey.biz
<http://permalink.gmane.org/gmane.emacs.orgmode/110211>

3 weeks agoorg-colview: Fix time sum when mixing duration and H:MM:SS time
Nicolas Goaziou [Fri, 11 Nov 2016 11:02:34 +0000 (12:02 +0100)]
org-colview: Fix time sum when mixing duration and H:MM:SS time

* lisp/org-colview.el (org-columns--time-to-seconds): Recognize
  a duration even when it contains a H:MM:SS part.
* testing/lisp/test-org-colview.el (test-org-colview/columns-summary):
  Add test.

Reported-by: Björn Döring <bjoern@doering.io>
<http://permalink.gmane.org/gmane.emacs.orgmode/110144>

3 weeks agoox: Fix subtree export when starting with meta-data
Nicolas Goaziou [Fri, 11 Nov 2016 09:05:20 +0000 (10:05 +0100)]
ox: Fix subtree export when starting with meta-data

* lisp/ox.el (org-export-as): Skip planning info and first property
  drawer when exporting a subtree.
* testing/lisp/test-ox.el (test-org-export/export-scope): Add test.

3 weeks agoorg-agenda: Treat fake planning info as regular time-stamp
Nicolas Goaziou [Fri, 11 Nov 2016 00:08:53 +0000 (01:08 +0100)]
org-agenda: Treat fake planning info as regular time-stamp

* lisp/org-agenda.el (org-agenda-get-timestamps): Treat fake planning
  info as regular time-stamp.

Reported-by: Alan Tyree <alantyree@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/110197>

3 weeks agoox-publish: Fix too many opened buffer upon publishing
Nicolas Goaziou [Thu, 10 Nov 2016 23:45:21 +0000 (00:45 +0100)]
ox-publish: Fix too many opened buffer upon publishing

* lisp/ox-publish.el (org-publish-cache-file-needs-publishing): Create
  a new buffer for Org files only.

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

3 weeks agoorg.texi: More pregnant DEADLINE position in entries
Nicolas Goaziou [Thu, 10 Nov 2016 15:02:46 +0000 (16:02 +0100)]
org.texi: More pregnant DEADLINE position in entries

* doc/org.texi (Deadlines and scheduling): Insist on the location for
  planning keywords.
(Inserting deadline/schedule): No need to specify the functions add
planning keywords at an appropriate location.

3 weeks agoorg-element: Prevent parsing meta-data after blank lines
Nicolas Goaziou [Wed, 9 Nov 2016 23:25:34 +0000 (00:25 +0100)]
org-element: Prevent parsing meta-data after blank lines

* lisp/org-element.el (org-element--current-element): Check that
  planning info and property drawers are correctly located before
  parsing them.

* testing/lisp/test-org-element.el (test-org-element/planning-parser):
(test-org-element/property-drawer-parser): Add tests.

3 weeks agoorg-element: Fix inlinetask parsing
Nicolas Goaziou [Wed, 9 Nov 2016 22:25:53 +0000 (23:25 +0100)]
org-element: Fix inlinetask parsing

* lisp/org-element.el (org-element-headline-parser): Small refactoring.
(org-element-inlinetask-parser): Add missing :pre-blank property.  Small
refactoring.  Also fix regexp for task end.

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

3 weeks agoox-latex: Fix temporary files removal when compiling files
Nicolas Goaziou [Wed, 9 Nov 2016 17:42:29 +0000 (18:42 +0100)]
ox-latex: Fix temporary files removal when compiling files

* lisp/ox-latex.el (org-latex-compile): Assume temporary files are
  located in the output directory.

This partly reverts 120f8c0.

3 weeks agoox-latex: Fix texi2dvi command
Nicolas Goaziou [Tue, 8 Nov 2016 17:24:13 +0000 (18:24 +0100)]
ox-latex: Fix texi2dvi command

* lisp/ox-latex.el (org-latex-pdf-process): Handle cases where tex file
  is not located in default-directory.

3 weeks agoFix docstring
Nicolas Goaziou [Tue, 8 Nov 2016 16:53:22 +0000 (17:53 +0100)]
Fix docstring

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

3 weeks agoox-latex: Fix latexmk command
Nicolas Goaziou [Tue, 8 Nov 2016 12:40:36 +0000 (13:40 +0100)]
ox-latex: Fix latexmk command

* lisp/ox-latex.el (org-latex-pdf-process): Fix latexmk command.

3 weeks agoFix file compilation in a different directory than current one
Nicolas Goaziou [Tue, 8 Nov 2016 10:44:28 +0000 (11:44 +0100)]
Fix file compilation in a different directory than current one

* lisp/org.el (org-compile-file): Do not set default directory.
(org-preview-latex-process-alist): Update since base-name may no be
located in current directory.
* lisp/ox-latex.el (org-latex-compile): Remove auxiliary files in
  default directory instead of ".tex" file directory.

Reported-by: Alex Fenton <alex.fenton@pressure.to>
<http://permalink.gmane.org/gmane.emacs.orgmode/110078>

3 weeks agoFix documentation
Nicolas Goaziou [Mon, 7 Nov 2016 00:14:04 +0000 (01:14 +0100)]
Fix documentation

* doc/org.texi (Installation):
(Feedback):
(Handling links):
(Setting tags):
(Matching tags and properties):
(Storing searches):
(The very busy C-c C-c key):
(org-crypt):
(Adding hyperlink types):
* lisp/org-agenda.el (org-agenda-todo-ignore-deadlines):
(org-agenda-show-inherited-tags):
(org-agenda-week-view):
(org-agenda-fortnight-view):
(org-agenda-month-view):
(org-agenda-year-view):
* lisp/org-archive.el (org-archive-to-archive-sibling):
* lisp/org-capture.el (org-capture-templates):
* lisp/org-table.el:
* lisp/org.el (org-startup-folded):
(org-tag-alist):
(org-match-sparse-tree): Provide more accurate documentation.

Reported-by: Jorge Morais Neto <jorge13515@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/110080>

3 weeks agoox-latex: Add column groups back in table math mode
Nicolas Goaziou [Sun, 6 Nov 2016 22:25:06 +0000 (23:25 +0100)]
ox-latex: Add column groups back in table math mode

* lisp/ox-latex.el (org-latex--math-table): Preserve column groups.

Reported-by: Stefanos Carlström <stefanos.carlstrom@fysik.lth.se>
<http://permalink.gmane.org/gmane.emacs.orgmode/110086>

3 weeks agoorg-clock: Fix `org-clock-load'
Nicolas Goaziou [Sun, 6 Nov 2016 12:30:05 +0000 (13:30 +0100)]
org-clock: Fix `org-clock-load'

* lisp/org-clock.el (org-clock-load): New variable.
(org-clock-save):
(org-clock-stored-resume-clock): Use new variable.  Small refactoring.

Reported-by: Daniel Borchmann <daniel.borchmann@tu-dresden.de>
<http://permalink.gmane.org/gmane.emacs.orgmode/110077>

3 weeks agoox-publish: Improve docstrings
Nicolas Goaziou [Sun, 6 Nov 2016 10:30:23 +0000 (11:30 +0100)]
ox-publish: Improve docstrings

* lisp/ox-publish.el (org-publish-cache-get): Improve docstrings.

3 weeks agoorg-capture: Remove error checking in capture template
Nicolas Goaziou [Sun, 6 Nov 2016 10:10:23 +0000 (11:10 +0100)]
org-capture: Remove error checking in capture template

* lisp/org-capture.el (org-capture-expand-file): Remove error checking
  in capture template introduced in
  b89dfaa904d32b645b975ef363d0eb192581408a for now.

3 weeks agoorg-capture: Fix file+olp target with a relative file name
Nicolas Goaziou [Sun, 6 Nov 2016 07:56:22 +0000 (08:56 +0100)]
org-capture: Fix file+olp target with a relative file name

* lisp/org-capture.el (org-capture-expand-file): Expand relative file
  names from `org-directory'
(org-capture-target-buffer): Apply change above.

Reported-by: Allen Li <darkfeline@felesatra.moe>
<http://permalink.gmane.org/gmane.emacs.orgmode/110075>

4 weeks agoRevert "org-capture: Remove forbidden value type from "file" templates"
Nicolas Goaziou [Fri, 4 Nov 2016 16:30:12 +0000 (17:30 +0100)]
Revert "org-capture: Remove forbidden value type from "file" templates"

This reverts commit 5485170263a46fa17db67b0324c4c4e48bcdfe49.

4 weeks agoFix "Invalid face attribute/reference" errors
Renato Ferreira [Fri, 4 Nov 2016 15:41:44 +0000 (16:41 +0100)]
Fix "Invalid face attribute/reference" errors

* lisp/org-agenda.el (org-agenda-fontify-priorities): Generate
correct :inherit face property.

4 weeks agoob-core: Fix typos in messages
Nicolas Goaziou [Fri, 4 Nov 2016 07:33:51 +0000 (08:33 +0100)]
ob-core: Fix typos in messages

* lisp/ob-core.el (org-babel-check-evaluate):
(org-babel-confirm-evaluate): Fix typos.

4 weeks agoox-publish: Fix typo
Nicolas Goaziou [Thu, 3 Nov 2016 11:48:40 +0000 (12:48 +0100)]
ox-publish: Fix typo

* lisp/ox-publish.el (org-publish-cache-get-file-property): Fix typo.

4 weeks agoob-core: Fix typo
Nicolas Goaziou [Thu, 3 Nov 2016 11:45:30 +0000 (12:45 +0100)]
ob-core: Fix typo

* lisp/ob-core.el (org-babel--get-vars): Fix typo.

4 weeks agoox-publish: Fix unwanted buffer pop-up release_9.0
Nicolas Goaziou [Wed, 2 Nov 2016 08:28:24 +0000 (09:28 +0100)]
ox-publish: Fix unwanted buffer pop-up

* lisp/ox-publish.el (org-publish-cache-file-needs-publishing): Use
  `find-file-noselect' instead of `find-file'.

4 weeks agoox-publish: Fix typo in docstring
Nicolas Goaziou [Wed, 2 Nov 2016 08:16:35 +0000 (09:16 +0100)]
ox-publish: Fix typo in docstring

* lisp/ox-publish.el (org-publish-cache-get-file-property): Fix typo.

4 weeks agolisp/ob-lua.el: Small indentation fix
Bastien [Tue, 1 Nov 2016 20:39:11 +0000 (21:39 +0100)]
lisp/ob-lua.el: Small indentation fix

* lisp/ob-lua.el (org-babel-lua-evaluate)
(org-babel-lua-evaluate-external-process): Fix indentation.

4 weeks agoetc/ORG-NEWS: more formatting minor enhancements
Bastien [Tue, 1 Nov 2016 20:38:19 +0000 (21:38 +0100)]
etc/ORG-NEWS: more formatting minor enhancements

4 weeks agoetc/ORG-NEWS: Small formatting enhancements.
Bastien [Tue, 1 Nov 2016 10:38:08 +0000 (11:38 +0100)]
etc/ORG-NEWS: Small formatting enhancements.

4 weeks agoFix repeated tasks in certain languages
Nicolas Goaziou [Tue, 1 Nov 2016 08:38:56 +0000 (09:38 +0100)]
Fix repeated tasks in certain languages

* lisp/org.el (org-timestamp-change): Handle `after' position.

`after' position needs to take into consideration changes in time-stamp
length.  Some time locales have variable lengths for abbreviated day
names throughout the week.

Reported-by: "Bruce V. Chiarelli" <mano155@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/109951>

4 weeks agoDelete contrib/lisp/ox-gfm.el
Bastien [Mon, 31 Oct 2016 11:46:15 +0000 (12:46 +0100)]
Delete contrib/lisp/ox-gfm.el

See https://github.com/larstvei/ox-gfm/issues/14.

4 weeks agoFix docstrings
Nicolas Goaziou [Mon, 31 Oct 2016 09:01:33 +0000 (10:01 +0100)]
Fix docstrings

* lisp/org-clock.el (org-clock-get-table-data):
* lisp/org-element.el (org-element--cache-objects):
(org-element--cache-generate-key):
* lisp/org-footnote.el (org-footnote--collect-references):
* lisp/org-list.el (org-list-to-lisp):
* lisp/org-table.el (orgtbl-to-generic):
* lisp/org.el (org-file-apps):
(org-execute-file-search-functions):
(org-after-todo-statistics-hook):
(org-find-olp):
* lisp/ox-html.el (org-html-table-row-open-tag): Do not escape
  parenthesis in docstring when not at column 0.

4 weeks agoorg-list: Fix docstrings
Nicolas Goaziou [Sun, 30 Oct 2016 19:25:57 +0000 (20:25 +0100)]
org-list: Fix docstrings

* lisp/org-list.el (org-list-to-latex):
(org-list-to-html):
(org-list-to-texinfo): Document missing parameter.
(org-list-to-subtree): Replace obsolete `org-list-parse-list' with
`org-list-to-lisp'.

4 weeks agocontrib/lisp/org-download.el: Remove
Oleh Krehel [Sun, 30 Oct 2016 07:10:23 +0000 (09:10 +0200)]
contrib/lisp/org-download.el: Remove

Fixes https://github.com/abo-abo/org-download/issues/38

The package remains available at the above address and MELPA.

5 weeks agoorg-compat: Assume `string-prefix-p' is defined
Nicolas Goaziou [Sat, 29 Oct 2016 08:02:27 +0000 (10:02 +0200)]
org-compat: Assume `string-prefix-p' is defined

* lisp/org-compat.el: `string-prefix-p' was introduced in Emacs 24.1,
  which is below Org minimal expectations.  Only define
  `string-suffix-p' when necessary.

5 weeks agoProperly fontify short captions
Nicolas Goaziou [Fri, 28 Oct 2016 23:09:26 +0000 (01:09 +0200)]
Properly fontify short captions

* lisp/org.el (org-fontify-meta-lines-and-blocks-1): Properly fontify
  short captions.

5 weeks agoMatch `org-complex-heading-regexp' with a nil `case-fold-search'
Nicolas Goaziou [Fri, 28 Oct 2016 22:38:15 +0000 (00:38 +0200)]
Match `org-complex-heading-regexp' with a nil `case-fold-search'

* lisp/org-agenda.el (org-agenda-goto):
* lisp/org-clock.el (org-clock-in):
(org-clock-out):
(org-clock-put-overlay):
(org-clock-load):
* lisp/org-element.el (org-element-context):
* lisp/org-footnote.el (org-footnote--allow-reference-p):
* lisp/org-mobile.el:
* lisp/ox.el (org-export--get-subtree-options):
* lisp/org.el (org-insert-heading):
(org-edit-headline):
(org-open-at-point):
(org-refile-get-targets):
(org--get-outline-path-1):
(org-toggle-comment):
(org-set-tags-to):
(org-set-tags):
(org-entry-properties):
(org-delete-indentation):
(org-beginning-of-line):
(org-end-of-line):
(org-mode-flyspell-verify): Bind `case-fold-search' to nil when matching
`org-complex-heading-regexp'.

(org-complex-heading-regexp): Add a note about the necessity to have
`case-fold-search' bound to nil.

5 weeks agoFix `org-return' on non-keyword
Nicolas Goaziou [Fri, 28 Oct 2016 22:00:32 +0000 (00:00 +0200)]
Fix `org-return' on non-keyword

* lisp/org.el (org-return): Recognize non-keywords and split text
  accordingly.
* testing/lisp/test-org.el (test-org/return): Add test.

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

5 weeks agoorg-element: Fix export of LaTeX math in headlines
Nicolas Goaziou [Fri, 28 Oct 2016 13:46:22 +0000 (15:46 +0200)]
org-element: Fix export of LaTeX math in headlines

* lisp/org-element.el (org-element-class): Find pseudo-objects in
  secondary strings.
* testing/lisp/test-org-element.el (test-org-element/class): Add test.

This bug was introduced in 1a88cf920e5090c311f77ba3f74183aa51253fb5.

Reported-by: Stefanos Carlström <stefanos.carlstrom@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/109922>

5 weeks agoorg-clock: Fix clock table with `file-with-archives' scope
Nicolas Goaziou [Thu, 27 Oct 2016 09:42:27 +0000 (11:42 +0200)]
org-clock: Fix clock table with `file-with-archives' scope

* lisp/org-clock.el (org-dblock-write:clocktable): Small refactoring.
(org-clocktable-write-default): Avoid writing a "File" column when using
`file-with-archives' scope instead of deleting it at the end of the
process.

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

Reported-by: Dale <dale@codefu.org>
<http://permalink.gmane.org/gmane.emacs.orgmode/109856>

5 weeks agoorg-element: Remove wrong code comment
Nicolas Goaziou [Wed, 26 Oct 2016 22:48:33 +0000 (00:48 +0200)]
org-element: Remove wrong code comment

* lisp/org-element.el (org-element--parse-objects): Remove wrong code
  comment.  The function doesn't untabify since 44cb8b1.

5 weeks agoorg-element: Tiny speed-up
Nicolas Goaziou [Wed, 26 Oct 2016 22:47:11 +0000 (00:47 +0200)]
org-element: Tiny speed-up

* lisp/org-element.el (org-element--object-lex): Do not search for radio
  targets when they are not allowed in current restriction.

5 weeks agoorg-element: Fix parsing radio links
Nicolas Goaziou [Wed, 26 Oct 2016 22:41:19 +0000 (00:41 +0200)]
org-element: Fix parsing radio links

* lisp/org-element.el (org-element--object-lex): Do not re-match past
  1-character long radio links.
* testing/lisp/test-org-element.el (test-org-element/link-parser): Add
  test.

Reported-by: Daniel Clemente <n142857@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/109861>

5 weeks agoorg-element: Tiny refactoring
Nicolas Goaziou [Tue, 25 Oct 2016 16:28:37 +0000 (18:28 +0200)]
org-element: Tiny refactoring

* lisp/org-element.el (org-element--object-lex): Tiny refactoring.

5 weeks agoTiny refactoring
Nicolas Goaziou [Tue, 25 Oct 2016 16:19:05 +0000 (18:19 +0200)]
Tiny refactoring

* lisp/org-element.el (org-element-interpret-data):
* lisp/ox.el (org-export-data): Remove useless binding.

5 weeks agoorg-src: Silence byte-compiler
Nicolas Goaziou [Tue, 25 Oct 2016 11:23:31 +0000 (13:23 +0200)]
org-src: Silence byte-compiler

5 weeks agoorg-element: Improve support for pseudo objects and elements
Nicolas Goaziou [Tue, 25 Oct 2016 11:13:26 +0000 (13:13 +0200)]
org-element: Improve support for pseudo objects and elements

* lisp/org-element.el (org-element-class): New function.
(org-element-map):
(org-element-interpret-data):
* lisp/org-footnote.el (org-footnote--allow-reference-p):
* lisp/org-src.el (org-src--on-datum-p):
* lisp/ox-odt.el (org-odt-footnote-reference):
(org-odt-table-cell):
* lisp/ox.el (org-export-data):
(org-export-expand): Use new function.

* testing/lisp/test-org-element.el (test-org-element/class): New test.

Using generic `org-element-class' allows to handle unknown, i.e.,
pseudo, object or element types.  It also reduces code duplication in
`org-element-interpret-data' and `org-export-data', preventing, e.g.,
bugs as the one fixed in c58e1b5.

5 weeks agoorg-element: Fix interpreting links with % in description
Nicolas Goaziou [Mon, 24 Oct 2016 21:56:34 +0000 (23:56 +0200)]
org-element: Fix interpreting links with % in description

* lisp/org-element.el (org-element-link-interpreter): % in description
  are confused with format string placeholders.  Escape them so as to
  fix the error.

* testing/lisp/test-org-element.el (test-org-element/link-interpreter):
  Add test.

Reported-by: Daniel Clemente <n142857@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/109878>

5 weeks agoox-latex: Fix matrices export
Nicolas Goaziou [Mon, 24 Oct 2016 21:33:28 +0000 (23:33 +0200)]
ox-latex: Fix matrices export

* lisp/ox-latex.el (org-latex--wrap-latex-matrices): Do not add spurious
  blank lines within a matrices block.

Reported-by: thomas.stenhaug@gmail.com
<http://permalink.gmane.org/gmane.emacs.orgmode/109854>

5 weeks agoFix :post-blank handling for pseudo elements and objects
Nicolas Goaziou [Mon, 24 Oct 2016 21:32:15 +0000 (23:32 +0200)]
Fix :post-blank handling for pseudo elements and objects

* lisp/org-element.el (org-element-interpret-data):
* lisp/ox.el (org-export-data): Correctly guess if a pseudo element or
  object should be followed by spaces or blank lines.

* testing/lisp/test-ox.el (test-org-export/pseudo-objects):
(test-org-export/pseudo-elements): New tests.

6 weeks agoFix table align when recalculating buffer tables
Michael Brand [Fri, 21 Oct 2016 15:35:13 +0000 (17:35 +0200)]
Fix table align when recalculating buffer tables

* lisp/org-table.el (org-table-recalculate-buffer-tables): Align all
tables in a buffer.
(org-table-iterate-buffer-tables): Align a table only once, align all
tables in a buffer.

6 weeks agoAdd test for table alignment
Michael Brand [Fri, 21 Oct 2016 15:33:13 +0000 (17:33 +0200)]
Add test for table alignment

* testing/lisp/test-org-table.el (test-org-table/align-buffer-tables):
New test to document current behavior.

6 weeks agoFix table header text in test
Michael Brand [Fri, 21 Oct 2016 15:31:45 +0000 (17:31 +0200)]
Fix table header text in test

* testing/lisp/test-org-table.el
(test-org-table/simple-formula/with-grouping/no-title-row): Fix table
header text.

6 weeks agoox: Fix typo
Nicolas Goaziou [Wed, 19 Oct 2016 21:22:12 +0000 (23:22 +0200)]
ox: Fix typo

* lisp/ox.el (org-export-dictionary): Fix typo.

6 weeks agoorg.texi: Fix typo
Nicolas Goaziou [Wed, 19 Oct 2016 18:46:15 +0000 (20:46 +0200)]
org.texi: Fix typo

* doc/org.texi (Template expansion): Fix typo.

6 weeks agoFix S-TAB when called on a block
Nicolas Goaziou [Wed, 19 Oct 2016 18:08:09 +0000 (20:08 +0200)]
Fix S-TAB when called on a block

* lisp/org.el (org-cycle): Call `org-hide-block-toggle-maybe' after
  universal argument check.  Also remove the function from
  `org-tab-first-hook' to that effect.

6 weeks agoMerge branch 'master' of orgmode.org:org-mode
Nicolas Goaziou [Wed, 19 Oct 2016 17:24:02 +0000 (19:24 +0200)]
Merge branch 'master' of orgmode.org:org-mode

6 weeks agoImprove documentation for capture templates
Nicolas Goaziou [Wed, 19 Oct 2016 17:23:05 +0000 (19:23 +0200)]
Improve documentation for capture templates

* doc/org.texi (Template expansion):
* lisp/org-capture.el (org-capture-templates): Clarify documentation.

Suggested-by: Stig Brautaset <stig@brautaset.org>
<http://permalink.gmane.org/gmane.emacs.orgmode/109844>

6 weeks agoox: Add translations for Islandic
Nicolas Goaziou [Wed, 19 Oct 2016 16:02:59 +0000 (18:02 +0200)]
ox: Add translations for Islandic

* lisp/ox.el (org-export-dictionary): Add translations for Islandic.

Suggested-by: Jón Gunnar Þorsteinsson <jongth@hi.is>
6 weeks agoorg-entities.el (org-entities): Add Amacr and amacr entities
Bastien [Wed, 19 Oct 2016 15:05:08 +0000 (17:05 +0200)]
org-entities.el (org-entities): Add Amacr and amacr entities

Thanks to Karel Sprenger for the suggestion.

6 weeks agoSilence byte-compiler
Nicolas Goaziou [Wed, 19 Oct 2016 14:09:59 +0000 (16:09 +0200)]
Silence byte-compiler