org-mode.git
4 hours agoorg-colview: Fix columnview table master
Nicolas Goaziou [Thu, 11 Feb 2016 23:38:52 +0000]
org-colview: Fix columnview table

* lisp/org-colview.el (org-columns-capture-view): Properties are not
  case sensitive.
(org-dblock-write:columnview): Take into consideration stars turned into
spaces (i.e., invisible leading stars) when computing heading level.
Also do not assume "ITEM" is always in the first column of the table.

Reported-by: Axel Kielhorn <org-mode@axelkielhorn.de>
<http://permalink.gmane.org/gmane.emacs.orgmode/105051>

17 hours agoSilence byte-compiler
Nicolas Goaziou [Thu, 11 Feb 2016 10:32:14 +0000]
Silence byte-compiler

* lisp/org-agenda.el (org-agenda-current-date): New variable.
(org-agenda-get-day-entries):
* lisp/org.el (org-calendar-holiday): Use new variable.

18 hours agoMerge branch 'maint'
Nicolas Goaziou [Thu, 11 Feb 2016 08:50:55 +0000]
Merge branch 'maint'

18 hours agoorg-element: Fix search failed error in `org-element-context' maint
Nicolas Goaziou [Thu, 11 Feb 2016 08:47:54 +0000]
org-element: Fix search failed error in `org-element-context'

* lisp/org-element.el (org-element-context): Make sure point is on tag
  line before searching for it.

* testing/lisp/test-org-element.el (test-org-element/context): Add test.
  Small refactoring.

Reported-by: Kaushal Modi <kaushal.modi@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/105018>

19 hours agoox-coq.el: Clean up
Alan Schmitt [Wed, 10 Feb 2016 08:34:37 +0000]
ox-coq.el: Clean up

* lisp/ob-coq.el: Create a variable `coq-program-name' and remove unused
  `org-babel-coq-eoe'.

  (org-babel-coq-initiate-session): Use `coq-program-name'.

27 hours agoob-core: Silence byte-compiler
Nicolas Goaziou [Wed, 10 Feb 2016 23:54:12 +0000]
ob-core: Silence byte-compiler

27 hours agoMerge branch 'maint'
Nicolas Goaziou [Wed, 10 Feb 2016 23:49:59 +0000]
Merge branch 'maint'

27 hours agoorg-archive: Speed-up archiving subtrees
Nicolas Goaziou [Wed, 10 Feb 2016 23:47:55 +0000]
org-archive: Speed-up archiving subtrees

* lisp/org-archive.el (org-toggle-archive-tag): Use `org-flag-subtree',
  which is much faster than outline-hide-subtree'.

Reported-by: Michael Ziems <michael.ziems@xiron.de>
<http://permalink.gmane.org/gmane.emacs.orgmode/105005>

28 hours agoob-lob: Improve `org-babel-lob-get-info' consistency
Nicolas Goaziou [Wed, 10 Feb 2016 23:32:07 +0000]
ob-lob: Improve `org-babel-lob-get-info' consistency

* lisp/ob-lob.el (org-babel-lob-get-info): Make the function on par with
  `org-babel-get-src-block-info' by providing the beginning position of
  Babel code.

(org-babel-lob-execute):
* lisp/ob-exp.el (org-babel-exp-process-buffer):
(org-babel-exp-results): Handle new data.

28 hours agoob: Refactor `org-babel-read-result'
Nicolas Goaziou [Wed, 10 Feb 2016 21:58:00 +0000]
ob: Refactor `org-babel-read-result'

* lisp/ob-core.el (org-babel-read-result): Refactor code.
(org-babel-read-table):
(org-babel-read-list):
(org-babel-read-link): Fix docstring.
(org-babel-read-element): Fix indentation for example blocks.

28 hours agoob: Remove variables related to inline Babel code
Nicolas Goaziou [Wed, 10 Feb 2016 21:47:09 +0000]
ob: Remove variables related to inline Babel code

* lisp/ob-lob.el (org-babel-block-lob-one-liner-regexp):
(org-babel-inline-lob-one-liner-regexp):
(org-babel-lob-one-line-regexp):
* lisp/ob-core.el (org-babel-inline-src-block-regexp): Remove variables.

(org-babel-map-inline-src-blocks):
(org-babel-map-call-lines):
(org-babel-map-executables):
(org-babel-execute-buffer):
* lisp/ob-exp.el (org-babel-exp-process-buffer):
(org-babel-exp-results): Do not use removed variables.

Babel now mostly uses the parser to handle Babel code.  Regexps are not
needed anymore.

28 hours agoob: Remove `org-babel-inline-lob-one-line-matches'
Nicolas Goaziou [Wed, 10 Feb 2016 18:26:58 +0000]
ob: Remove `org-babel-inline-lob-one-line-matches'

* lisp/ob-core.el (org-babel-inline-lob-one-liner-matches): Remove now
  unused function.

28 hours agoob: Remove `org-babel-get-inline-src-block-matches'
Nicolas Goaziou [Wed, 10 Feb 2016 15:06:41 +0000]
ob: Remove `org-babel-get-inline-src-block-matches'

* lisp/ob-core.el (org-babel-get-inline-src-block-matches): Remove
  function.
(org-babel-when-in-src-block):
(org-babel-insert-result): Do not use removed function.

(org-babel-remove-inline-result): Add an optional argument for a tiny
speed-up.

* testing/examples/babel.org:
* testing/lisp/test-ob.el (test-ob/inline-src_blk-default-results-replace-line-1):
  Remove needless tests.

28 hours agoob: Rewrite `org-babel-get-src-block-info' using parser
Nicolas Goaziou [Tue, 9 Feb 2016 23:22:09 +0000]
ob: Rewrite `org-babel-get-src-block-info' using parser

* lisp/ob-core.el (org-babel-get-src-block-info): Rewrite function.
  Change signature.
(org-babel-parse-src-block-match):
(org-babel-parse-inline-src-block-match): Remove functions.
(org-babel-execute-src-block): Remove useless function call.

* lisp/ob-exp.el (org-babel-exp-process-buffer): Make use of signature
  change.
(org-babel-exp-results): Use new return value from
`org-babel-get-src-block-info'.  Tiny refactoring.

