Commit Graph

17255 Commits

Author SHA1 Message Date
Nicolas Goaziou a833d35159 ox: Properly fix internal regexps after each buffer change
* lisp/ox.el (org-export-as): Refresh regexps before executing Babel
  code, running last hook and parsing buffer so precomputed regular
  expressions are correct at each of these steps.

This is not necessary before macros since those are not expected to
rely on computed expression.  Actually, advanced macros, i.e. with
"(eval ...)" syntax, could make use of them, but a Babel snippet is
more likely in this situation.

Reported-by: Robert Klein <RoKlein@roklein.de>
<http://permalink.gmane.org/gmane.emacs.orgmode/98550>
2015-06-25 15:09:20 +02:00
Eric S Fraga 0b0bbf6194 org-capture: Place capture buffer in other window
* org-capture.el (org-capture-fill-template): The capture template
  buffer will be displayed in another window, keeping original window
  visible if appropriate.
2015-06-25 14:21:56 +02:00
Grégoire Jadi 70bfa4027b lisp/org-agenda.el: Fix non-persistent category filters in sticky agenda
* lisp/org-agenda.el (org-agenda-prepare): Use the correct key for
  category filter.

`org-agenda-prepare-window' uses 'cat whereas `org-agenda-prepare' used 'car.
2015-06-24 09:51:39 +02:00
Grégoire Jadi e1e3b83b2b lisp/org-agenda.el: Fix non-persistent filters when refreshing sticky agenda
* lisp/org-agenda.el (org-agenda-prepare): Fix non-persistent filters when refreshing sticky agenda

When a sticky agenda is buried, then reviving and refreshing, existing
filters are ignored even when org-agenda-persistent-filter is `t'.

Reported and fixed by Daniel Borchmann
2015-06-24 09:51:34 +02:00
Philippe Crama 742d6f169f org-contacts.el: Catch `nextfile' in `org-contacts-db'
* org-contacts.el (org-contacts-db): Catch `nextfile'.

When a file in the list returned by the `org-contacts-files' function
doesn't exist and the user selects the option to attempt to remove it
from the `org-agenda-files' list, 'nextfile is thrown.  Catch it and
skip processing that file instead of failing.

TINYCHANGE
2015-06-23 23:47:46 +02:00
Alan Schmitt d828f789a9 org.texi: Fix the :post example
* doc/org.texi (post): Add a missing colon in the example.
2015-06-23 23:36:46 +02:00
Nicolas Goaziou b07bd32081 ox: Handle subtree properties referring to multiple options
* lisp/ox.el (org-export--get-subtree-options): When multiple options
  refer to the same keyword, and, as a consequence, to the same export
  property, make sure all of them get updated.
* testing/lisp/test-ox.el (test-org-export/get-subtree-options): Add
  test.

Reported-by: Myles English <mylesenglish@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/98583>
2015-06-23 22:09:43 +02:00
Rasmus 72f10cffce ox-koma-letter: Parse more keywords
* ox-koma-letter.el (koma-letter): Parse author, phone-number,
  opening, closing and signature.
  (org-koma-letter-template): parse closing.
2015-06-23 18:06:05 +02:00
Nicolas Goaziou 66686f69a5 ox-latex: Remove useless call to `org-latex--wrap-latex-math-block'
* lisp/ox-latex.el (org-latex-footnote-reference): Remove call to
  `org-latex--wrap-latex-math-block' since definitions are already
  taken care of at the filter parse tree level, since
  47265b31ca.
2015-06-23 15:31:09 +02:00
Nicolas Goaziou 47265b31ca ox: Add external footnotes definitions in parse tree
* lisp/ox.el (org-export-get-environment):
(org-export-collect-tree-properties):
Remove :footnote-definition-alist property.
(org-export-get-footnote-definition): Apply removal of property.

(org-export--merge-external-footnote-definitions): New function.
(org-export-as): Use new function.

* testing/lisp/test-ox.el (test-org-export/footnotes): Update tests.

This change allows to have all footnote definitions within the parse
tree, so they can be reached with, e.g., a parse tree filter.
2015-06-23 15:28:01 +02:00
Nicolas Goaziou 7ee2d93122 org-element: Implement `org-element-create'
* lisp/org-element.el (org-element-create): New function.
(org-element-adopt-elements): Small refactoring.
2015-06-23 15:22:03 +02:00
Nicolas Goaziou 0a45e4fcbc org.texi: Remove reference to unexistent filter
* doc/org.texi (Advanced configuration): Remove reference to
  quote-section filter.
