org-mode.git
27 hours agoorg-element: Remove :alt-title property for headlines master
Nicolas Goaziou [Wed, 28 Jan 2015 10:41:39 +0000]
org-element: Remove :alt-title property for headlines

* lisp/org-element.el (org-element-headline-parser): Remove :alt-title.
* lisp/ox.el (org-export-get-alt-title): Check regular :ALT_TITLE
  property instead of :alt-title.

`:alt-title' is an export-specific property. As a consequence, it's
value doesn't need to be parsed at "org-element.el"'s level. There, it
is treated as a regular property : `ALT_TITLE'.

This also removes the last call to
`org-element-parse-secondary-string' from "org-element.el".

27 hours agoox-ascii: Fix indentation for description lists with links in tags
Nicolas Goaziou [Wed, 28 Jan 2015 10:29:43 +0000]
ox-ascii: Fix indentation for description lists with links in tags

* lisp/ox-ascii.el (org-ascii--current-text-width): Compute contents'
  text width according to exported tag instead of original one.

Reported-by: Rasmus <rasmus@gmx.us>
<http://permalink.gmane.org/gmane.emacs.orgmode/94416>

40 hours agoorg-element: Avoid `org-element-parse-secondary-string'
Nicolas Goaziou [Tue, 27 Jan 2015 21:25:15 +0000]
org-element: Avoid `org-element-parse-secondary-string'

* lisp/org-element.el (org-element-headline-parser,
  org-element-inlinetask-parser, org-element-item-parser,
  org-element--collect-affiliated-keywords): Use
  `org-element--parse-objects' instead of
  `org-element-parse-secondary-string' when parsing live objects in
  secondary strings.

`org-element-parse-secondary-string' parses a given string in
a temporary buffer, rendering buffer position related
properties (e.g., :begin) invalid.

Reported-by: John Kitchin <johnrkitchin@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/94397>

45 hours agoorg-element: Tiny refactoring
Nicolas Goaziou [Tue, 27 Jan 2015 16:49:22 +0000]
org-element: Tiny refactoring

* lisp/org-element.el (org-element-headline-interpreter,
  org-element-inlinetask-interpreter): Use format control string
  instead of calling `char-to-string'.

47 hours agoMerge branch 'master' of orgmode.org:org-mode
Nicolas Goaziou [Tue, 27 Jan 2015 14:35:56 +0000]
Merge branch 'master' of orgmode.org:org-mode

2 days agoox-html: Remove extra HTML_HEAD, HTML_HEAD_EXTRA
Rasmus [Tue, 27 Jan 2015 02:27:33 +0000]
ox-html: Remove extra HTML_HEAD, HTML_HEAD_EXTRA

* ox-html.el (html): Fix typo.

2 days agocontrib/README: more precise doc about org-eww.el
Marco Wahl [Mon, 26 Jan 2015 23:50:40 +0000]
contrib/README: more precise doc about org-eww.el

Actually using the same wording as for org-w3m.el now.

2 days agoorg-element: Tiny refactoring
Nicolas Goaziou [Mon, 26 Jan 2015 18:45:45 +0000]
org-element: Tiny refactoring

* lisp/org-element.el (org-element-map): Reduce consing and improve
  readability at the price of a tiny code duplication.

3 days agocontrib: Fix error messages.
Aaron Ecay [Mon, 26 Jan 2015 07:54:17 +0000]
contrib: Fix error messages.

* contrib/lisp/ob-eukleides.el (org-babel-execute:eukleides):
* contrib/lisp/ob-oz.el (org-babel-execute:oz):
* contrib/lisp/ob-tcl.el (org-babel-prep-session:tcl):
(org-babel-tcl-evaluate):
* contrib/lisp/org-contacts.el (org-contacts-view-send-email):
* contrib/lisp/org-drill.el (org-drill-hide-heading-at-point):
* contrib/lisp/org-mew.el (org-mew-search):
(org-mew-capture):
* contrib/lisp/org-toc.el (org-toc-forward):
* contrib/lisp/ox-freemind.el (org-freemind--build-node-contents): Fix
formatting of error messages.

3 days agoFix error messages.
Aaron Ecay [Mon, 26 Jan 2015 07:53:15 +0000]
Fix error messages.

* lisp/ob-coq.el (org-babel-coq-initiate-session):
* lisp/ob-latex.el (org-babel-execute:latex):
* lisp/org-macro.el (org-macro-replace-all):
* lisp/org.el (org--get-display-dpi): Fix formatting of error
messages.

4 days agoorg-element: Optimize `org-element-map'
Nicolas Goaziou [Sun, 25 Jan 2015 11:32:03 +0000]
org-element: Optimize `org-element-map'

* lisp/org-element.el (org-element--parsed-properties-alist): New
  variable.
(org-element-map): Remove unnecessary funcalls.  Externalize some
computations in the variable above.

4 days agorework fix in82599d37e1 to use should-error macro
Achim Gratz [Sun, 25 Jan 2015 10:15:10 +0000]
rework fix in82599d37e1 to use should-error macro

* testing/lisp/test-org-table.el: Use `should-error' instead of
  `condition-case' as that is what ERT provides for these sort of
  tests.

4 days agocompatibility fixes for fda70440f4
Achim Gratz [Sun, 25 Jan 2015 10:20:02 +0000]
compatibility fixes for fda70440f4

* testing/lisp/test-ob-lob.el (test-ob-lob/call-with-header-arguments):
  Replace `cl-letf' with `letf' for compatibility with older Emacsen.