* testing/lisp/test-ob.el (test-ob/nested-code-block): Fix test.
* contrib/lisp/org-eldoc.el (org-eldoc-get-src-lang): Use parser instead
  of removed function.

* testing/examples/babel.org: Fix test environment.

28 hours agoob-exp: Tiny fix
Nicolas Goaziou [Wed, 10 Feb 2016 13:48:06 +0000]
ob-exp: Tiny fix

* lisp/ob-exp.el (org-babel-exp-do-export): Fix wrong use for `case'.

28 hours agoRemove `org-babel-in-example-or-verbatim'
Nicolas Goaziou [Sun, 7 Feb 2016 22:19:28 +0000]
Remove `org-babel-in-example-or-verbatim'

* lisp/ob-exp.el (org-babel-in-example-or-verbatim): Remove function.

* testing/lisp/test-ob.el (test-ob/combining-scalar-and-raw-result-types):
Update test.

This function is unused and inaccurate.  If needed, the parser should be
used instead.

28 hours agoFix `org-babel-where-is-src-block-result'
Nicolas Goaziou [Wed, 3 Feb 2016 23:26:38 +0000]
Fix `org-babel-where-is-src-block-result'

* lisp/ob-core.el (org-babel--insert-results-keyword):
(org-babel--clear-results-maybe): New functions.
(org-babel-where-is-src-block-result): Rewrite function.  Improve
accuracy, in particular when RESULTS is not the closest affiliated
keyword from the results.

* testing/lisp/test-ob.el (test-ob/where-is-src-block-result): New test.

37 hours agoReplace TBLNAME with NAME in tests
Nicolas Goaziou [Wed, 3 Feb 2016 23:06:08 +0000]
Replace TBLNAME with NAME in tests

* testing/examples/ob-C-test.org:
* testing/examples/ob-fortran-test.org:
* testing/examples/ob-maxima-test.org:
* testing/lisp/test-ob-python.el (test-ob-python/colnames-yes-header-argument-again):
(test-ob-python/colnames-no-header-argument-again):
* testing/lisp/test-ob.el (test-ob/do-not-resolve-to-partial-names-data):
  Use NAME instead of TBLNAME.

TBLNAME is deprecated syntax since Org 8.

37 hours agoob-core: Distinguish between NAME and RESULTS keyword
Nicolas Goaziou [Wed, 3 Feb 2016 23:03:34 +0000]
ob-core: Distinguish between NAME and RESULTS keyword

* lisp/ob-core.el (org-babel-name-regexp): New variable.
(org-babel-result-regexp): Only match RESULTS lines.  Lessen matching
groups.
(org-babel-result-w-name-regexp): Fix regexp.  Add a docstring.
(org-babel-named-data-regexp-for-name): Use new variable.
(org-babel-current-result-hash):
(org-babel-set-current-result-hash):
(org-babel-hide-hash):
(org-babel-result-names):
(org-babel-where-is-src-block-result): Apply changes above.

37 hours agoFix some tests' prefix
Nicolas Goaziou [Thu, 28 Jan 2016 22:15:36 +0000]
Fix some tests' prefix

* testing/lisp/test-ob.el (test-ob/indented-cached-org-bracket-link):
(test-ob/multi-line-header-regexp):
(test-ob/src-block-regexp):
(test-ob/default-inline-header-args):
(test-ob/get-src-block-info-language):
(test-ob/get-src-block-info-body):
(test-ob/get-src-block-info-tangle):
(test-ob/elisp-in-header-arguments):
(test-ob/simple-named-code-block):
(test-ob/simple-variable-resolution):
(test-ob/multi-line-header-arguments):
(test-ob/parse-header-args):
(test-ob/parse-header-args2):
(test-ob/inline-src-blocks):
(test-ob/org-babel-get-inline-src-block-matches):
(test-ob/inline-src_blk-default-results-replace-line-1):
(test-ob/inline-src_blk-default-results-replace-line-2):
(test-ob/inline-src_blk-manual-results-replace):
(test-ob/inline-src_blk-results-silent):
(test-ob/inline-src_blk-results-raw):
(test-ob/inline-src_blk-results-file):
(test-ob/inline-src_blk-results-scalar):
(test-ob/inline-src_blk-results-verbatim):
(test-ob/combining-scalar-and-raw-result-types):
(test-ob/no-defaut-value-for-var):
(test-ob/just-one-results-block):
(test-ob/nested-code-block):
(test-ob/partial-nested-code-block):
(test-ob/inline-src_blk-preceded-punct-preceded-by-point):
(test-ob/file-ext-and-output-dir):
(test-ob/script-escape):
(test-ob/process-params-no-duplicates):
(test-ob/check-eval): Use "test-ob" instead of "test-org-babel".

37 hours agoob-core: Prevent false positive in `org-find-named-result'
Nicolas Goaziou [Thu, 28 Jan 2016 23:29:59 +0000]
ob-core: Prevent false positive in `org-find-named-result'

* lisp/ob-core.el (org-babel-find-named-result): Prevent false positive
  using parser.
(org-babel-current-result-hash):
(org-babel-set-current-result-hash):
(org-babel-where-is-src-block-result): Do not rely on some undocumented
match data.

* testing/lisp/test-ob.el (test-ob/find-name-result): New test.

37 hours agoob: Remove indentation information from Babel properties
Nicolas Goaziou [Thu, 28 Jan 2016 16:11:48 +0000]
ob: Remove indentation information from Babel properties

* lisp/ob-core.el (org-babel-get-src-block-info): Do not return block
  indentation.
(org-babel-parse-src-block-match): Ignore block indentation.
(org-babel-demarcate-block): Find appropriate indentation instead of
using the one from the original block.
(org-babel-where-is-src-block-result): Change signature.  Indent
according to context instead of relying on indentation from original
block.
(org-babel-insert-result): Change signature.
(org-babel-check-confirm-evaluate):
(org-babel-execute-src-block):
(org-babel-insert-header-arg): Apply change to src-block info.

* lisp/ob-exp.el (org-babel-exp-process-buffer): Apply change to
  src-block info.

* lisp/ob-lob.el (org-babel-lob-get-info): Do not return indentation.
(org-babel-lob-execute): Apply change to lob-info.

Indentation from source block is often wrong at the block and its
results may not be in the same context.

37 hours agoob: Optimize `org-babel-lob-get-info'
Nicolas Goaziou [Thu, 28 Jan 2016 10:18:50 +0000]
ob: Optimize `org-babel-lob-get-info'

* lisp/ob-core.el (org-babel-goto-named-src-block): Use parser instead
  of `org-babel-lob-one-liner-regexp'.
