org-mode.git
34 hours agoorg.texi: Fix example maint
Nicolas Goaziou [Thu, 23 Feb 2017 18:15:22 +0000 (19:15 +0100)]
org.texi: Fix example

* doc/org.texi (noweb-ref): Update Babel parameter syntax in example.

39 hours agoorg.el: Make faces org-quote and org-verse be appended
Anders Johansson [Thu, 23 Feb 2017 13:14:50 +0000 (14:14 +0100)]
org.el: Make faces org-quote and org-verse be appended

* lisp/org.el (org-fontify-quote-and-verse-blocks): Append faces.  Use
  `add-face-text-property'.

This means fontification of emphasis, links etc. is kept in quote and
verse blocks even with org-fontify-quote-and-verse-blocks non-nil.

TINYCHANGE

40 hours agoorg-capture: Tiny refactoring
Nicolas Goaziou [Thu, 23 Feb 2017 11:59:24 +0000 (12:59 +0100)]
org-capture: Tiny refactoring

* lisp/org-capture.el (org-capture-refile): Tiny refactoring.

3 days agoorg-capture: Fix commit 7d7c38
Bastien [Tue, 21 Feb 2017 14:41:15 +0000 (15:41 +0100)]
org-capture: Fix commit 7d7c38

5 days agoorg-capture: Fix `org-capture-refile'
Nicolas Goaziou [Sun, 19 Feb 2017 14:27:09 +0000 (15:27 +0100)]
org-capture: Fix `org-capture-refile'

* lisp/org-capture.el (org-capture-refile): Preserve location of point
  when refiling.

* testing/lisp/test-org-capture.el (test-org-capture/refile): New
  test.

Reported-by: Liu Hui <liuhui1610@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/112202>

5 days agoorg-clock: Add german translation.
Axel Kielhorn [Sun, 19 Feb 2017 06:25:01 +0000 (07:25 +0100)]
org-clock: Add german translation.

* lisp/org-clocl.el (org-clock-clocktable-language-setup): German
  translations added.

Axel Kielhorn <org-mode@axelkielhorn.de>
TINYCHANGE

6 days agoorg-src: Fix typo in code comment
Nicolas Goaziou [Sat, 18 Feb 2017 13:56:41 +0000 (14:56 +0100)]
org-src: Fix typo in code comment

* lisp/org-src.el (org-edit-src-save): Fix typo.

6 days agoorg-clock: Fix number of columns with :compact parameter
Nicolas Goaziou [Sat, 18 Feb 2017 13:20:18 +0000 (14:20 +0100)]
org-clock: Fix number of columns with :compact parameter

* lisp/org-clock.el (org-clocktable-write-default): Fix number of
  columns with :compact parameter.

Reported-by: Stefan Nobis <stefan-ml@snobis.de>
<http://permalink.gmane.org/gmane.emacs.orgmode/112217>

7 days agoProperly save source blocks with `save-some-buffers'
Nicolas Goaziou [Fri, 17 Feb 2017 21:29:06 +0000 (22:29 +0100)]
Properly save source blocks with `save-some-buffers'

* lisp/org-src.el (org-src-mode-configure-edit-buffer): Set
  `write-contents-functions' so that saving a remote editing buffer
  always call `org-edit-src-save'.
(org-edit-src-save): Return a non-nil value explicitly.

Reported-by: Thibault Polge <thibault@thb.lt>
<http://permalink.gmane.org/gmane.emacs.orgmode/112201>

7 days agoorg-clock: Fix error when using unknown language
Nicolas Goaziou [Fri, 17 Feb 2017 13:34:19 +0000 (14:34 +0100)]
org-clock: Fix error when using unknown language

* lisp/org-clock.el (org-clocktable-write-default): Be careful
  that (nth 4 lwords) and (nth 5 lwords) can be nil, if :lang as an
  unknown value.

7 days agoorg-lint: Add checker for empty headlines with tags
Nicolas Goaziou [Fri, 17 Feb 2017 12:23:26 +0000 (13:23 +0100)]
org-lint: Add checker for empty headlines with tags

* lisp/org-lint.el (org-lint--checkers): Add checker.
(org-lint-empty-headline-with-tags): New function.

* testing/lisp/test-org-lint.el (test-org-lint/empty-headline-with-tags):
  New test.

7 days agoFix file:// uri handling for windows-nt and cygwin
Fabrice Popineau [Thu, 16 Feb 2017 21:42:59 +0000 (22:42 +0100)]
Fix file:// uri handling for windows-nt and cygwin

* lisp/org-element.el (org-element-link-parser):
  Handle drive names in uri like file:///c:/dir/file

* lisp/ox.el (org-export-file-uri):
  Handle drive names in uri like file:///c:/dir/file

* testing/lisp/test-ox.el (test-org-export/file-uri):
  Generate the right uri to be tested against link exporter.

11 days agoorg-clock: Fix regression in Clock table
Nicolas Goaziou [Mon, 13 Feb 2017 20:24:40 +0000 (21:24 +0100)]
org-clock: Fix regression in Clock table

* lisp/org-clock.el (org-clocktable-write-default): Do not raise an
  error when :maxlevel is 0.  Small refactoring.

* testing/lisp/test-org-clock.el (test-org-clock/clocktable): Split
into ...
(test-org-clock/clocktable/ranges):
(test-org-clock/clocktable/tags):
(test-org-clock/clocktable/scope):
(test-org-clock/clocktable/maxlevel):
(test-org-clock/clocktable/formula): ... these.  Add tests.

This fixes regression introduced in ccf832e83.

Reported-by: Christoph LANGE <math.semantic.web@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/112091>

11 days agoFix some tests
Nicolas Goaziou [Mon, 13 Feb 2017 16:14:38 +0000 (17:14 +0100)]
Fix some tests

* testing/lisp/test-org-element (test-org-element/link-parser): Remove
  a test.
* testing/lisp/test-org-pcomplete (test-org-pcomplete/keyword):
* testing/lisp/test-ox.el (test-org-export/file-uri): Fix tests.

11 days agoorg-element: Fix `org-element-insert-before'
Nicolas Goaziou [Mon, 13 Feb 2017 15:29:54 +0000 (16:29 +0100)]
org-element: Fix `org-element-insert-before'

* lisp/org-element.el (org-element-insert-before): Do not call
  `reverse' as contents might use `eq' objects.