2015-06-23 08:50:45 +02:00
Nicolas Goaziou 8ff31bd0cf ox-latex: Introduce :environment attribute for example blocks
* lisp/ox-latex.el (org-latex-example-block): Implement :environment
  attribute, which allows to override "verbatim" environment.
* doc/org.texi (@LaTeX{} specific attributes): Document change.
2015-06-23 08:43:07 +02:00
Kyle Meyer 329683861c org-clone-subtree-with-time-shift: Accept 0 clones
* lisp/org.el (org-clone-subtree-with-time-shift): Allow argument
  specifying number of clones to be 0.

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

This makes it possible to clone a subtree with a repeating timestamp
so that the repeater is removed from the original subtree and a single
shifted, repeating clone is created.  If the original subtree does not
have a repeating timestamp, no clones will be made.
2015-06-22 21:49:52 +02:00
Nicolas Goaziou 739853d128 Tiny speed-up for `org-entry-properties'
* lisp/org.el (org-entry-properties): Tiny speed-up.
* testing/lisp/test-org.el (test-org/entry-properties): Add test.
2015-06-22 10:01:51 +02:00
myq larson dd7f8af9f5 org.texi: Fix typo
* doc/org.texi (Timestamps): Fix typo.

TINYCHANGE
2015-06-21 00:00:04 +02:00
Nicolas Goaziou a0a8834f30 ox-koma-letter: Fix a docstring
* contrib/lisp/ox-koma-letter.el (org-koma-letter--special-contents-as-macro):
  Fix docstring.  Tiny refactoring.
2015-06-18 15:31:09 +02:00
Nicolas Goaziou e6f36cfe3a ox: Tiny refactoring
* lisp/ox.el (org-export-replace-region-by): Refactor.
2015-06-18 15:21:02 +02:00
Nicolas Goaziou e900ebed08 ob-core: Small refactoring
* lisp/ob-core.el (org-babel-params-from-properties): Refactor code to
  avoid nesting `mapcar' calls.
2015-06-17 11:55:57 +02:00
Nicolas Goaziou d1f9aa3a02 ox: Simplify fuzzy link matching
* lisp/ox.el (org-export-resolve-fuzzy-link): When a fuzzy link
  matches more than one headline, prefer the first one in the parse
  tree.

* testing/lisp/test-ox.el (test-org-export/fuzzy-link): Remove a test.