* lisp/ob-lob.el (org-babel-lob-execute-maybe): Ignore spurious check,
  now handled by the parser.
(org-babel-lob-get-info): Fully use parser.  Accept a new optional
argument to avoid parsing the same location twice.

* lisp/ob-exp.el (org-babel-exp-process-buffer):
* lisp/ob-ref.el (org-babel-ref-resolve): Optimize call to
  `org-babel-lob-get-info'.

37 hours agoParse inline src blocks and babel calls with newlines
Nicolas Goaziou [Wed, 30 Dec 2015 22:59:57 +0000]
Parse inline src blocks and babel calls with newlines

* lisp/org-element.el (org-element--pair-round-table):
(org-element--pair-curly-table): New variables.
(org-element-inline-babel-call-parser):
(org-element-inline-src-block-parser): Allow newline characters in
contents and parameters.

* testing/lisp/test-org-element.el (test-org-element/inline-babel-call-parser):
(test-org-element/inline-src-block-parser): Add test.

38 hours agoorg-element: Fix src-block interpreter
Nicolas Goaziou [Wed, 10 Feb 2016 13:11:48 +0000]
org-element: Fix src-block interpreter

* lisp/org-element.el (org-element-src-block-interpreter): Fix function
  according to previous change.

2 days agoorg-element: Do not alter indentation upon parsing
Nicolas Goaziou [Tue, 9 Feb 2016 22:19:20 +0000]
org-element: Do not alter indentation upon parsing

* lisp/org-element.el (org-element-src-block-parser):
(org-element-example-block-parser): Do not remove any indentation when
  parsing the element.
* testing/lisp/test-org-element.el (test-org-element/src-block-parser):
* testing/lisp/test-org-element.el (test-org-element/src-block-parser):
  Update test.

Properly handling indentation requires knowing about
`org-src-preserve-indentation''s value.  This is out of the scope of the
parser.

2 days agoob-sql.el: fix typo preventing mysql table headers from being parsed
Gary Oberbrunner [Tue, 9 Feb 2016 21:16:53 +0000]
ob-sql.el: fix typo preventing mysql table headers from being parsed

* ob-sql.el (org-babel-execute:sql): fix typo (introduced in 8c2e232)
which prevented correct parsing of mysql table headers.

2 days agoMerge branch 'maint'
Nicolas Goaziou [Tue, 9 Feb 2016 20:55:00 +0000]
Merge branch 'maint'