* testing/lisp/test-ox.el (test-org-export/uninterpreted): Add test

Reported-by: Justin Kirby <justinkirby@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/112065>

11 days agoorg-table: Move table column with leaving text-properties untouched
Stefan-W. Hahn [Sun, 12 Feb 2017 11:41:19 +0000 (12:41 +0100)]
org-table: Move table column with leaving text-properties untouched

* lisp/org-table.el (org-table-move-column): Use `transpose-regions'.

Moving org-table rows is implemented with delete-region and insert which
preserve text-properties. Moving org-table columns is implemented
with replace-string, which removes text-properties.

My proposal is to use transpose-regions in org-table-move-column which
will preserve text-properties when moving columns in org-tables.

12 days agoMerge branch 'improve-org-eww' into maint
Marco Wahl [Sun, 12 Feb 2017 08:08:52 +0000 (09:08 +0100)]
Merge branch 'improve-org-eww' into maint

12 days agoorg-eww: Fix copy of form-elements
Marco Wahl [Sun, 12 Feb 2017 08:00:56 +0000 (09:00 +0100)]
org-eww: Fix copy of form-elements

* lisp/org-eww.el (org-eww-copy-for-org-mode): New behavior: Just add
  link-title when link-location is not a string.  This fixes copying
  from www.indeed.co.uk.

Reported and a suggestion of a fix by Andrea.
<http://permalink.gmane.org/gmane.emacs.orgmode/112052>.

13 days agoorgcard: Update export section
Kyle Meyer [Sat, 11 Feb 2017 22:33:18 +0000 (17:33 -0500)]
orgcard: Update export section

* doc/orgcard.tex (Export and Publishing): Correct stale bindings.
  Add asynchronous, body, and subtree bindings.

This section now includes all bindings listed in
(info "(org)The Export Dispatcher").

Reported-by: Charles C. Berry <ccberry@ucsd.edu>
<https://lists.gnu.org/archive/html/emacs-orgmode/2017-02/msg00200.html>

13 days agoSilence byte-compiler
Nicolas Goaziou [Sat, 11 Feb 2017 17:37:32 +0000 (18:37 +0100)]
Silence byte-compiler

2 weeks agoFix header in LaTeX snippets
Nicolas Goaziou [Sat, 11 Feb 2017 01:35:00 +0000 (02:35 +0100)]
Fix header in LaTeX snippets

* lisp/ox-latex.el (org-latex-make-preamble): Add optional argument.
* lisp/org.el (org-create-formula-image): Use it.

Reported-by: plus <ctre@users.sourceforge.net>
<http://permalink.gmane.org/gmane.emacs.orgmode/112015>

2 weeks agoorgcard: Remove another timeline entry release_9.0.5
Kyle Meyer [Thu, 9 Feb 2017 17:55:27 +0000 (12:55 -0500)]
orgcard: Remove another timeline entry

* doc/orgcard.tex (Filtering and Sparse Trees): Don't mention timeline
  because this feature will be removed in version 9.1.

90f87cb98 removed the org-timeline reference in the "Agenda Views"
section but missed this one.

As a bonus, this fixes a column formatting issue in the
orgcard_letter.pdf output (orgcard.pdf was not affected) that was
caused by an extra line added in 4340cc78f.

Reported-by: David Talmage <david.talmage@shoutpoint.com>
<http://lists.gnu.org/archive/html/emacs-orgmode/2017-02/msg00193.html>

2 weeks agoorgcard.tex: Remove timeline reference
Kyle Meyer [Thu, 9 Feb 2017 02:41:57 +0000 (21:41 -0500)]
orgcard.tex: Remove timeline reference

* doc/orgcard.tex: Don't mention timeline because this feature will be
  removed in version 9.1.

2 weeks agoUpdate few bindings' descriptions based on org 9.0.4
Kaushal Modi [Sun, 5 Feb 2017 20:05:19 +0000 (15:05 -0500)]
Update few bindings' descriptions based on org 9.0.4

* doc/orgcard.tex: Update descriptions for M-UP/DOWN and M-S-UP/DOWN
  bindings for structural editing.  Removed the C-c C-q binding
  description in the Tables/Regions section as it sets org tags as
  usual, does not fill paragraph.

2 weeks agoorg-clock: Fix clock percent
Nicolas Goaziou [Tue, 7 Feb 2017 15:48:14 +0000 (16:48 +0100)]
org-clock: Fix clock percent

* lisp/org-clock.el (org-clocktable-write-default): Fix percent computation.
(org-clock-time%): Remove function.

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

As a consequence of this patch, a ":formula %" doesn't generate
a TBLFM line anymore.

2 weeks agoox-bibtex: Take key with spaces or non-alphabetic characters into account
Sebastien Le Maguer [Sun, 5 Feb 2017 07:11:16 +0000 (08:11 +0100)]
ox-bibtex: Take key with spaces or non-alphabetic characters into account

* ox-bibtex.el (org-bibtex-process-bib-files): Solve a bug in which
ox-bibtex was not considering enterily keys like "Author et&bsp; al.,
1999" as valid.

TINYCHANGE

3 weeks agoorg-clock: Do not associate a note to removed zero time CLOCKs
Nicolas Goaziou [Fri, 3 Feb 2017 21:51:56 +0000 (22:51 +0100)]
org-clock: Do not associate a note to removed zero time CLOCKs

* lisp/org-clock.el (org-clock-out): When a zero time CLOCK is
  removed, do not offer to add a note for it.

3 weeks agoNotes associated to CLOCKs are located after the clock
Nicolas Goaziou [Fri, 3 Feb 2017 21:46:15 +0000 (22:46 +0100)]
Notes associated to CLOCKs are located after the clock

* lisp/org.el (org-store-log-note): Make sure a note added after
  clocking out is inserted right after the CLOCK line.

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

3 weeks agoFix indentation of some elements
Nicolas Goaziou [Fri, 3 Feb 2017 20:59:08 +0000 (21:59 +0100)]
Fix indentation of some elements

* lisp/org.el (org--get-expected-indentation): Tiny refactoring.
(org-indent-line): Ignore LaTex environments.
(org-indent-region): Better handling for export blocks, LaTeX
environments and example blocks.

* testing/lisp/test-org.el (test-org/indent-line):
(test-org/indent-region): Add tests.

3 weeks agoFix repeating entries without a TODO keyword
Nicolas Goaziou [Thu, 2 Feb 2017 13:17:04 +0000 (14:17 +0100)]
Fix repeating entries without a TODO keyword

* lisp/org.el (org-auto-repeat-maybe): Allow repeating entries without
  a TODO keyword.

3 weeks agoorg-agenda: Fix scheduled and deadline S-exp entries display
Nicolas Goaziou [Wed, 1 Feb 2017 21:36:29 +0000 (22:36 +0100)]
org-agenda: Fix scheduled and deadline S-exp entries display

* lisp/org-agenda.el (org-agenda-get-deadlines):
(org-agenda-get-scheduled): Properly handle S-exp entries.

Reported-by: Ken Mankoff <mankoff@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/111805>

3 weeks agoorg-table: Fix error with `org-table-get-field' at bob
Nicolas Goaziou [Wed, 1 Feb 2017 19:56:38 +0000 (20:56 +0100)]
org-table: Fix error with `org-table-get-field' at bob

* lisp/org-table.el (org-table-get-field): Do not return
  `beginning-of-buffer' error when called at beginning of buffer.