This behaviour is consistent with `org-open-at-point'.  Also, it
allows to cache destinations.
2015-06-16 23:24:42 +02:00
Nicolas Goaziou 2c27e85f11 Sanitize link encoding
* lisp/org.el (org-store-link): Improve docstring.
(org-make-link-string): Escape internal links only when absolutely
necessary.
(org-link-escape-chars): Add percent character.
(org-link-escape-chars-browser): Make space character more visible.
(org-link-escape): Refactor code.
(org-display-inline-images): Properly unescape path before creating
the link.
(org-extract-attributes): Remove function.

* lisp/ox.el (org-export-resolve-fuzzy-link): Decode path before
  resolving link.

* testing/lisp/test-ox.el (test-org-export/resolve-fuzzy-link): Add
  test.
2015-06-16 23:24:38 +02:00
Suvayu Ali 2cddb905a4 ox-beamer: Wrap labels in braces
* ox-beamer.el (org-beamer--get-label): Wrap labels in braces.

The colon in the label name causes an argument parsing problem, for
more see <http://tex.stackexchange.com/q/250640/4416>.
2015-06-16 21:30:41 +02:00
Nicolas Goaziou aea374680c Small refactoring
* lisp/org.el (org-link-unescape): Refactor code.
2015-06-16 16:53:46 +02:00
Nicolas Goaziou cf5fd31f0c ox-beamer: Add %R and %O placeholders for extra environments
* lisp/ox-beamer.el (org-beamer-environments-extra): Handle "%R" and
  "%O" placeholders.
(org-beamer--format-block): Fill template with appropriate values for
placeholders above.

Suggested-by: Suvayu Ali <fatkasuvayu+linux@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/98361>
2015-06-16 15:26:47 +02:00
Nicolas Goaziou a02b672f93 ox-beamer: Fix labels to headlines
* lisp/ox-beamer.el (org-beamer--get-label): Use headline's internal
  reference instead of using numbers.
2015-06-16 14:04:53 +02:00
Nicolas Goaziou 626caa4e9e ob-tangle: Silence byte-compiler 2015-06-16 00:09:20 +02:00
Nicolas Goaziou 90df55ea7b ob-tangle: Small refactoring
* lisp/ob-tangle.el (org-babel-tangle-collect-blocks): Refactor.
2015-06-15 21:38:14 +02:00
Nicolas Goaziou bfe1b2fbe2 ox-koma-letter: Fix void `with-title' variable
* contrib/lisp/ox-koma-letter.el (org-koma-letter-template): Let-bind
  `with-title'.

Reported-by: Thomas Holst <Thomas_Holst@gmx.de>
<http://permalink.gmane.org/gmane.emacs.orgmode/98349>
2015-06-15 18:49:24 +02:00
Nicolas Goaziou 182ff104b7 org-element: Fix cache bug for orphaned elements
* lisp/org-element.el (org-element--cache-sync-requests): Remove a now
  useless element from requests
(org-element--cache-submit-request): Apply change to sync request.
(org-element--cache-process-request): Apply change to sync requests.
Fix removal of orphaned elements, i.e., elements not affected by
a change, but with an ancestor that was.

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

Reported-by: Suvayu Ali <fatkasuvayu+linux@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/98260>
2015-06-14 14:52:04 +02:00
Nicolas Goaziou d3196f0539 ox-koma-letter: Fix missing \begin{document}
* contrib/lisp/ox-koma-letter.el (org-koma-letter-template): Insert
  "\begin{document}" even if :with-title and :with-subject are both
  nil.

Reported-by: Dieter Faulbaum <mail@faulbaum.in-berlin.de>
2015-06-11 22:44:39 +02:00
Nicolas Goaziou 6463b6c05d ox-koma-letter: Fix typo in docstring
* contrib/lisp/ox-koma-letter.el (org-koma-letter-prefer-subject): Fix
  typo.
2015-06-11 22:44:15 +02:00
Nicolas Goaziou b856f66892 ox-html: Prefer custom ID over internal references for links to headlines
* lisp/ox-html.el (org-html-link): Use custom ID if present instead of
  internal reference.

Reported-by: Oleh Krehel <ohwoeowho@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/98259>
2015-06-10 13:31:16 +02:00
Mike McLean e87e5a3c62 org-mac-link.el: Reduce Outlook App confusion
* org-mac-link.el (org-mac-outlook-message-open, org-as-get-selected-outlook-mail): Specify Microsoft Outlook.app non-ambiguously

If the user has:
- a virtual solution (Parallels, etc.)
- with Office for PC installed
- and configured to expose WinTel applications to the Macintosh Finder

The AppleScript commands may try to select the WinTel version of
"Microsoft Outlook". This—obviously—doesn’t work. By adding the Mac
~.app~ file extension and path, we reduce this confusion and more
reliably call the Macintosh version of Outlook.

TINYCHANGE

Signed-off-by: Alan Schmitt <alan.schmitt@polytechnique.org>
2015-06-10 08:15:58 +02:00
Arun Persaud e453a261a7 ox-html: Reorder output of meta data in head
* lisp/ox-html.el (org-html--build-meta-info): Charset and viewport
  meta data should come first in `head'.  Only reordered output, no
  other code changes.

See, for example:
  - https://code.google.com/p/doctype-mirror/wiki/MetaCharsetAttribute
  - http://getbootstrap.com/getting-started/#template

TINYCHANGE
2015-06-09 21:06:49 +02:00
Nicolas Goaziou 145ac49faf org-list: Silence byte-compiler 2015-06-09 17:14:13 +02:00
Nicolas Goaziou a4cc9d82d8 org-list: Fix checkbox update with inlinetasks
* lisp/org-list.el (org-update-checkbox-count): Change algorithm.  Use
  Element parser.

* testing/lisp/test-org-list.el (test-org-list/update-checkbox-count):
  New test.

Reported-by: Eric S Fraga <e.fraga@ucl.ac.uk>
<http://permalink.gmane.org/gmane.emacs.orgmode/97594>
2015-06-09 17:06:17 +02:00
Nicolas Goaziou 2e5981e003 org-element: Fix structure for list elements containing a drawer
* lisp/org-element.el (org-element--list-struct): Fix return value
  when a drawer is found within an item.