2 days agoox-odt: Fix End of file during parsing error
Nicolas Goaziou [Tue, 9 Feb 2016 20:52:10 +0000]
ox-odt: Fix End of file during parsing error

* lisp/ox-odt.el (org-odt-template): Do not call `read' on an empty
  string.

Reported-by: Damien Cassou <damien@cassou.me>
<http://permalink.gmane.org/gmane.emacs.orgmode/104947>

3 days agoMerge branch 'maint'
Kyle Meyer [Tue, 9 Feb 2016 02:55:22 +0000]
Merge branch 'maint'

3 days agoBackport commit ec90220 from Emacs
Alan Mackenzie [Mon, 25 Jan 2016 12:35:15 +0000]
Backport commit ec90220 from Emacs

Expunge "allow" + infinitive from source and doc, part 2.
ec90220ac1bd81437654d07b769819e1dcd24de5
Alan Mackenzie
Mon Jan 25 12:35:15 2016 +0000

3 days agoColumn view: Use `org-hide-leading-stars'
Michael Brand [Mon, 8 Feb 2016 18:59:36 +0000]
Column view: Use `org-hide-leading-stars'

* lisp/org-colview.el (org-columns): Make building of the item stars
dependent on `org-hide-leading-stars'.

4 days agoMerge branch 'maint'
Kyle Meyer [Sun, 7 Feb 2016 16:56:36 +0000]
Merge branch 'maint'

4 days agoorg-capture: Document org-directory
Kyle Meyer [Sun, 7 Feb 2016 16:56:04 +0000]
org-capture: Document org-directory

* lisp/org-capture.el (org-capture-templates):
* doc/org.texi (Template elements): Document org-directory.

4 days ago`org-file-apps' add migration hint for function signature
Michael Brand [Sun, 7 Feb 2016 11:36:03 +0000]
`org-file-apps' add migration hint for function signature

* lisp/org.el (org-open-file): Add a user error for when the function
signature does not match.

5 days agoMerge branch 'maint'
Nicolas Goaziou [Sat, 6 Feb 2016 23:04:27 +0000]
Merge branch 'maint'

5 days agoob-core: fix bug when source block is at bob
Aaron Ecay [Sat, 6 Feb 2016 22:01:22 +0000]
ob-core: fix bug when source block is at bob

* lisp/ob-core.el (org-babel-get-src-block-info): Fix bug.

5 days agoox-latex: Fix typo
Rasmus [Sat, 6 Feb 2016 14:52:29 +0000]
ox-latex: Fix typo

* lisp/ox-latex.el (org-latex-compiler-file-string): Fix typo.

Reported-by: Julien Cubizolles <j.cubizolles@free.fr>
<http://permalink.gmane.org/gmane.emacs.orgmode/104836>

5 days agoorg-attach.el: Get attachments from git annex
Erik Hetzner [Sat, 6 Feb 2016 12:16:52 +0000]
org-attach.el: Get attachments from git annex

* org-attach.el (org-attach-use-annex): New function to check if git
  annex should be used.
  (org-attach-annex-get-maybe): New function to get a file from git
  annex if necessary.
  (org-attach-annex-auto-get): New defcustom to determine behavior
  of org-attach-annex-get-maybe.
  (org-attach-open): Automatically get attached files from git annex when
  opening if necessary.
* testing/lisp/test-org-annex.el: New file for testing org-attach. Only
  contains code for testing org-attach with git annex at the moment.
* mk/targets.mk: Fix cleantest target so it can delete git annex repos.

5 days agoox-latex.el: Fix minted inline
Alan Schmitt [Fri, 5 Feb 2016 14:55:54 +0000]
ox-latex.el: Fix minted inline

* lisp/ox-latex.el (org-latex-inline-src-block): Output minted code that
  correctly formats code inline.

6 days agoFix (void-variable d) error
Nicolas Goaziou [Fri, 5 Feb 2016 23:19:02 +0000]
Fix (void-variable d) error

* lisp/org.el (org-check-before-date):
(org-check-after-date): Ensure D enters the lexical scope.

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

6 days agoorg-colview: Fix length of columns
Nicolas Goaziou [Fri, 5 Feb 2016 23:04:35 +0000]
org-colview: Fix length of columns

* lisp/org-colview.el (org-columns-display-here): Do not add star to
  headlines at the display level...
(org-columns): ... but when collecting values, here...
(org-agenda-columns): ... and there.

Reported-by: Michael Brand <michael.ch.brand@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/104846>

6 days agoMerge branch 'maint'
Nicolas Goaziou [Fri, 5 Feb 2016 22:01:32 +0000]
Merge branch 'maint'

6 days agoRemove `org-latex-fragment-image-overlays'
Nicolas Goaziou [Fri, 5 Feb 2016 21:47:14 +0000]
Remove `org-latex-fragment-image-overlays'