* testing/lisp/test-org-table.el (test-org-table/get-field): New test.

3 weeks agoReplace org-set-local by setq-local in the documentation
Nicolas Goaziou [Wed, 1 Feb 2017 14:42:04 +0000 (15:42 +0100)]
Replace org-set-local by setq-local in the documentation

* contrib/orgmanual.org (Conflicts): Update yasnippet instructions.

* doc/org.texi (Packages that conflict with Org mode): Update
  yasnippet instructions

TINYCHANGE

3 weeks agoorg-capture: Small fix
Nicolas Goaziou [Tue, 31 Jan 2017 21:50:09 +0000 (22:50 +0100)]
org-capture: Small fix

* lisp/org-capture.el (org-mks): Find entries with full prefix, not
last pressed key.

This fixes a bug introduced in 8194e7b09.

Reported-by: Charles Millar <millarc@verizon.net>
<http://permalink.gmane.org/gmane.emacs.orgmode/111779>

3 weeks agoox-latex.el: Wrap 'minted' src blocks in a 'listing' environment
Lixin Chin [Tue, 31 Jan 2017 06:15:40 +0000 (14:15 +0800)]
ox-latex.el: Wrap 'minted' src blocks in a 'listing' environment

* lisp/ox-latex.el (org-latex-src-block): Make source highlighting
  using the 'minted' syntax highlighting package behave the same as
  using the 'listings' syntax highlighting package.