2015-06-09 17:05:21 +02:00
Nicolas Goaziou 3924989b4f org-table: Fix formulas with relative ranges in current row
* lisp/org-table.el (org-table-eval-formula): Fix formulas with
  relative ranges in current row.

Reported-by: Eric S Fraga <e.fraga@ucl.ac.uk>
<http://permalink.gmane.org/gmane.emacs.orgmode/97727>
2015-06-09 15:03:27 +02:00
Nicolas Goaziou c532ff36aa ox-latex: Fix b8ade2e79e
* lisp/ox-latex.el (org-latex-inline-src-block): Fix
  b8ade2e79e.
2015-06-07 15:18:38 +02:00
Nicolas Goaziou b8ade2e79e ox-latex: Do not use \verb command anymore
* lisp/ox-latex.el (org-latex-text-markup-alist): Remove \verb from
  default value.
(org-latex--protect-text): New function.
(org-latex--text-markup):
(org-latex-inline-src-block): Use new function.

Suggested-by: Titus von der Malsburg <malsburg@posteo.de>
<http://permalink.gmane.org/gmane.emacs.orgmode/98000>
2015-06-07 01:13:51 +02:00
Nicolas Goaziou 50ba0a5ed6 Fix 1a73641770
* lisp/org.el (org-icompleting-read): Let `completing-read' or
  equivalent sort out type of completion.
(org-olpath-completing-read): Revert partially
1a73641770.
2015-06-07 00:38:58 +02:00
Nicolas Goaziou 2f0bccad9c ORG-NEWS: Document changes to `org-timer-default-timer' 2015-06-06 09:30:07 +02:00
Nicolas Goaziou 9fd317b1b0 Fix logging in indirect buffers
* lisp/org.el (org-store-log-note): Ensure insertion point is
  available in the narrowed part of the current buffer.

Reported-by: Mark Edgington <edgimar@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/98152>
2015-06-06 09:08:46 +02:00
Nicolas Goaziou 9540ff8d7a Revert "ox-html.el (org-html-fontify-code): Possibly deactivate fci-mode"
This reverts commit 44aaaad8c0.

See <http://permalink.gmane.org/gmane.emacs.orgmode/98153>.
2015-06-05 09:00:39 +02:00
Brice Waegeneire 93cc5fb517 org-timer.el: hh:mm:ss format for setting a timer
* lisp/org-timer.el (org-timer-set-timer): Add support for hh:mm:ss
format.
(org-timer-default-timer): Type changed from number to string.
* testing/lisp/test-org-timer.el (test-org-timer/set-timer): Add
hh:mm:ss format in the test.
2015-06-02 23:18:13 +02:00
Nicolas Goaziou 03936a50f4 org-colview: Tiny speed-up
* lisp/org-colview.el (org-columns): Use buffer position instead of
  line number.
2015-06-02 22:01:06 +02:00
Nicolas Goaziou f1ee487218 org-colview: Handle user-defined inheritance in agenda colview
* lisp/org-colview.el (org-agenda-columns): Use `org-entry-get'
  instead of `org-entry-properties' to handle inheritance for
  user-provided properties.
2015-06-02 21:56:50 +02:00
Nicolas Goaziou 80aa84f135 org-colview: Update docstring
* lisp/org-colview.el (org-columns-compile-format): Update docstring.
2015-06-02 21:14:55 +02:00
Nicolas Goaziou f91d194d4f org-src: Fix `org-(un)escape-code-in-region'
* lisp/org-src.el (org-escape-code-in-region):
(org-unescape-code-in-region): Fix functions.

Reported-by: Daimrod <daimrod@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/98099>
2015-06-02 17:17:17 +02:00
Nicolas Goaziou 0f93638ce1 org-colview: Handle user-defined inheritance
* lisp/org-colview.el (org-columns): Rely on `org-entry-get' instead
  of `org-entry-properties' in order to handle inheritance properly.
  Also limit search to properties actually used as columns instead of
  all properties.

Reported-by: Nik Clayton <nik@ngo.org.uk>
<http://permalink.gmane.org/gmane.emacs.orgmode/98091>
2015-06-02 17:04:40 +02:00