* lisp/org.el (org-latex-fragment-image-overlays): Remove variable.
(org--format-latex-make-overlay): Do not register anymore created
overlays in the removed variable.
(org--list-latex-overlays): New function.
(org-remove-latex-fragment-image-overlays): Use new function.
(org-context): Work around use of `org-latex-fragment-image-overlays'.

Reported-by: Dima Kogan <dima@secretsauce.net>
<http://permalink.gmane.org/gmane.emacs.orgmode/104822>

6 days agoMerge branch 'maint'
Nicolas Goaziou [Fri, 5 Feb 2016 17:39:49 +0000]
Merge branch 'maint'

6 days agoSilence byte-compiler
Nicolas Goaziou [Fri, 5 Feb 2016 17:39:06 +0000]
Silence byte-compiler

* lisp/org.el (org--format-latex-make-overlay): Silence byte-compiler.

6 days agoMerge branch 'maint'
Nicolas Goaziou [Fri, 5 Feb 2016 17:36:39 +0000]
Merge branch 'maint'

6 days agoorg-colview: Fix column view in agenda
Marco Wahl [Fri, 5 Feb 2016 10:56:01 +0000]
org-colview: Fix column view in agenda

* org-colview(org-columns-display-here): Fix for lines without level by
  giving them artificially level 0.

Idea: Exclude lines without level from column-view.

7 days agoRemove LaTeX overlay when text below is modified
Nicolas Goaziou [Thu, 4 Feb 2016 08:32:51 +0000]
Remove LaTeX overlay when text below is modified

* lisp/org.el (org--format-latex-make-overlay): New function.
(org-format-latex): Use new function.

Reported-by: Dima Kogan <dima@secretsauce.net>
<http://permalink.gmane.org/gmane.emacs.orgmode/104800>

7 days agoorg-colview: Add :indent parameter
Nicolas Goaziou [Thu, 4 Feb 2016 17:43:08 +0000]
org-colview: Add :indent parameter

* lisp/org-colview.el (org-dblock-write:columnview): Handle :indent
  parameter.
* doc/org.texi (Capturing column view): Document new feature.

7 days agoSpecial property "ITEM" contains headline without stars
Nicolas Goaziou [Thu, 4 Feb 2016 12:50:44 +0000]
Special property "ITEM" contains headline without stars

* lisp/org.el (org-entry-properties): "ITEM" contains headline without
  stars.
* lisp/org-colview.el (org-columns-display-here): Apply changes.
* doc/org.texi (Special properties): Update documentation.
* testing/lisp/test-org.el (test-org/entry-properties): Update tests.

7 days ago`org-file-apps' add migration hint
Michael Brand [Thu, 4 Feb 2016 17:41:30 +0000]
`org-file-apps' add migration hint

* lisp/org.el (org-file-apps): Add an error when still a sexp is in
use.

7 days agoorg-agenda: Fix org-agenda-filter-by-tag-refine
Kyle Meyer [Thu, 4 Feb 2016 04:39:24 +0000]
org-agenda: Fix org-agenda-filter-by-tag-refine

* lisp/org-agenda.el (org-agenda-filter-by-tag-refine): Remove command
  because this functionality is redundant with org-agenda-filter-by-tag
  as of 6c6ae99.

Reported-by: Viktor Rosenfeld <v.rosenfeld@gmx.de>
<http://permalink.gmane.org/gmane.emacs.orgmode/104605>

7 days agoMerge branch 'maint'
Kyle Meyer [Thu, 4 Feb 2016 04:37:26 +0000]
Merge branch 'maint'

7 days agoorg-agenda: Fix org-agenda-filter-by-tag-refine
Kyle Meyer [Thu, 4 Feb 2016 04:34:26 +0000]
org-agenda: Fix org-agenda-filter-by-tag-refine

* lisp/org-agenda.el (org-agenda-filter-by-tag-refine): Refine rather
  than exlude tags, reverting change from 6c6ae99.  Mark as obsolete
  because this functionality is now redundant with
  org-agenda-filter-by-tag.

Reported-by: Viktor Rosenfeld <v.rosenfeld@gmx.de>
<http://permalink.gmane.org/gmane.emacs.orgmode/104605>

7 days agoFix "it's" typos
Kyle Meyer [Thu, 4 Feb 2016 04:33:28 +0000]
Fix "it's" typos

* lisp/ob-C.el (org-babel-expand-body:cpp):
(org-babel-expand-body:C++):
(org-babel-expand-body:D):
(org-babel-expand-body:C):
(org-babel-C-expand-C++):
(org-babel-C-expand-C):
(org-babel-C-expand-D):
* lisp/ob-exp.el (org-babel-exp-src-block):
* lisp/ob-fortran.el (org-babel-expand-body:fortran):
* testing/org-test.el (org-test-buffer):
Correct "it's" typo in docstring.

* doc/org.texi:
Correct "it's" typos.

8 days ago`org-file-apps' accept functions instead of sexp
Nicolas Goaziou [Wed, 3 Feb 2016 17:30:17 +0000]
`org-file-apps' accept functions instead of sexp

* lisp/org.el (org-file-apps-defaults-macosx): Tiny re-ordering.
(org-file-apps-defaults-windowsnt): Default values provide functions
instead of sexp.
(org-file-apps): Use a function instead of a sexp.

See <http://permalink.gmane.org/gmane.emacs.orgmode/104272>.

9 days agoox-html: Fix org-html-table-row wrt lexical binding
Fabrice Popineau [Tue, 2 Feb 2016 23:10:24 +0000]
ox-html: Fix org-html-table-row wrt lexical binding

* lisp/ox-html.el (org-html-table-row-open-tag):
(org-html-table-row-close-tag): New variables.
(org-html-table-row-tags): Remove variable.

(org-html-table-row): Use new variables.

9 days agoFix `org-make-tags-matcher'
Nicolas Goaziou [Tue, 2 Feb 2016 21:57:56 +0000]
Fix `org-make-tags-matcher'

* lisp/org.el (org-make-tags-matcher): With no filter, match everything.

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

9 days agoResurrect `org-switchb'
Nicolas Goaziou [Tue, 2 Feb 2016 21:33:09 +0000]
Resurrect `org-switchb'

* lisp/org.el (org-switchb): New function.

This was removed by mistake in commit
8eb0ef0b427142bbbe6073e3f8f02c7fccd7217e.

9 days agoORG-NEWS: Document removal of ido and iswitchb variables
Nicolas Goaziou [Tue, 2 Feb 2016 21:23:02 +0000]
ORG-NEWS: Document removal of ido and iswitchb variables

9 days agoClean up ido and iswitchb left-overs
Nicolas Goaziou [Tue, 2 Feb 2016 21:05:22 +0000]
Clean up ido and iswitchb left-overs

* lisp/org.el (org-completion-use-ido):
(org-completion-use-iswitchb):
(org-completion-fallback-command): Remove variables.
(org-refile):
(org-set-effort):
(org-read-property-value): Apply variables removal.

(org-iread-file-name): Make it an obsolete alias for `read-file-name'.
(org-file-complete-link): Use `read-file-name'.

(org-switchb): Remove unused function.

Completion mechanisms are expected to be handled at a lower level,
e.g. in `read-file-name-function'.

