Commit Graph

11491 Commits

Author SHA1 Message Date
Marco Wahl 5a3ab2a7fd Fix message text in `org-toggle-sticky-agenda'
* org-agenda.el (org-toggle-sticky-agenda): Dropped the irritating 'was'
  from the message.
2015-07-04 09:37:16 +02:00
Nicolas Goaziou 747fefe2b0 Update keywords for defcustom `org-latex-default-packages-alist'
* lisp/org.el (org-latex-default-packages-alist): Update keywords to
  reflect changes to default value in
  5e03133c47.
2015-07-03 21:20:53 +02:00
Nicolas Goaziou 048f0e1a82 ob-shell: Add missing "sh" to "shell" conversions
* lisp/ob-shell.el (org-babel-default-header-args:shell): Renamed from
`org-babel-default-header-args:sh'.
(org-babel-variable-assignments:shell): Renamed from
`org-babel-variable-assignments:sh'.
(org-babel-prep-session:shell): Renamed from
`org-babel-prep-session:sh'.  Apply renaming.
(org-babel-load-session:shell): Renamed from
`org-babel-load-session:sh'.  Apply renaming.

(org-babel-execute:shell): Apply renaming.

Reported-by: Sebastien Vauban
<http://permalink.gmane.org/gmane.emacs.orgmode/98859>
2015-07-03 16:17:11 +02:00
Nicolas Goaziou 188bae903f Fix property inheritance with extended values
* lisp/org.el (org-property--local-values): New function.
(org-entry-get): Use new function.  Ignore global values when there is
no inheritance.
(org-entry-get-with-inheritance): Fix extended values, which do not
stop anymore inheritance search.

* testing/lisp/test-org.el (test-org/entry-get): Add tests.
2015-07-03 15:34:47 +02:00
Rasmus 5e03133c47 Remove float from org-latex-default-packages-alist 2015-07-03 13:42:21 +01:00
Rasmus c4a913770d Update minted documentation.
* ox-latex.el (org-latex-listings):
* org.texi (Literal examples): Update minted documentation.
2015-07-03 13:42:21 +01:00
Rasmus 46a71bb93f ox-latex: Support captions for none-floats
* ox-latex.el (org-latex--caption/label-string): Format
  nonfloating captions using the capt-of package.
  (org-latex--inline-image, org-latex-src-block)
  (org-latex--org-table): Allow none-float and caption.
2015-07-03 13:42:03 +01:00
Nicolas Goaziou 1221715a74 org-element: Fix parsing recursive babel calls
* lisp/org-element.el (org-element-babel-call-parser): Fix parsing
  recursive babel calls.

* testing/lisp/test-org-element.el (test-org-element/babel-call-parser): Add test.
2015-07-03 00:33:45 +02:00
Nicolas Goaziou e61bedadcb ox-html: Prefer custom ID for links in table of contents
* lisp/ox-html.el (org-html--format-toc-headline): Use custom ID when
  available.

Reported-by: Mitchel Humpherys <mitch.special@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/98797>
2015-07-01 14:49:42 +02:00
Nicolas Goaziou 304f84530b Use inactive timestamps when re-scheduling or re-deadlining
* lisp/org.el (org-log-note-headings): Improve docstring.
(org-store-log-note): When re-scheduling or re-deadlining, convert old
or new timestamp to an inactive one so as to not clutter the agenda.

Reported-by:  Karl Voit <devnull@Karl-Voit.at>
<http://permalink.gmane.org/gmane.emacs.orgmode/93498>
2015-06-29 22:19:38 +02:00
Nicolas Goaziou cedef74216 org-element: Minimize false positives when matching a table.el table
* lisp/org-element.el (org-element--set-regexps): Improve regexp for
  table.el tables.
2015-06-29 14:49:00 +02:00
Nicolas Goaziou 1cc8cdc49e Be more strict when matching an Org table
* lisp/org.el (org-at-table-p): Do not allow "+" character at the
  beginning of a table row.