The source block should be floating if a caption is provided, or if
':float t' is provided in an '#+ATTR_LATEX:' block.  Previously, the
source block would only be floating if ':float multicolumn' was
provided.  This now matches the Org mode documentation for source
blocks.

TINYCHANGE

3 weeks agoorg-capture: Fix freeze when capture templates are ill-defined
Nicolas Goaziou [Mon, 30 Jan 2017 22:36:52 +0000 (23:36 +0100)]
org-capture: Fix freeze when capture templates are ill-defined

* lisp/org-capture.el (org-mks): Do not freeze when there is a missing
  step in the key hierarchy.  Fix docstring.  Refactor code for clarity.

Reported-by: Roland Everaert <reveatwork@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/111716>

3 weeks agoBackport commit ae8264c5cc from Emacs
Noam Postavsky [Sat, 7 Jan 2017 21:05:19 +0000 (16:05 -0500)]
Backport commit ae8264c5cc from Emacs

* lisp/org-src.el (org-src-font-lock-fontify-block): Let-bind
`inhibit-modification-hooks' to nil, since this function can be called
from jit-lock-function which binds that variable to t (Bug#25132).

Call modification hooks in org-src fontify buffers
ae8264c5cccf19d5b25a340a605bf2f07de1577e
Noam Postavsky
Sun Jan 29 11:01:32 2017 -0500

3 weeks agoFix: keep repeaters at rescheduling
Marco Wahl [Sun, 29 Jan 2017 15:04:03 +0000 (16:04 +0100)]
Fix: keep repeaters at rescheduling

* lisp/org.el (org--deadline-or-schedule): Removed a blank in a regexp.
* testing/lisp/test-org.el (test-org/schedule): New test.

4 weeks agoAllow C-c C-c on blank lines within src blocks
Nicolas Goaziou [Fri, 27 Jan 2017 22:56:30 +0000 (23:56 +0100)]
Allow C-c C-c on blank lines within src blocks

* lisp/org.el (org-ctrl-c-ctrl-c): Act on blank lines if they are
  located within a src block.

Reported-by: John Hendy <jw.hendy@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/111720>

4 weeks agoFix `org-refresh-property'
Marco Wahl [Fri, 27 Jan 2017 18:35:16 +0000 (19:35 +0100)]
Fix `org-refresh-property'

* lisp/org.el(org-refresh-property): Fixed by comparison to the code
  before the refactoring.

With commit 126a1cd7c the "Effort" property broke the agenda.

4 weeks agoFix internal function name
Nicolas Goaziou [Thu, 26 Jan 2017 23:24:15 +0000 (00:24 +0100)]
Fix internal function name

* lisp/org.el (org-property--local-values): Rename to...
(org--property-local-values): ... this.
(org-entry-get):
(org-entry-get-with-inheritance): Apply renaming.

4 weeks agoFix "APPT_WARNTIME" inheritance
Nicolas Goaziou [Thu, 26 Jan 2017 23:21:42 +0000 (00:21 +0100)]
Fix "APPT_WARNTIME" inheritance

* lisp/org.el (org-refresh-properties): Handle inheritance from global
  values (e.g., from "#+PROPERTY:" keyword).
(org-refresh-property): Handle property inheritance with a new
optional argument.

* testing/lisp/test-org.el (test-org/refresh-properties): New test.

4 weeks agoSmall refactoring
Nicolas Goaziou [Thu, 26 Jan 2017 23:10:10 +0000 (00:10 +0100)]
Small refactoring

* lisp/org.el (org--property-global-value): New function.
(org-entry-get-with-inheritance): Use new function.

4 weeks agoFix `org-property-inherit-p'
Nicolas Goaziou [Thu, 26 Jan 2017 22:10:53 +0000 (23:10 +0100)]
Fix `org-property-inherit-p'

* lisp/org.el (org-property-inherit-p): Properties are case insensitive.

4 weeks agoChange :version in defcustoms from "25.2" to "26.1"
Kyle Meyer [Thu, 26 Jan 2017 04:39:18 +0000 (23:39 -0500)]
Change :version in defcustoms from "25.2" to "26.1"

* lisp/ob-J.el (org-babel-J-command):
* lisp/ob-core.el (org-babel-hash-show-time):
* lisp/ob-exp.el (org-babel-exp-inline-code-template):
* lisp/ob-lisp.el (org-babel-lisp-eval-fn):
* lisp/org-agenda.el (org-agenda-view-columns-initially):
* lisp/org-attach.el (org-attach-commit):
(org-attach-archive-delete):
(org-attach-annex-auto-get):
* lisp/org-bibtex.el (org-bibtex-inherit-tags):
* lisp/org-clock.el (org-clock-into-drawer):
* lisp/org-colview.el (org-columns-summary-types):
* lisp/org-faces.el (org-block):
* lisp/org-src.el (org-src-block-faces):
* lisp/org-table.el (org-table-copy-increment):
(org-table-formula-create-columns):
(org-table-convert-region-max-lines):
* lisp/org-timer.el (org-timer-default-timer):
* lisp/org.el (org-export-backends):
(org-show-context-detail):
(org-cycle-hook):
(org-occur-case-fold-search):
(org-preview-latex-default-process):
(org-preview-latex-process-alist):
(org-preview-latex-image-directory):
(org-latex-default-packages-alist):
(org-sparse-tree-default-date-type):
(org-structure-template-alist):
(org-effort-durations):
(org-agenda-ignore-properties): Change :version from "25.2" to "26.1".
(customize-package-emacs-version-alist): Fix associations between Org
and Emacs releases.
* lisp/ox-ascii.el (org-ascii-list-margin):
* lisp/ox-beamer.el (org-beamer-subtitle-format):
* lisp/ox-html.el (org-html-format-headline-function):
(org-html-format-inlinetask-function):
(org-html-viewport):
* lisp/ox-latex.el (org-latex-caption-above):
(org-latex-prefer-user-labels):
(org-latex-subtitle-format):
(org-latex-hyperref-template):
(org-latex-footnote-defined-format):
(org-latex-images-centered):
(org-latex-default-figure-position):
(org-latex-text-markup-alist):
(org-latex-format-inlinetask-function):
(org-latex-custom-lang-environments):
(org-latex-compiler-file-string):
(org-latex-compiler):
(org-latex-bib-compiler):
(org-latex-logfiles-extensions):
(org-latex-known-warnings):
* lisp/ox-md.el (org-md-footnotes-section):
(org-md-footnote-format):
* lisp/ox-odt.el (org-odt-format-headline-function):
(org-odt-format-inlinetask-function):
(org-odt-inline-image-rules):
* lisp/ox-texinfo.el (org-texinfo-format-headline-function):
* lisp/ox.el (org-export-with-creator):
(org-export-with-title):
(org-export-with-broken-links):
(org-export-copy-to-kill-ring): Change :version from "25.2" to "26.1".

It looks like the goal is to sync Org 9.0.* (maint) with the Emacs
master branch (what will be version 26.1):
https://lists.gnu.org/archive/html/emacs-orgmode/2017-01/msg00558.html

4 weeks agoClean up spacing to pass Emacs's pre-commit check
Kyle Meyer [Thu, 26 Jan 2017 03:21:00 +0000 (22:21 -0500)]
Clean up spacing to pass Emacs's pre-commit check

Like 00dacdcc5 (2015-08-10), this is in preparation for syncing with
the Emacs repo.

4 weeks agoob-core: Move org-babel-local-file-name to org-compat.el
Kyle Meyer [Thu, 26 Jan 2017 02:34:58 +0000 (21:34 -0500)]
ob-core: Move org-babel-local-file-name to org-compat.el

* lisp/ob-core.el (org-babel-process-file-name): Move to
org-compat.el.
* lisp/org-compat.el (org-babel-local-file-name): Add compatibility
alias.

4 weeks agoBackport commit 22946702b from Emacs
Michael Albinus [Sun, 20 Nov 2016 15:29:47 +0000 (16:29 +0100)]
Backport commit 22946702b from Emacs

* lisp/ob-core.el (org-babel-local-file-name): Use `file-local-name'
when available.