9 days agoob-R: Silence byte-compiler
Nicolas Goaziou [Tue, 2 Feb 2016 17:02:08 +0000]
ob-R: Silence byte-compiler

* lisp/ob-R.el (org-babel-expand-body:R): Silence byte-compiler.

9 days agoMerge branch 'maint'
Nicolas Goaziou [Tue, 2 Feb 2016 16:51:33 +0000]
Merge branch 'maint'

9 days agoorg-compat: Fix error on newest Emacsen (>= 25)
Nicolas Goaziou [Tue, 2 Feb 2016 16:49:23 +0000]
org-compat: Fix error on newest Emacsen (>= 25)

* lisp/org-compat.el (org-move-to-column): Ensure `remove' is called on
a list.

Reported-by: Julien Cubizolles <j.cubizolles@free.fr>
<http://permalink.gmane.org/gmane.emacs.orgmode/104703>

9 days agolisp/ob-R.el: Rename graphics-file arg of org-babel-expand-body:R.
Charles Berry [Tue, 2 Feb 2016 03:34:34 +0000]
lisp/ob-R.el: Rename graphics-file arg of org-babel-expand-body:R.

* lisp/ob-R.el: (org-babel-expand-body:R) The third arg is now
  `graphics-file' with no `&' prefix, so edebug can instrument it.

11 days agoMerge branch 'maint'
Nicolas Goaziou [Sun, 31 Jan 2016 23:19:37 +0000]
Merge branch 'maint'

11 days agoorg-element: Disable cache for orgstruct-mode
Nicolas Goaziou [Sun, 31 Jan 2016 23:17:39 +0000]
org-element: Disable cache for orgstruct-mode

* lisp/org-element.el (org-element--cache-active-p):
(org-element-cache-reset): Do not activate cache outside Org buffers,
even if using "orgstruct-mode".

Reported-by: "Mark A. Hershberger" <mah@nichework.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/104648>

11 days agoMerge branch 'maint'
Nicolas Goaziou [Sun, 31 Jan 2016 23:02:08 +0000]
Merge branch 'maint'

11 days agoob-tangle: Fix :comment org behavior
Nicolas Goaziou [Sun, 31 Jan 2016 22:59:50 +0000]
ob-tangle: Fix :comment org behavior

* lisp/ob-tangle.el (org-babel-spec-to-string): Do not try to comment
  empty text.

Reported-by: Titus von der Malsburg <malsburg@posteo.de>
<http://permalink.gmane.org/gmane.emacs.orgmode/104637>

11 days agoMerge branch 'maint'
Nicolas Goaziou [Sun, 31 Jan 2016 22:32:07 +0000]
Merge branch 'maint'

11 days agoox-latex: Fix numbering of source blocks
Nicolas Goaziou [Sun, 31 Jan 2016 22:30:49 +0000]
ox-latex: Fix numbering of source blocks

* lisp/ox-latex.el (org-latex-src-block): Fix numbering reset on source
  blocks when using the listings package.

Reported-by: P-O Gustafsson <kullager@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/104650>