2015-06-28 23:32:38 +02:00
Nicolas Goaziou 157591db7c Fix `org-decrease-number-at-point'
* lisp/org.el (org-decrease-number-at-point): Handle the case when INC
  is nil.
2015-06-28 21:09:59 +02:00
Nicolas Goaziou 106ca75307 org-element: Fix table and table.el mix
* lisp/org-element.el (org-element-table-parser): Properly parse an
  Org table followed by a line starting with a "+".

* testing/lisp/test-org-element.el (test-org-element/context): Fix
  test.
2015-06-28 21:09:16 +02:00
Nicolas Goaziou f03d96572e Silence byte-compiler 2015-06-28 16:50:08 +02:00
Nicolas Goaziou 6d60138260 org-table: Do not modify buffer needlessly when aligning table
* lisp/org-table.el (org-table-align): Compare new table with old one
  before replacing it.  Only replace modified lines.
2015-06-28 16:21:45 +02:00
Nicolas Goaziou 03eb88661b Use parser for `org-at-table-p' and al.
* lisp/org-table.el (org-table-begin):
(org-table-end): Refactor using parser.

* lisp/org.el (org-at-table-p):
(org-at-table.el-p): Refactor using parser.

(org-meta-return): Use `org-at-table-p'.

(org-at-table-hline-p):
(org-table-recognize-table.el): Small refactoring.
2015-06-28 14:51:31 +02:00
Nicolas Goaziou aa9c4bfb6f org-element: Remove dependency on `org-at-table-p'
* lisp/org-element.el (org-element-table-parser): Do not call
  `org-at-table.el-p'.
(org-element--current-element): Do not call `org-at-table-p'.
2015-06-28 11:37:13 +02:00
Nicolas Goaziou c916ea54f0 org-table: Remove `org-table-relative-ref-may-cross-hline'
* lisp/org-table.el (org-table-relative-ref-may-cross-hline): Remove
  variable.

* etc/ORG-NEWS: Document removal.

This variable was declared obsolete in August 2009.  See
2cc99fbb0a.
2015-06-28 10:34:31 +02:00
Sergey Gordienko c15db80e32 org-mobile: Tiny fix in creating index.org file
* lisp/org-mobile.el (org-mobile-create-index-file):
Eliminate cloning of `#+READONLY' property in the `index.org' file.
A sublists of `org-todo-keywords' don't need to contain the `|'.

TINYCHANGE
2015-06-28 09:06:00 +02:00
Kyle Meyer 5f3d8037a5 org-add-planning-info: Improve deletion handling
* lisp/org.el (org-add-planning-info): Reset point before each
  planning entry search.  Clean up extra spaces.

* testing/lisp/test-org.el (test-org/add-planning-info): Add tests.

- Reposition save-excursion call to reset point every dolist
  iteration.  Otherwise, the order of the entries to be removed
  matters, and a call like

      (org-add-planning-info nil nil 'scheduled 'deadline)

  on

      DEADLINE: <2015-06-26 Fri> SCHEDULED: <2015-06-26 Fri>

  will fail to remove the deadline entry.

- Delete leading white space even when at the beginning of the line so
  that, when org-adapt-indentation is nil, a space is not inserted
  when removing the leading planning info entry.

  This prevents headings with repeating entries like

      SCHEDULED: <2015-06-26 Fri +1w>

  from being closed and recycled with an extra space in front of
  SCHEDULED.

- Add leading white space to the planning info entry regexp to prevent
  leftover white space when removing entries other than the first
  entry.
2015-06-28 09:03:46 +02:00
Nicolas Goaziou 5a5e4a5eee ox-latex: Fix backslash escaping in plain text
* lisp/ox-latex.el (org-latex-plain-text): Fix backslash escaping.
2015-06-26 09:50:22 +02:00
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
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
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 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
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 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 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
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