22946702b4296c0e42e4baf6221e205b52d05cbf
Michael Albinus
Sun Nov 20 16:29:47 2016 +0100

4 weeks agoorg-clock: Correct file name in header
Kyle Meyer [Thu, 26 Jan 2017 02:20:14 +0000 (21:20 -0500)]
org-clock: Correct file name in header

* lisp/org-clock.el (org-clock-save): Use the variable
org-clock-persist-file as the file name in the header rather than
hardcoding it to "org-persist.el".

From the introduction of org-clock-save in 6ca205398 (Add clock
persistence., 2008-10-23), the hardcoded file name did not match the
value of org-clock-persist-file.

4 weeks agoorg-agenda: Fix docstring typo
Kyle Meyer [Thu, 26 Jan 2017 01:48:41 +0000 (20:48 -0500)]
org-agenda: Fix docstring typo

* lisp/org-agenda.el (org-agenda-custom-commands): Fix docstring typo.

4 weeks agoFix `org-schedule' with repeater
Nicolas Goaziou [Wed, 25 Jan 2017 22:27:33 +0000 (23:27 +0100)]
Fix `org-schedule' with repeater

* lisp/org.el (org--deadline-or-schedule): New function.
(org-schedule):
(org-deadline): Use new function.

* testing/lisp/test-org.el (test-org/deadline):
(test-org/schedule): New tests.