* testing/lisp/test-org-timer.el (test-org-timer/other-timer-error):
  Also check for 'error since 'user-error is not used by older Emacsen.

4 days agoob-core: Fix error messages
Nicolas Goaziou [Sat, 24 Jan 2015 22:20:46 +0000]
ob-core: Fix error messages

* lisp/ob-core.el (org-babel--script-escape-inner,
  org-babel-script-escape): Error messages do not end with a full
  stop.

5 days agoox: Prune parse tree before calling tree filter
Nicolas Goaziou [Fri, 23 Jan 2015 22:59:23 +0000]
ox: Prune parse tree before calling tree filter

* lisp/ox.el (org-export-collect-tree-properties): Do not
  set :ignore-list.
(org-export--populate-ignore-list): Remove function.
(org-export--selected-trees): Small refactoring.
(org-export-prune-tree): New function.
(org-export-remove-uninterpreted-data): Fix docstring.
(org-export-as): Prune tree before calling tree filter.

* testing/lisp/test-ox.el (org-test-with-parsed-data): Fix macro.

This patch introduces two changes in the export process:

  1. Non-exported elements are removed from the tree instead of being
     moved into an ignore list (with the exceptions of tables rows
     and cells)

  2. Parse tree filter is called on the tree being exported, not the
     original one.

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

5 days agoob-R: Convert some defvars to defconsts.
Aaron Ecay [Fri, 23 Jan 2015 17:31:33 +0000]
ob-R: Convert some defvars to defconsts.

* lisp/ob-R.el (org-babel-R-eoe-indicator):
(org-babel-R-eoe-output): Convert from defvar to defconst.
(org-babel-R-write-object-command): Convert from defvar to defconst.
Add line breaks and indentation.

5 days agobabel: fix up org-babel-script-escape
Aaron Ecay [Fri, 16 Jan 2015 22:47:32 +0000]
babel: fix up org-babel-script-escape

* lisp/ob-core.el (org-babel--script-escape-inner): New function.
(org-babel-script-escape): Use it.
* testing/lisp/test-ob.el (test-org-babel/script-escape): New test.

5 days agobabel: Remove functions which are just indirection around org-babel-script-escape
Aaron Ecay [Fri, 16 Jan 2015 22:42:04 +0000]
babel: Remove functions which are just indirection around org-babel-script-escape

* lisp/ob-groovy.el (org-babel-groovy-table-or-string): Remove.
(org-babel-groovy-evaluate): Call `org-babel-script-escape' instead.
* lisp/ob-haskell.el (org-babel-haskell-table-or-string): Remove.
(org-babel-execute:haskell): Call `org-babel-script-escape' instead.
* lisp/ob-io.el (org-babel-io-table-or-string): Remove.
(org-babel-io-evaluate):Call `org-babel-script-escape' instead.
* lisp/ob-scala.el (org-babel-scala-table-or-string): Remove.
(org-babel-scala-evaluate): Call `org-babel-script-escape' instead.

5 days agobabel: Remove functions which are never called.
Aaron Ecay [Fri, 16 Jan 2015 22:40:24 +0000]
babel: Remove functions which are never called.

* lisp/ob-awk.el (org-babel-awk-table-or-string):
* lisp/ob-shell.el (org-babel-sh-table-or-results): Remove.

6 days agotest-org-src: Fix failing tests
Nicolas Goaziou [Thu, 22 Jan 2015 23:24:29 +0000]
test-org-src: Fix failing tests