11 days agoMerge branch 'maint'
Nicolas Goaziou [Sun, 31 Jan 2016 22:23:13 +0000]
Merge branch 'maint'

11 days agoox-html: Properly encode links without a description
Nicolas Goaziou [Sun, 31 Jan 2016 22:21:34 +0000]
ox-html: Properly encode links without a description

* lisp/ox-html.el (org-html-link): Encode URI in default description
  when none is provided.

Reported-by: mail@fritzreichwald.de
<http://permalink.gmane.org/gmane.emacs.orgmode/104645>

11 days agoMerge branch 'maint'
Nicolas Goaziou [Sun, 31 Jan 2016 19:58:47 +0000]
Merge branch 'maint'

11 days agoob-core: Silence byte-compiler
Nicolas Goaziou [Sun, 31 Jan 2016 19:57:47 +0000]
ob-core: Silence byte-compiler

11 days agoMerge branch 'maint'
Nicolas Goaziou [Sun, 31 Jan 2016 19:47:06 +0000]
Merge branch 'maint'

11 days agoob-tangle: Fix `org-babel-tangle-jump-to-org'
Nicolas Goaziou [Sun, 31 Jan 2016 10:37:05 +0000]
ob-tangle: Fix `org-babel-tangle-jump-to-org'

* lisp/ob-tangle.el (org-babel-tangle-jump-to-org): Find correct
  location in the Org document.

* testing/lisp/test-ob-tangle.el (ob-tangle/jump-to-org): New test.

11 days agoob: Fix `org-babel-update-block-body'
Nicolas Goaziou [Sun, 31 Jan 2016 10:36:52 +0000]
ob: Fix `org-babel-update-block-body'

* lisp/ob-core.el (org-babel-update-block-body): Correctly handle block
  indentation.
(org-babel-where-is-src-block-head): Accept an optional argument in
order to avoid parsing twice the same element.

* testing/lisp/test-ob.el (org-test-ob/update-block-body): New test.

12 days agoorg-habit: Fix ++ repeaters handling
Nicolas Goaziou [Sat, 30 Jan 2016 23:06:29 +0000]
org-habit: Fix ++ repeaters handling

* lisp/org-habit.el (org-habit-build-graph): Fix algorithm handling "++"
  repeaters.

Reported-by: Yasushi SHOJI <yashi@atmark-techno.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/104582>

12 days agoorg-table: Fix ranges in `orgtbl-ascii-draw'
Michael Brand [Sat, 30 Jan 2016 15:30:52 +0000]
org-table: Fix ranges in `orgtbl-ascii-draw'

* lisp/org-table.el (orgtbl-ascii-draw): Fix float to integer
  conversion.
* testing/lisp/test-org-table.el (test-org-table/orgtbl-ascii-draw):
  Adapt test.

12 days agoorg-table: Add test for `orgtbl-ascii-draw'
Michael Brand [Sat, 30 Jan 2016 15:29:14 +0000]
org-table: Add test for `orgtbl-ascii-draw'

* testing/lisp/test-org-table.el (test-org-table/orgtbl-ascii-draw):
  New test.

13 days agoMerge branch 'maint'
Kyle Meyer [Fri, 29 Jan 2016 05:28:48 +0000]
Merge branch 'maint'

13 days agoorg-src: Use font-lock-ensure to highlight blocks
Kyle Meyer [Fri, 29 Jan 2016 05:10:08 +0000]
org-src: Use font-lock-ensure to highlight blocks

* lisp/org-src.el (org-src-font-lock-fontify-block): Use
  org-font-lock-ensure instead of font-lock-fontify-buffer.