Reported-by: Michael Welle <mwe012008@gmx.net>
<http://permalink.gmane.org/gmane.emacs.orgmode/111569>

4 weeks agoox-html: Remove <p> tag around block images when using HTML5
Nicolas Goaziou [Tue, 24 Jan 2017 21:22:47 +0000 (22:22 +0100)]
ox-html: Remove <p> tag around block images when using HTML5

* lisp/ox-html.el (org-html--wrap-image): Do not add a spurious <p>
  tag when using <figure> to mark images.

Reported-by: Matt Price <moptop99@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/111568>

4 weeks agoFix `org-entry-get' with "TIMESTAMP" or "TIMESTAMP_IA" release_9.0.4
Nicolas Goaziou [Tue, 24 Jan 2017 21:01:19 +0000 (22:01 +0100)]
Fix `org-entry-get' with "TIMESTAMP" or "TIMESTAMP_IA"

* lisp/org.el (org-entry-properties): Fix special property value in
  current entry, do not leak into next entry.
* testing/lisp/test-org.el (test-org/entry-properties): Add test.

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

4 weeks agoox-html: Fix missing space in coderef links
Nicolas Goaziou [Tue, 24 Jan 2017 17:19:23 +0000 (18:19 +0100)]
ox-html: Fix missing space in coderef links