* testing/lisp/test-org-src.el (test-org-src/basic,
  test-org-src/empty-block): Do not rely on `word-at-point'.

6 days agoorg-table: Fix typo
Nicolas Goaziou [Thu, 22 Jan 2015 23:16:58 +0000]
org-table: Fix typo

* lisp/org-table.el (org-table-show-reference): Fix typo.

7 days agoob-python: Convert two defvars to defconsts.
Aaron Ecay [Thu, 22 Jan 2015 06:55:23 +0000]
ob-python: Convert two defvars to defconsts.

* lisp/ob-python.el (org-babel-python-wrapper-method):
(org-babel-python-pp-wrapper-method): Convert from defvar to defconst.

7 days agoObsolete ‘org-at-regexp-p’.
Aaron Ecay [Thu, 22 Jan 2015 06:39:37 +0000]
Obsolete ‘org-at-regexp-p’.

* lisp/org.el (org-at-regexp-p): Remove, adding an obsolete function
alias.
(org-in-regexp): Tidy docstring.
(org-open-at-point):
(org-between-regexps-p):
* lisp/org-table.el (org-table-fedit-shift-reference):
(org-table-show-reference): Call ‘org-in-regexp’ instead.

7 days agotest: Fixes for running tests interactively.
Aaron Ecay [Thu, 22 Jan 2015 05:59:04 +0000]
test: Fixes for running tests interactively.

* testing/examples/babel.org: Change spaces to dashes in  #+name
lines.

* testing/lisp/test-ob-exp.el (org-test-with-expanded-babel-code):
(ob-exp/evaluate-all-executables-in-order):
(ob-exp/exports-inline-code):
(ob-exp/exports-inline):
(ob-exp/exports-inline-code-double-eval):
(ob-exp/exports-inline-code-eval-code-once):
(ob-exp/exports-inline-code-double-eval-exports-both):
(ob-exp/use-case-of-reading-entry-properties):
(ob-exp/export-from-a-temp-buffer):
(ob-export/export-with-results-before-block):
(ob-export/export-under-commented-headline):
* testing/lisp/test-ob-lob.el (test-ob-lob/export-lob-lines):
* testing/lisp/test-ob.el (test-org-babel/inline-src_blk-default-results-replace-line-1):
(test-org-babel/inline-src_blk-default-results-replace-line-2):
(test-org-babel/inline-src_blk-manual-results-replace):
(test-org-babel/inline-src_blk-results-scalar):
(test-org-babel/inline-src_blk-results-verbatim):
(test-org-babel/inline-src_blk-preceded-punct-preceded-by-point):
* testing/lisp/test-ox.el (test-org-export/export-scope):
Bind ‘org-babel-inline-result-wrap’ and/or ‘org-export-babel-evaluate’
so tests work when users have customized these variables.

* testing/lisp/test-ob-exp.el (ob-export/export-with-results-before-block):
Add ‘org-trim’ where an extra newline was creeping in.

* testing/lisp/test-ob-lob.el (test-ob-lob/call-with-header-arguments):
Neutralize org-babel-insert-result, which was stomping on the buffer
contents and disrupting the test

* testing/lisp/test-org-element.el (test-org-element/block-switches):
Replace (should (and ...)) with multiple (should ...).  This gives
more precise indications of what is wrong when a test fails.
(test-org-element/link-parser): Require org-docview.

* testing/lisp/test-org-timer.el (test-org-timer/other-timer-error):
Add the error type for ‘should-error’.

* testing/lisp/test-ox.el (test-org-export/set-title):
(test-org-export/handle-options):
(test-org-export/with-timestamps):
(test-org-export/comment-tree):
(test-org-export/handle-inlinetasks): Let
‘org-export-filter-body-functions’ and
‘org-export-filter-final-output-functions’ to nil where an empty
string is the expected result.  ‘org-export-filter-apply-functions’
treats an empty string as special, and changes it to nil.  This
creates test failures when the user has customized these variables.

* testing/org-test.el (org-test-with-temp-text): Let ‘org-mode-hook’
to nil.
(org-test-table-target-expect): Require ert since this function calls
some of its should* functions.

7 days agobabel: Fix bug in ‘org-babel-lob-get-info’.
Aaron Ecay [Thu, 22 Jan 2015 05:47:48 +0000]
babel: Fix bug in ‘org-babel-lob-get-info’.

* lisp/ob-lob.el (org-babel-lob-get-info): Use `save-match-data'.

Callers rely on the match data being set to
‘org-babel-lob-one-liner-regexp’.

7 days agobabel: Fix bug in org-babel-get-inline-src-block-matches.
Aaron Ecay [Thu, 22 Jan 2015 05:44:42 +0000]
babel: Fix bug in org-babel-get-inline-src-block-matches.

* lisp/ob-core.el (org-babel-get-inline-src-block-matches): Use
`org-looking-at-p' instead of `thing-at-point'.