This replacement has previously been made (f36b19e, d81e6b5) and then reverted
(99f9999, 003a0f1) twice because source blocks were not being reliably
highlighted when font-lock-ensure was used instead of
font-lock-fontify-buffer.  This was due to a bug in font-lock-ensure
that has now been fixed (see Emacs's 21beb19 and bug#22399).

font-lock-ensure was introduced after Emacs 24.5, so this issue only
pertains to users with a developmental version of Emacs.

13 days agoorg-compat: Update font-lock-ensure alias
Kyle Meyer [Fri, 29 Jan 2016 05:07:33 +0000]
org-compat: Update font-lock-ensure alias

* lisp/org-compat.el (org-font-lock-ensure): Add new alias that accepts
  the same number of arguments as font-lock-ensure does.  Use an org-
  prefix.
* lisp/org-clock.el (org-clock-get-clocktable):
* lisp/org.el (org-fontify-like-in-org-mode):
* lisp/ox-html.el (org-html-fontify-code):
* lisp/ox-odt.el (org-odt-do-format-code):
* lisp/ox-org.el (org-org-publish-to-org): Use org-font-lock-ensure.

See Emacs's bug#22399.

2 weeks agoMerge branch 'maint'
Nicolas Goaziou [Thu, 28 Jan 2016 23:53:58 +0000]
Merge branch 'maint'

2 weeks agoorg-macro: Fix expansion in narrowed buffers
Nicolas Goaziou [Thu, 28 Jan 2016 23:52:49 +0000]
org-macro: Fix expansion in narrowed buffers

* lisp/org-macro.el (org-macro-replace-all): Expand macro even outside
  narrowed part of the buffer.

* testing/lisp/test-org-macro.el (test-org/macro-replace-all): Add test.

Reported-by: Kaushal Modi <kaushal.modi@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/104562>

2 weeks agoImprove compilation checks for some back-ends
Nicolas Goaziou [Thu, 28 Jan 2016 09:02:04 +0000]
Improve compilation checks for some back-ends

* contrib/lisp/ox-groff.el (org-groff-compile):
* lisp/ox-man.el (org-man-compile):
* lisp/ox-texinfo.el (org-texinfo-compile): Check more carefully if
  output file was produced.

2 weeks agoMerge branch 'maint'
Nicolas Goaziou [Tue, 26 Jan 2016 23:33:15 +0000]
Merge branch 'maint'

2 weeks agoorg-table: Fix table formulas editing
Nicolas Goaziou [Tue, 26 Jan 2016 23:28:56 +0000]
org-table: Fix table formulas editing

* lisp/org-table.el (org-table-show-reference): Do not move point
  outside the table when editing formulas.  Fix docstring.

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

2 weeks agoox-latex: Use `cl-subseq' instead of `org-sublist'
Nicolas Goaziou [Tue, 26 Jan 2016 22:05:04 +0000]
ox-latex: Use `cl-subseq' instead of `org-sublist'

* lisp/ox-latex.el (org-latex-compile): Use `cl-subseq' instead of
  `org-sublist'.

2 weeks agoMerge branch 'maint'
Nicolas Goaziou [Tue, 26 Jan 2016 22:03:11 +0000]
Merge branch 'maint'

2 weeks agoox-latex: PDF generation timestamp check
Anthony Cowley [Thu, 14 Jan 2016 23:13:45 +0000]
ox-latex: PDF generation timestamp check

* lisp/ox-latex.el (org-latex-compile): Improve timestamp check on HFS+
  filesystem by only considering 1-second clock resolution.

Previously, the call to (current-time) could return a timestamp with
a non-zero microsecond or picosecond fields, while the file attribute
always has zeros for these fields.  The check that the generated file is
newer than the reference timestamp only succeeded when the time to
generate the file crossed a 1-second clock interval.

TINYCHANGE

2 weeks agoorg-element: Do not remove TAB characters from parsed text
Nicolas Goaziou [Tue, 26 Jan 2016 21:53:55 +0000]
org-element: Do not remove TAB characters from parsed text

* lisp/org-element.el (org-element--parse-objects): Do not remove TAB
  characters from plain text.
(org-element-normalize-contents): Handle TAB characters in indentation.

* testing/lisp/test-org-element.el (test-org-element/normalize-contents):
Update test.

2 weeks agoorg-element: Small speed-up
Nicolas Goaziou [Thu, 21 Jan 2016 17:43:20 +0000]
org-element: Small speed-up

* lisp/org-element.el (org-element--parse-objects): Add an optional
  argument to avoid walking a secondary string twice.  Make less
  consing.
(org-element--parse-elements): Make less consing.
(org-element-headline-parser):
(org-element-inlinetask-parser):
(org-element-item-parser):
(org-element-parse-secondary-string): Apply changes.

2 weeks agoorg-element: Fix `org-element-set-contents'
Nicolas Goaziou [Thu, 21 Jan 2016 17:42:24 +0000]
org-element: Fix `org-element-set-contents'

* lisp/org-element.el (org-element-set-contents): Fix return value when
  element is empty. Also make sure to always return the element.

2 weeks agoMerge branch 'maint'
Kyle Meyer [Tue, 26 Jan 2016 06:17:43 +0000]
Merge branch 'maint'

2 weeks agoob-core: Fix comment typo from Emacs's 1203e8a
Kyle Meyer [Tue, 26 Jan 2016 06:13:51 +0000]
ob-core: Fix comment typo from Emacs's 1203e8a

2 weeks agoBackport commit 1203e8a from Emacs
Stefan Monnier [Mon, 25 Jan 2016 15:11:31 +0000]
Backport commit 1203e8a from Emacs

* lisp/ob-core.el (org-babel-check-confirm-evaluate)
(org-babel-map-src-blocks): Don't emit warnings if added vars are not used.
(*this*): Declare as dyn-bound.
(org-babel-expand-src-block, org-babel-load-in-session)
(org-babel-switch-to-session-with-code, org-babel-get-rownames):
Mark unused args.
(org-babel-combine-header-arg-lists): Remove unused var `args'.

* lisp/org-src.el (org-inhibit-startup):
Declare as dyn-bound.

lisp/org: Fix some compiler warnings
1203e8aecb7f49621af52cc13bc0e4427545dd4f
Stefan Monnier
Mon Jan 25 10:11:31 2016 -0500

2 weeks agoFix logic when activating plain links
Rafael Laboissiere [Mon, 25 Jan 2016 16:09:23 +0000]
Fix logic when activating plain links

* lisp/org.el: Activate plain link when point is outside a tag, instead
  of the other way around.

TINYCHANGE