* lisp/ox-html.el (org-html-link): Add missing space.

Reported-by: dmg <dmg@turingmachine.org>
<http://permalink.gmane.org/gmane.emacs.orgmode/111625>

4 weeks agoorg-agenda: Fix `org-agenda-list-stuck-projects'
Nicolas Goaziou [Tue, 24 Jan 2017 17:14:39 +0000 (18:14 +0100)]
org-agenda: Fix `org-agenda-list-stuck-projects'

* lisp/org-agenda.el (org-agenda-list-stuck-projects): Fix thinko
  introduced in 7c3e0b0fd.

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

4 weeks ago`org-entry-delete' can remove erroneous special properties
Nicolas Goaziou [Sun, 22 Jan 2017 13:28:02 +0000 (14:28 +0100)]
`org-entry-delete' can remove erroneous special properties

* lisp/org.el (org-entry-delete): Also remove erroneously inserted
  special properties in properties drawer.  Small refactoring.

* testing/lisp/test-org.el (test-org/entry-delete): Add test.

Reported-by: Michael Welle <mwe012008@gmx.net>
<http://permalink.gmane.org/gmane.emacs.orgmode/111564>

4 weeks agoorg-agenda: TODO keywords are case sensitive in stuck projects
Nicolas Goaziou [Sun, 22 Jan 2017 12:53:20 +0000 (13:53 +0100)]
org-agenda: TODO keywords are case sensitive in stuck projects

* lisp/org-agenda.el (org-agenda-list-stuck-projects): Search for
  stuck projects is case sensitive since TODO keywords are.

Reported-by: Guy Mayraz <guy.mayraz@unimelb.edu.au>
<http://permalink.gmane.org/gmane.emacs.orgmode/111529>

4 weeks agoorg-info: Add tests
Nicolas Goaziou [Sat, 21 Jan 2017 12:56:58 +0000 (13:56 +0100)]
org-info: Add tests

* testing/lisp/test-org-info.el: New file.

4 weeks agoorg-info: Fix HTML export of info link
Chunyang Xu [Thu, 19 Jan 2017 17:51:38 +0000 (01:51 +0800)]
org-info: Fix HTML export of info link

* org-info.el (org-info--map-node-url): New function.
(org-info-export): Use the new function.

TINYCHANGE

4 weeks agoorg-element: Fix failing test
Nicolas Goaziou [Sat, 21 Jan 2017 10:58:42 +0000 (11:58 +0100)]
org-element: Fix failing test

* testing/lisp/test-org-element.el (test-org-element/cache): Fix
  failing test.

4 weeks agoox: Add some autoload cookies
Nicolas Goaziou [Sat, 21 Jan 2017 10:44:29 +0000 (11:44 +0100)]
ox: Add some autoload cookies

* lisp/ox.el (org-export-get-backend): Autoload.  Small refactoring.
(org-export-get-environment): Autoload.