The latter could give odd results depending on the syntax table.  In
particular, for me (thing-at-point 'word) was returning src_foo in
this context.

7 days agoox: Fix docstrings
Nicolas Goaziou [Wed, 21 Jan 2015 23:23:06 +0000]
ox: Fix docstrings

* lisp/ox.el (org-export-dictionary, org-export-translate): Fix spaces
  at the end of sentences.  Do not upcase `car' and `cdr'.

7 days agoox: Remove `org-export-ignore-element'
Nicolas Goaziou [Wed, 21 Jan 2015 23:11:35 +0000]
ox: Remove `org-export-ignore-element'

* lisp/ox.el (org-export-ignore-element): Remove function.
(org-export-collect-tree-properties): Do not assume users can
modify :ignore-list export property.

* testing/lisp/test-ox.el (test-org-export/user-ignore-list): Remove
  test.

:ignore-property is an implementation detail, which should not be
exposed to users.  Also, it is easier to simply remove the element to
ignore from the parse tree with `org-element-extract-element'.

7 days agoorg.texi: Minor fixes
Nicolas Goaziou [Wed, 21 Jan 2015 22:50:19 +0000]
org.texi: Minor fixes

* doc/org.texi (Export settings): Add UNNUMBERED property to concept
  index.  Fix number of spaces at the end of a sentence.  Use @code
  instead of @samp for reserved properties.

7 days agoFix docstrings
Nicolas Goaziou [Wed, 21 Jan 2015 22:44:21 +0000]
Fix docstrings

* lisp/org.el (org-next-visible-heading,
  org-previous-visible-heading): Shorten summary.  Fix typo.

7 days agoorg.texi: Documentation for 464cd96
rasmus [Wed, 21 Jan 2015 17:04:14 +0000]
org.texi: Documentation for 464cd96

* org.texi (Export settings): Document the UNNUMBERED property.

8 days agoAdd new functions to move to the next/prev headline skipping inline tasks.
Aaron Ecay [Mon, 19 Jan 2015 04:57:55 +0000]
Add new functions to move to the next/prev headline skipping inline tasks.

* lisp/org.el (org-next-visible-heading):
(org-previous-visible-heading): New functions.
(org-speed-commands-default, org-mode-map): Use them.

8 days agoob-asymptote, ob-emacs-lisp: remove spurious declare-function calls.
Aaron Ecay [Tue, 20 Jan 2015 23:41:30 +0000]
ob-asymptote, ob-emacs-lisp: remove spurious declare-function calls.

* lisp/ob-asymptote.el:
* lisp/ob-emacs-lisp.el: Remove spurious `declare-function's.

8 days agoox-rss: Handle RSS_TITLE property
Nicolas Petton [Tue, 20 Jan 2015 23:33:08 +0000]
ox-rss: Handle RSS_TITLE property

* contrib/lisp/ox-rss.el (org-rss-headline): Title use :RSS_TITLE
  instead of headline text, when available.

8 days agomacro: Implement argument extracting and escaping functions
Nicolas Goaziou [Tue, 20 Jan 2015 23:25:47 +0000]
macro: Implement argument extracting and escaping functions

* lisp/org-macro.el (org-macro-escape-arguments,
  org-macro-extract-arguments): New functions.

* lisp/org-element.el (org-element-macro-parser): Use new function.

* testing/lisp/test-org-macro.el (test-org-macro/escape-arguments,
  test-org-macro/extract-arguments): New tests.

8 days agoorg-index.el: bugfix for command occur
Marc-Oliver Ihm [Tue, 20 Jan 2015 21:00:26 +0000]
org-index.el: bugfix for command occur

8 days ago`org-open-link' follows timestamps in properties
Nicolas Goaziou [Tue, 20 Jan 2015 20:40:11 +0000]
`org-open-link' follows timestamps in properties

* lisp/org.el (org-open-at-point): Follow timestamps in properties
  drawers.  Refactor.

Suggested-by: Marco Wahl <marcowahlsoft@gmail.com>

9 days agoVersion 3.1.0 of org-index with rewritten command occur.
Marc-Oliver Ihm [Mon, 19 Jan 2015 20:25:58 +0000]
Version 3.1.0 of org-index with rewritten command occur.

10 days agoorg: Calculate dpi directly.
Aaron Ecay [Mon, 19 Jan 2015 05:19:27 +0000]
org: Calculate dpi directly.

* lisp/org.el (org--get-display-dpi): New function.
(org-create-formula-image-with-dvipng):
(org-create-formula-image-with-imagemagick): Use it.

The previous method tried to calculate the display dpi from the font
height, but this is wonky and not necessary, since it can be
calculated directly.

10 days agoorg.el: org-toggle-inline-images: Only display messsages when interactive.
Aaron Ecay [Mon, 19 Jan 2015 05:16:51 +0000]
org.el: org-toggle-inline-images: Only display messsages when interactive.

* lisp/org.el (org-toggle-inline-images): Only message if
called-interactively-p.

The old code made a halfhearted attempt to do this; this patch
provides the other half of the heart.

10 days agoob-ocaml: Add a cautionary comment about dodgy regex use.
Aaron Ecay [Mon, 19 Jan 2015 04:47:36 +0000]
ob-ocaml: Add a cautionary comment about dodgy regex use.

* lisp/ob-ocaml.el (org-babel-ocaml-read-list): Add comment

10 days agoorg-footnote: Use a simpler method to generate random labels.
Aaron Ecay [Mon, 19 Jan 2015 04:46:02 +0000]
org-footnote: Use a simpler method to generate random labels.

* lisp/org-footnote.el (org-footnote-new): Improve generation of
random labels.

10 days agoorg-compat: obsolete org-activate-mark.
Aaron Ecay [Mon, 19 Jan 2015 04:42:32 +0000]
org-compat: obsolete org-activate-mark.

* lisp/org-compat.el (org-activate-mark): Make obsolete.

The activate-mark function was introduced in Emacs 23 and
org-activate-mark wasn’t called anywhere in the code base.

10 days agoFix `org-set-visibility-according-to-property'
Nicolas Goaziou [Sun, 18 Jan 2015 16:00:49 +0000]
Fix `org-set-visibility-according-to-property'

* lisp/org.el (org-set-visibility-according-to-property): Ensure state
  is exctracted from a real node property.  Ignore narrowing.

11 days agoRemove `org-in-drawer-p'
Nicolas Goaziou [Sat, 17 Jan 2015 22:42:00 +0000]
Remove `org-in-drawer-p'

* lisp/org.el (org-in-drawer-p): Remove function.

The function is unused, and slightly wrong.

12 days agomanual: Further rewrite :session doc.
Aaron Ecay [Sat, 17 Jan 2015 03:36:00 +0000]
manual: Further rewrite :session doc.

* doc/org.texi (session): Spruce up.

12 days agomanual: Rewrite :session doc.
Thierry Pellé [Mon, 22 Dec 2014 09:39:16 +0000]
manual: Rewrite :session doc.

* doc/org.texi (session): Spruce up.

2 weeks agoorg.texi: Replace parenthesis comment style
rasmus [Tue, 13 Jan 2015 16:11:05 +0000]
org.texi: Replace parenthesis comment style

* org.texi (Table of contents): Replace parenthesis comment style with
  @r{} comment style in examples.

2 weeks agoFix "Args out of range" when demarcating blocks
Nicolas Goaziou [Tue, 13 Jan 2015 16:18:12 +0000]
Fix "Args out of range" when demarcating blocks

* lisp/ob-core.el (org-babel-demarcate-block): Return value from
  `org-babel-where-is-src-block-head' may be nil.

Reported-by: Sébastien Vauban
<http://permalink.gmane.org/gmane.emacs.orgmode/93978>

2 weeks agoob-core: Refactor `org-babel-where-is-src-block-head'
Nicolas Goaziou [Tue, 13 Jan 2015 16:16:45 +0000]
ob-core: Refactor `org-babel-where-is-src-block-head'

* lisp/ob-core.el (org-babel-where-is-src-block-head): Refactor.  In
  particular, do not return a marker, ever.  Also update docstring.
* testing/lisp/test-ob.el (test-ob/org-babel-remove-result--results-org):
  Fix tests containing invalid Org syntax.

2 weeks agoorg.texi: Fix typo
Nicolas Goaziou [Tue, 13 Jan 2015 14:20:47 +0000]
org.texi: Fix typo

* doc/org.texi (Table of contents): Fix typo.

2 weeks agoorg.texi: Footonote on titletoc-hyperref issue
rasmus [Tue, 13 Jan 2015 11:53:31 +0000]
org.texi: Footonote on titletoc-hyperref issue

* org.texi (Table of contents): Add footnote on hyperref and
titletoc conflict with LaTeX export.

2 weeks agoMerge branch 'maint'
Marco Wahl [Mon, 12 Jan 2015 12:02:20 +0000]
Merge branch 'maint'

2 weeks agoorg*.el: Fix call to calendar API maint
Marco Wahl [Mon, 12 Jan 2015 11:35:10 +0000]
org*.el: Fix call to calendar API

* lisp/org-clock.el: Replace occurances of
'calendar-absolute-from-iso' with 'calendar-iso-to-absolute'.

* lisp/org-agenda.el: Same as above.

* lisp/org.el: Same as above.

Some (long marked obsolete) calendar entities have been dropped from
Emacs recently.  One of those is 'calendar-absolute-from-iso'.

2 weeks agoox-html.el: Fix bug introduced in 077a24b
Rasmus [Mon, 12 Jan 2015 11:00:49 +0000]
ox-html.el: Fix bug introduced in 077a24b

* ox-html.el (org-html-format-list-item): Check that contents in
  non-nil.

2 weeks agoox: Implement local table of contents
Nicolas Goaziou [Sat, 25 Oct 2014 15:14:34 +0000]
ox: Implement local table of contents

* lisp/ox.el (org-export-collect-headlines): Allow to collect
  headlines locally.
* testing/lisp/test-ox.el (test-org-export/collect-headlines): Add
  tests.

* lisp/ox-ascii.el (org-ascii--build-toc):
(org-ascii-keyword):
* lisp/ox-html.el (org-html-toc):
(org-html-keyword):
* lisp/ox-odt.el (org-odt-toc): Allow local table of contents.
(org-odt--format-toc): New function.
(org-odt-begin-toc, org-odt-end-toc): Remove functions.

* lisp/ox-latex.el (org-latex-logfiles-extensions): Optionally remove
  "ptc" files.
(org-latex-headline, org-latex-keyword): Implement partial table of
contents assuming "titletoc" package is loaded.

* etc/ORG-NEWS:
* doc/org.texi (Table of contents): Document new parameter.

2 weeks agoorg.texi: Fix typo
Rasmus [Sat, 10 Jan 2015 23:33:44 +0000]
org.texi: Fix typo

* org.texi (Customizing tables in ODT export): Fix typo.

Reported by: Thomas <thomas@friendlyvillagers.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/93914>

2 weeks agoFix docstring
Oleh Krehel [Sat, 10 Jan 2015 21:27:17 +0000]
Fix docstring

* lisp/org.el (org-insert-time-stamp): Add a reference to
  `format-time-string'.

2 weeks agoox-html.el: Add exporting of priority
Zane D. Purvis [Sat, 10 Jan 2015 09:21:54 +0000]
ox-html.el: Add exporting of priority

* list/ox-html.el (org-html--priority): New function.
(org-html-format-headline-default-function): Call `org-html--priority'.
(org-html-style-default): Add `.priority'.

HTML export previously did not support exporting of priority simply by setting
`org-export-with-priority' to `t'.

TINYCHANGE

2 weeks agoox-html.el: DONE is monospace for consistency
Zane D. Purvis [Fri, 9 Jan 2015 03:26:43 +0000]
ox-html.el: DONE is monospace for consistency

* lisp/ox-html.el (org-html-style-default): `.done' gets `font-family:
monospace;'

Other items on the headline that aren't the text itself are monospaced,
including non-DONE todo's.

TINYCHANGE

3 weeks agoorg-colview: Fix user properties display
Nicolas Goaziou [Wed, 7 Jan 2015 17:08:51 +0000]
org-colview: Fix user properties display

* contrib/lisp/org-colview-xemacs.el (org-columns-display-here):
(org-columns-display-here-title):
(org-columns-edit-value):
(org-columns-next-allowed-value):
(org-columns-new):
(org-columns-widen):
(org-columns-get-autowidth-alist):
(org-columns-update):
(org-columns-compute):
(org-agenda-columns):
(org-agenda-colview-summarize):
(org-agenda-colview-compute):

* lisp/org-colview.el (org-columns-display-here):
(org-columns-display-here-title):
(org-columns-edit-value):
(org-columns-next-allowed-value):
(org-columns-new):
(org-columns-widen):
(org-columns-get-autowidth-alist):
(org-columns-update):
(org-columns-compute):
(org-agenda-columns):
(org-agenda-colview-summarize):
(org-agenda-colview-compute): Properties are case-insensitive.

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

3 weeks agoorg-table: Fix `orgtbl-to-unicode'
Nicolas Goaziou [Tue, 6 Jan 2015 23:30:34 +0000]
org-table: Fix `orgtbl-to-unicode'

* lisp/org-table.el (orgtbl-to-unicode): Remove dummy property.

3 weeks agoox-latex: Ignore width parameter in tabular environment
Nicolas Goaziou [Tue, 6 Jan 2015 22:30:54 +0000]
ox-latex: Ignore width parameter in tabular environment

* lisp/ox-latex.el (org-latex--org-table): Ignore width parameter in
  tabular environment.

Reported-by: Giuseppe Lipari <giulipari@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/93815>

3 weeks agoFix `org-read-date-prefer-future' when rescheduling
Nicolas Goaziou [Tue, 6 Jan 2015 22:19:42 +0000]
Fix `org-read-date-prefer-future' when rescheduling

* lisp/org.el (org-read-date-analyze): When
  `org-read-date-prefer-future', offer a date in the future even if
  default date is different from now.

* testing/lisp/test-org.el (test-org/org-read-date): Add tests.

Reported-by: Rasmus <rasmus@gmx.us>
<http://permalink.gmane.org/gmane.emacs.orgmode/93805>

3 weeks agotest-org-clocktable: fix batch testing
Achim Gratz [Mon, 5 Jan 2015 19:20:07 +0000]
test-org-clocktable: fix batch testing

* testing/lisp/test-org-clock.el (test-org-clock/clocktable): New
  function, refactor the original test sequence.
  (test-org-clock/clocktable1, test-org-clock/clocktable2): New tests
  using the new function.

ert-deftest is a macro.  Let-binding a defvar before it is defined
causes the variable to be undefined later on, so the second test
fails for Emacsen that do not perform eager macro expansion.

3 weeks agoFix docstring
Nicolas Goaziou [Mon, 5 Jan 2015 16:47:53 +0000]
Fix docstring

* lisp/org.el (org-add-link-type): Remove reference to non-existent
  `org-export-normalize-links' function.

3 weeks agoorg-agenda: Fix issues with restoring windows
Kyle Meyer [Mon, 5 Jan 2015 03:18:46 +0000]
org-agenda: Fix issues with restoring windows

* lisp/org-agenda.el (org-agenda-prepare-window): Update window
  configuration even when agenda buffer exists in background.
* lisp/org-agenda.el (org-agenda-Quit): Use buffer value for
  org-agenda-pre-window-conf to allow for local values used with sticky
  agenda buffers.
* lisp/org-agenda.el (org-agenda-quit): Reset local, not global, value for
  org-agenda-pre-window-conf.
* lisp/org-agenda.el (org-agenda--quit): New function.

Update the pre-agenda window configuration on the next agenda call even
if org-agenda-pre-window-conf is non-nil (which occurs when the agenda
buffer is exited without q, Q, or X).  This prevents restoring a window
configuration that is not the one prior to the most recent agenda call.

Make org-agenda-Quit (Q) restore the buffer-local, not the global, value
for org-agenda-pre-window-conf so that it works correctly with sticky
agenda buffers.

Along with these changes, merge the duplicated functionality of
org-agenda-quit and org-agenda-Quit into a new function,
org-agenda--quit.

3 weeks agoorg-agenda: Track last indirect buffer
Kyle Meyer [Mon, 5 Jan 2015 03:18:40 +0000]
org-agenda: Track last indirect buffer

* lisp/org-agenda.el (org-agenda-tree-to-indirect-buffer): Record last
  indirect buffer for agenda.
* lisp/org-agenda.el (org-agenda-quit): Delete window for
  org-agenda-last-indirect-buffer, not org-last-indirect-buffer.

Introduce a new variable, org-agenda-last-indirect-buffer, that is
specific for the agenda (and perhaps a particular agenda buffer, if
org-agenda-sticky is set).  This prevents org-agenda-quit from deleting
a window if it is displaying a buffer that was created through a
org-tree-to-indirect-buffer call outside of
org-agenda-tree-to-indirect-buffer.

Make org-agenda-Quit check for indirect buffer windows, like
org-agenda-quit does.

3 weeks agoorg-table: Ignore filters and hooks in radio tables
Nicolas Goaziou [Mon, 5 Jan 2015 11:39:26 +0000]
org-table: Ignore filters and hooks in radio tables

* lisp/org-table.el (orgtbl-to-generic): Ignore user-defined filters
  and hooks.

* testing/lisp/test-org-table.el (test-org-table/to-generic): Add
  tests.

Suggested-by: Aaron Ecay <aaronecay@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/93795>

3 weeks agoImplement `org-export-custom-protocol-maybe' and use it
Nicolas Goaziou [Sun, 4 Jan 2015 20:54:41 +0000]
Implement `org-export-custom-protocol-maybe' and use it

* lisp/ox.el (org-export-custom-protocol-maybe): New function.
* contrib/lisp/ox-groff.el (org-groff-link):
* lisp/ox-ascii.el (org-ascii-link):
* lisp/ox-beamer.el (org-beamer-link):
* lisp/ox-html.el (org-html-link):
* lisp/ox-latex.el (org-latex-link):
* lisp/ox-man.el (org-man-link):
* lisp/ox-md.el (org-md-link):
* lisp/ox-odt.el (org-odt-link):
* lisp/ox-texinfo.el (org-texinfo-link): Use new function.

* testing/lisp/test-ox.el (test-org-export/custom-protocol-maybe): New
  test.

3 weeks agoox: Tiny refactoring
Nicolas Goaziou [Sun, 4 Jan 2015 20:13:27 +0000]
ox: Tiny refactoring

* lisp/ox.el (org-export-inline-image-p): Tiny refactoring.

3 weeks agoorg-agenda-Quit: Remove unnecessary function calls
Kyle Meyer [Fri, 2 Jan 2015 22:38:30 +0000]
org-agenda-Quit: Remove unnecessary function calls

* lisp/org-agenda.el (org-agenda-Quit): Remove unnecessary function calls.

- org-agenda-Quit turns off column view if it is active, instead of
  killing the agenda buffer, so there is no need to call
  org-columns-remove-overlays when killing the buffer.
- org-agenda-reset-markers is already called when the kill-buffer-hook
  is run.

3 weeks agoorg-agenda-exit: Check column view
Kyle Meyer [Fri, 2 Jan 2015 22:38:24 +0000]
org-agenda-exit: Check column view

* lisp/org-agenda.el (org-agenda-exit): Exit column view before trying to
  exit agenda.

Running org-agenda-exit in column view deleted all buffers loaded by the
agenda, but it didn't actually exit the agenda because, if the agenda is
in column view, org-agenda-Quit turns off column view instead of killing
the agenda.  So org-agenda-exit should either just quit column view if
it is active (and not delete the loaded buffers or quit the agenda) or
make sure that the agenda is not in column view before killing it.
Since org-agenda-Quit and org-agenda-quit already do the former, make
org-agenda-exit completely exit the agenda regardless of whether it is
in column view.

3 weeks agoorg-agenda: Fix exiting function docstrings
Kyle Meyer [Fri, 2 Jan 2015 22:38:19 +0000]
org-agenda: Fix exiting function docstrings

* lisp/org-agenda.el (org-agenda-Quit):
* lisp/org-agenda.el (org-agenda-quit):
* lisp/org-agenda.el (org-agenda-exit): Correct and expand docstrings.

3 weeks agoox-ascii: Handle (custom-)id links to unnumbered headlines
Nicolas Goaziou [Thu, 1 Jan 2015 20:37:35 +0000]
ox-ascii: Handle (custom-)id links to unnumbered headlines

* lisp/ox-ascii.el (org-ascii--describe-links): When a headline is
  unnumbered, refer to its title instead of dropping the ball.

3 weeks agoox-ascii: Handle custom export functions for links
Nicolas Goaziou [Thu, 1 Jan 2015 20:28:02 +0000]
ox-ascii: Handle custom export functions for links

* lisp/ox-ascii.el (org-ascii-link): Obey to export function provided
  through `org-add-link-type'.
(org-ascii--describe-links): Do not turn links above into notes.

4 weeks agoorg-table: Fix freeze with invalid hline reference
Nicolas Goaziou [Tue, 30 Dec 2014 21:37:44 +0000]
org-table: Fix freeze with invalid hline reference

* lisp/org-table.el (org-table-find-row-type): Don't end up on the
  last hline, which doesn't exist, per
  e793158bc8492752745170e20839ddbb613fcb63.

Reported-by: Artis Rozentāls <artis.rozentals@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/93654>

4 weeks agoorg.texi: Fix typo
Nick Dokos [Mon, 29 Dec 2014 17:15:46 +0000]
org.texi: Fix typo

* doc/org.texi (Headlines): Typo in footnote.

Reported-by: Daniel E. Doherty <ded-law@ddoherty.net>

5 weeks agoMerge branch 'include'
Rasmus [Wed, 24 Dec 2014 17:43:34 +0000]
Merge branch 'include'

5 weeks agoFix typo
Nicolas Goaziou [Wed, 24 Dec 2014 16:28:48 +0000]
Fix typo

* lisp/org.el (org-outline-level): Fix typo.

5 weeks agoox.el: Infer :minlevel for INCLUDE-keywords
Rasmus [Thu, 18 Dec 2014 15:48:49 +0000]
ox.el: Infer :minlevel for INCLUDE-keywords

* ox.el (org-export-expand-include-keyword): Infer :minlevel for
included Org documents if not set explicitly.
* test-ox.el (org-export-expand-include-keyword): Add tests for inferred :minlevel.

5 weeks agoox.el: Fix footnote-bug in #+INCLUDE-keyword
rasmus [Tue, 9 Dec 2014 11:40:52 +0000]
ox.el: Fix footnote-bug in #+INCLUDE-keyword

* ox.el (org-export--prepare-file-contents): Preserve footnotes
when using the LINES argument.  New optional argument FOOTNOTES.
 (org-export-expand-include-keyword): New optional argument
 FOOTNOTES.
* test-ox.el (test-org-export/expand-include): Add test for INCLUDE
  with :lines and footnotes.

5 weeks agoFix some tests when run interactively
Nicolas Goaziou [Wed, 24 Dec 2014 09:48:24 +0000]
Fix some tests when run interactively

* testing/lisp/test-ob.el (test-org-babel/nested-code-block,
  test-ob/blocks-with-spaces, test-ob/results-in-narrowed-buffer,
  test-ob/specific-colnames):
* testing/lisp/test-org-clock.el (test-org-clock/clocktable):
* testing/lisp/test-org-element.el (test-org-element/src-block-interpreter):
* testing/lisp/test-org-src.el (test-org-src/basic,
  test-org-src/empty-block, test-org-src/blank-line-block): Ensure
  default values are used for defcustoms.

5 weeks agotest-org-element: Fix test
Nicolas Goaziou [Wed, 24 Dec 2014 09:47:46 +0000]
test-org-element: Fix test

* testing/lisp/test-org-element.el (test-org-element/inlinetask-parser):
  Fix test: degenerate inlinetasks cannot contain planning info.

5 weeks agoob-core: Add safety test for results keyword value
Nicolas Goaziou [Wed, 24 Dec 2014 09:32:30 +0000]
ob-core: Add safety test for results keyword value

* lisp/ob-core.el (org-babel-results-keyword): Add safety test.  Fix
  docstring.

5 weeks agoob-core: Fix docstring
Nicolas Goaziou [Wed, 24 Dec 2014 09:29:44 +0000]
ob-core: Fix docstring

* lisp/ob-core.el (org-babel-results-keyword): NAME cannot be used for
  results, as it is a reserved affiliated keyword.

5 weeks agoFix false positive SCHEDULED lines in sparse tree
Nicolas Goaziou [Tue, 23 Dec 2014 11:22:16 +0000]
Fix false positive SCHEDULED lines in sparse tree

* lisp/org.el (org-check-before-date, org-check-after-date,
  org-check-dates-range): Make sure we're really at a timestamp before
  validating the entry.

Reported-by: James Harkins <jamshark70@qq.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/93126>

5 weeks agoImplement `org-at-planning-p'
Nicolas Goaziou [Tue, 23 Dec 2014 11:10:55 +0000]
Implement `org-at-planning-p'

* lisp/org.el (org-at-planning-p): New function.
* testing/lisp/test-org.el (test-org/at-planning-p): New test.

5 weeks agoCompare `org-current-level' and `org-outline-level'
Nicolas Goaziou [Tue, 23 Dec 2014 10:12:00 +0000]
Compare `org-current-level' and `org-outline-level'

* lisp/org.el (org-outline-level, org-current-level): Update
  docstrings to insist on the difference between the two functions.

5 weeks agoTiny refactoring
Nicolas Goaziou [Sun, 21 Dec 2014 23:09:08 +0000]
Tiny refactoring

* lisp/org.el (org-current-level): Tiny refactoring.

5 weeks agoFix typo
Nicolas Goaziou [Sun, 21 Dec 2014 22:39:38 +0000]
Fix typo

* lisp/org.el (org-re-timestamp): Fix typo introduced in
  eae19b1284db6b376ccfb3e9f5f44df456f43c1a.

5 weeks agoFix default value in `org-sparse-tree-default-date-type'
Nicolas Goaziou [Sun, 21 Dec 2014 22:12:59 +0000]
Fix default value in `org-sparse-tree-default-date-type'

* lisp/org.el (org-sparse-tree-default-date-type): Use new default
  value instead of the undocumented previous one.  Fix docstring, too.
(org-sparse-tree): Apply change to previous variable.
(org-re-timestamp): Apply change to previous variable.  Refactor code.

5 weeks agoorg-entities: Remove `replace-amp'
Nicolas Goaziou [Sun, 21 Dec 2014 21:34:03 +0000]
org-entities: Remove `replace-amp'

* lisp/org-entities.el (replace-amp): Remove function.

The function is unused throughout the code base and is in the wrong
namespace.

5 weeks agoMove `org-do-sort' into "org-table.el"
Nicolas Goaziou [Sun, 21 Dec 2014 21:23:11 +0000]
Move `org-do-sort' into "org-table.el"

* lisp/org.el (org-do-sort): Remove function.

* lisp/org-table.el (org-table--do-sort): New function.
(org-table-sort-lines): Use new function.

`org-do-sort' is really a helper function for `org-table-sort-lines',
which applies exclusively on tables.

5 weeks ago`org-outline-level' ignores narrowing
Nicolas Goaziou [Sun, 21 Dec 2014 21:14:26 +0000]
`org-outline-level' ignores narrowing

* lisp/org.el (org-outline-level): Ignore narrowing.  Refactor to be
  slightly faster.

5 weeks agoox-html.el: Trim list items
Rasmus [Tue, 16 Dec 2014 12:49:08 +0000]
ox-html.el: Trim list items

* ox-html.el (org-html-format-list-item): Trim contents to avoid
  spurious space.

5 weeks agoFix `org-log-beginning' on empty entries
Nicolas Goaziou [Sat, 20 Dec 2014 20:59:51 +0000]
Fix `org-log-beginning' on empty entries

* lisp/org.el (org-log-beginning): Check for the need to insert
  a drawer in all cases.

Suggested-by: Eric Abrahamsen <eric@ericabrahamsen.net>
<http://permalink.gmane.org/gmane.emacs.orgmode/93538>

5 weeks agoORG-NEWS: Document new table sorting options
Nicolas Goaziou [Sat, 20 Dec 2014 20:35:19 +0000]
ORG-NEWS: Document new table sorting options

5 weeks agoFix table sorting with ?F key
Nicolas Goaziou [Sat, 20 Dec 2014 20:29:51 +0000]
Fix table sorting with ?F key

* lisp/org.el (org-do-sort): Properly reverse results when ?F and
  a compare function is provided.  Small refactoring.

* testing/lisp/test-org-table.el (test-org-table/sort-lines): New
  test.

5 weeks agoorg.el: Implement user-defined table sorting
Jon Snader [Sat, 20 Dec 2014 18:13:17 +0000]
org.el: Implement user-defined table sorting

* lisp/org.el (org-do-sort): Implement the ?f and ?F sorting options
  to allow user-defined table sorting.  Update the DOC string.

* lisp/org-table (org-table-sort-lines): Add the GETKEY-FUNC and
  COMPARE-FUNC optional parameters and pass them to the call to
  `org-do-sort'.  Update the DOC string.

* doc/org.texi (org-table-sort-lines): Update documentation to reflect
  the addition of the ?f and ?F options.

This patch implements user-defined extraction and comparison functions
for table sorting.  Thanks to Nicolas Goaziou for helpful suggestions.

This patch was discussed on the Org Mode mailing list:
http://article.gmane.org/gmane.emacs.orgmode/93334