4 weeks agoRename `org-latex--make-preamble' into `org-latex-make-preamble'
Nicolas Goaziou [Sat, 21 Jan 2017 10:31:25 +0000 (11:31 +0100)]
Rename `org-latex--make-preamble' into `org-latex-make-preamble'

* contrib/lisp/ox-koma-letter.el (org-koma-letter-template):
* lisp/org.el (org-create-formula-image):
* lisp/ox-beamer.el (org-beamer-template):
* lisp/ox-latex.el (org-latex-make-preamble): Renamed from
  `org-latex--make-preamble'.  Add an optional argument.  Autoload
  function.
(org-latex-template): Use new function name.

4 weeks agoorg-element: Disable cache by default
Nicolas Goaziou [Sat, 21 Jan 2017 09:40:39 +0000 (10:40 +0100)]
org-element: Disable cache by default

* lisp/org-element.el (org-element-use-cache): Set default value to
  nil.

Using cache introduces Emacs' freezes under not well known
circumstances.  Until this is sorted out, this variable should be nil,
at least on "maint" branch.

5 weeks agoox-latex: Fix insertion of line breaks at invalid locations
Nicolas Goaziou [Wed, 18 Jan 2017 22:30:01 +0000 (23:30 +0100)]
ox-latex: Fix insertion of line breaks at invalid locations

* lisp/ox-latex.el (org-latex-clean-invalid-line-breaks): New function.

Reported-by: Takeshi Teshima <takeshi.diadochos@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/111313>

5 weeks agoorg-clone-subtree-with-time-shift: Fix SHIFT check
Kyle Meyer [Wed, 18 Jan 2017 01:46:06 +0000 (20:46 -0500)]
org-clone-subtree-with-time-shift: Fix SHIFT check

* lisp/org.el (org-clone-subtree-with-time-shift): Don't choke on a
  blank SHIFT argument.
* testing/lisp/test-org.el (test-org/clone-with-time-shift): Add
  test.

This fixes a regression introduced by c31462f33.

5 weeks agoCorrect an org-clone-subtree-with-time-shift test
Kyle Meyer [Wed, 18 Jan 2017 01:59:49 +0000 (20:59 -0500)]
Correct an org-clone-subtree-with-time-shift test

* testing/lisp/test-org.el (test-org/clone-with-time-shift): Remove
  the SHIFT argument from a test case to match the intention of the
  test.

5 weeks agoorg-colview: Fix summary computation in agenda
Nicolas Goaziou [Tue, 17 Jan 2017 11:00:49 +0000 (12:00 +0100)]
org-colview: Fix summary computation in agenda

* lisp/org-colview.el (org-agenda-colview-summarize): Do not include
  already summarized values in current summary.

5 weeks agoorg-colview: Fix missing agenda summary if org-agenda-overriding-header is set
Nicolas Goaziou [Tue, 17 Jan 2017 10:35:05 +0000 (11:35 +0100)]
org-colview: Fix missing agenda summary if org-agenda-overriding-header is set

* lisp/org-colview.el (org-agenda-colview-summarize): Do not ignore
  first agenda line when displaying summaries.

This fixes a regression introduced in
279902ca4da4fe5f0ceff801a3aab51b942b42b7.

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

5 weeks agoSmall fix
Nicolas Goaziou [Tue, 17 Jan 2017 08:59:53 +0000 (09:59 +0100)]
Small fix

* lisp/org.el (org-clone-subtree-with-time-shift): Handle nil shift
  case.

5 weeks agoFix `org-clone-subtree-with-time-shift'
Nicolas Goaziou [Tue, 17 Jan 2017 08:49:48 +0000 (09:49 +0100)]
Fix `org-clone-subtree-with-time-shift'

* lisp/org.el (org-clone-subtree-with-time-shift): Fix commit
  8fc9ab83b. Small refactoring.
* testing/lisp/test-org.el (test-org/clone-with-time-shift): Add
  tests.

Reported-by: Kyle Meyer <kyle@kyleam.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/111477>

5 weeks agotest-org: Add test
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.

5 weeks 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>

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

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

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

5 weeks 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>

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

7 weeks 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".

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

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

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

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

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

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