Commit Graph

18270 Commits

Author SHA1 Message Date
Nicolas Goaziou ea80df6a2e Merge branch 'maint' 2016-03-04 01:16:11 +01:00
Nicolas Goaziou fda14f8d18 Fix typo 2016-03-04 01:15:59 +01:00
Kyle Meyer 1376123dea Merge branch 'maint' 2016-03-01 23:32:22 -05:00
Kyle Meyer be5452b126 org-eval-in-calendar: Fix docstring
* lisp/org.el (org-eval-in-calendar): Fix docstring's description of
  KEEPDATE.
2016-03-01 23:31:49 -05:00
Nicolas Goaziou 194b754597 Merge branch 'maint' 2016-03-01 01:06:02 +01:00
Nicolas Goaziou 105a446697 Fix return value for `org-get-outline-path'
* lisp/org.el (org--get-outline-path-1): Replace links with their
description, or path, in addition to removing statistics cookies.
(org-get-outline-path): Add an optional argument to include current
headline in path.
(org-refile-get-targets): Make use of new argument.  Remove call to
`org-link-display-format', which is now handled in
`org--get-outline-path-1'.

* testing/lisp/test-org.el (test-org/get-outline-path): Add tests.

Reported-by: Tobias Getzner <tobias.getzner@gmx.de>
<http://permalink.gmane.org/gmane.emacs.orgmode/105425>
2016-03-01 01:01:07 +01:00
Nicolas Goaziou cec775fa06 Merge branch 'maint' 2016-02-29 16:27:19 +01:00
Nicolas Goaziou 2971ab6126 Fix `org-get-outline-path'
* lisp/org.el (org--get-outline-path-1): Fix wrong type arrayp error
  when trying to get the outline path of an empty headline.
* testing/lisp/test-org.el (test-org/get-outline-path): Add test.

Reported-by: Tobias Getzner <tobias.getzner@gmx.de>
<http://permalink.gmane.org/gmane.emacs.orgmode/105407>
2016-02-29 16:25:24 +01:00
Nicolas Goaziou b62d55cbb6 org-footnote: Fix failing test
* lisp/org-footnote.el (org-footnote-normalize): Fix failing test due to
  missing `incf' function.
2016-02-28 12:09:30 +01:00
Nicolas Goaziou ae0d9fbb09 org-footnote: Handle un-referenced definitions
* lisp/org-footnote.el (org-footnote-sort):
(org-footnote-normalize): Insert un-referenced definitions upon sorting.

* testing/lisp/test-org-footnote.el (test-org-footnote/sort):
(test-org-footnote/normalize): Add tests.
2016-02-27 16:05:35 +01:00
Nicolas Goaziou 2a0a37c1a7 Merge branch 'maint' 2016-02-27 09:35:30 +01:00
Nicolas Goaziou dc68d28d67 ox-latex: Remove spurious newline in labels
* lisp/ox-latex.el (org-latex--caption/label-string): Remove spurious
  newline in labels.

Reported-by: Thomas S. Dye <tsd@tsdye.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/105356>
2016-02-27 09:34:45 +01:00
Nicolas Goaziou 07e514b58b org-colview: Fix :id in columnview
* lisp/org-colview.el (org-dblock-write:columnview): Fix typo in pcase
  so ID are properly recognized in current document.

* testing/lisp/test-org-colview.el (test-org-colview/dblock): Add tests.
2016-02-27 09:25:01 +01:00
Nicolas Goaziou 7bcd3e6a79 ox-latex: Remove trailing white space
* lisp/ox-latex.el (org-latex-custom-lang-environments): Remove trailing
  white space in docstring.
2016-02-26 20:47:16 +01:00
Nicolas Goaziou e4d196758b Merge branch 'master' of orgmode.org:org-mode 2016-02-26 20:00:43 +01:00
Oleh Krehel 1003b1025b org-agenda.el (org-agenda-to-appt): Ignore DONE tasks 2016-02-26 16:58:44 +01:00
Nicolas Goaziou 28d3e729e4 org-mobile: Fix Wrong type argument: sequencep, :startgrouptag
* lisp/org-mobile.el (org-mobile-create-index-file): Handle group tags.

Reported-by: John Hutchinson <johnrhutchinson@att.net>
<http://permalink.gmane.org/gmane.emacs.orgmode/105033>
2016-02-26 16:34:53 +01:00
Nicolas Goaziou 7125fa1947 Merge branch 'maint' 2016-02-25 18:16:58 +01:00
Nicolas Goaziou a0047bcd47 Fix `org-link-display-format'
* lisp/org.el (org-link-display-format): Replace all links in give
  string instead of the first one only.
2016-02-25 18:10:24 +01:00
Nicolas Goaziou d7d0b2725d ob-core: Remove useless code
* lisp/ob-core.el (org-babel-where-is-src-block-result): Remove useless
  code introduced in last ob-core.el commit.
2016-02-25 18:03:30 +01:00
Nicolas Goaziou 44db364c69 Merge branch 'maint' 2016-02-25 15:11:02 +01:00
Nicolas Goaziou 642c50f0cb Silence byte-compiler 2016-02-25 15:10:49 +01:00
Nicolas Goaziou 0f3cb188a9 ob-core: Fix Invalid search bound (wrong side of point)
* lisp/ob-core.el (org-babel-where-is-src-block-result): Return nil when
  anonymous results would be located outside of the container of the
  source block.

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

Reported-by: Dominik Schrempf <dominik.schrempf@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/105309>
2016-02-25 14:53:00 +01:00
Nicolas Goaziou 5660047846 Merge branch 'maint' 2016-02-25 14:42:22 +01:00
Nicolas Goaziou 54b42f7e59 Tiny refactoring
* lisp/org.el (org-refile-get-targets): Tiny refactoring.
2016-02-25 14:41:54 +01:00
Nicolas Goaziou 2db95a7755 Merge branch 'maint' 2016-02-25 14:41:08 +01:00
Nicolas Goaziou 66fbceb727 Fix `org-refile-get-targets'
* lisp/org.el (org-refile-get-targets): Fix bug when using
  `org-refile-target-verify-function'.  Improve speed.

(org-olpa): Remove variable.
(org-outline-path-cache): New variable.

(org--get-outline-path-1): New function.
(org-get-outline-path): Use new function.  This fixes return value when
cache is used and calls are not in the same path.

* testing/lisp/test-org.el (test-org/get-outline-path): New test.

Reported-by: Florian Adamsky <fa-org-mode@haktar.org>
<http://permalink.gmane.org/gmane.emacs.orgmode/104829>
2016-02-25 14:32:57 +01:00
Simon Thum aa78158036 org-contacts: Register "tel" link
This has the added benefit of not screwing up the exporter.

Signed-off-by: Simon Thum <simon.thum@gmx.de>
2016-02-25 10:14:25 +01:00
Arun Isaac e278cffa3b ox-rss: Implement RSS_FEED_URL option keyword
* contrib/lisp/ox-rss.el (org-rss-build-channel-info): Try to use the
  specified RSS_FEED_URL option keyword as publink before resorting to
  concatenating blogurl with output filename.

The RSS_FEED_URL goes into the atom:link element that identifies the
feed's own URL. Currently, the feed URL is assumed to be html-link-home
or publishing-directory concatenated with the output filename of the
feed. This need not always be so. So, the RSS_FEED_URL option keyword
is introduced to let the user customize the feed URL.
2016-02-25 10:09:55 +01:00
Nicolas Goaziou 86bc987ca1 org-colview: Remove `org-columns-spec' property
* lisp/org-colview.el (org-columns--display-here): Remove unnecessary
  `org-columns-spec' property.
(org-columns-update): Use (current-column) to extract column format
specifications.
2016-02-25 00:36:05 +01:00
Nicolas Goaziou 71d734f399 org-colview: Prevent computing again values in some cases
* lisp/org-colview.el (org-columns-delete):
(org-columns-widen): Do not recompute value.
2016-02-25 00:33:28 +01:00
Nicolas Goaziou 41d005822e Fix indentation bug
* lisp/org.el (org--get-expected-indentation): Fix indentation bug.
* testing/lisp/test-org.el (test-org/indent-line): Add test.

In the following document, the last line would be indented to "|"

- item

  #+BEGIN_SRC emacs-lisp
    (+ 1 1)
  #+END_SRC
    |
2016-02-24 20:58:55 +01:00
Nicolas Goaziou 1f84cc2182 org-colview: Silence byte-compiler 2016-02-24 00:53:27 +01:00
Nicolas Goaziou 099d84c76d org-colview: Fix editing values altering headings
* lisp/org-colview.el (org-columns-edit-value):
(org-columns-next-allowed-value): Make sure overlays are still in place
when a property altering current headline is modified.  Refactor code.
Do not limit allowed values to 10.

* testing/lisp/test-org-colview.el (test-org-colview/columns-next-allowed-value):
New test.
2016-02-23 22:32:47 +01:00
Nicolas Goaziou a4ad618f62 org-colview: Fix `org-columns-view' and `org-columns-edit-value'
* lisp/org-colview.el (org-columns-new): Change signature to allow both
  editing and column creation non-interactively.
(org-columns-edit-attributes): Use new signature.
* testing/lisp/test-org-colview.el (test-org-colview/columns-new):
  Update tests.
2016-02-23 17:36:48 +01:00
Nicolas Goaziou acef7d8a43 org-colview: Do not compute values swapping columns
* lisp/org-colview.el (org-columns-move-right): Do not compute values
  swapping columns.  Comment about a corner case.

* testing/lisp/test-org-colview.el (test-org-colview/columns-move-left):
(test-org-colview/columns-move-right): New tests.
2016-02-23 17:36:41 +01:00
Nicolas Goaziou 14d81d38e0 org-colview: Fix columns format extraction
* lisp/org-colview.el (org-columns-get-format): Do not assume
  `org-columns-default-format' contains valid columns format.  Look for
  COLUMNS keyword if necessary.
(org-columns-quit): Reset `org-columns-current-fmt'.
(org-columns-redo): Provide `org-columns-current-fmt' as the active
format so as to avoid extracting it again.

* testing/lisp/test-org-colview.el (test-org-colview/get-format): New
  test.
2016-02-23 15:20:02 +01:00
Nicolas Goaziou ab38d15186 org-colview: Tiny refactoring
* lisp/org-colview.el (org-columns--collect-values): Tiny refactoring.
2016-02-23 15:19:59 +01:00
Nicolas Goaziou 0de85fca9e org-colview: Remove `org-computed' property
* lisp/org-colview.el (org-columns-check-computed): Check if current
  column contains an operator instead of looking for an `org-computed'
  text property.
(org-columns--compute-spec): Do not apply `org-computed' text property.
2016-02-23 14:07:36 +01:00
Nicolas Goaziou d7fbad1a81 org-colview: Rename `org-columns-new-overlay'
* lisp/org-colview.el (org-columns-new-overlay): Rename this to...
(org-columns--new-overlay): ... this.
(org-columns--display-here): Apply renaming.
2016-02-23 14:07:36 +01:00
Nicolas Goaziou 24033e3c67 Move `org-edit-headline'
* lisp/org-colview.el (org-edit-headline): Move from here...
* lisp/org.el (org-edit-headline): ... to here.  Also refactor code.
  Accept to set headline non-interactively.

* testing/lisp/test-org.el (test-org/edit-headline): New test.
2016-02-23 14:07:32 +01:00
Nicolas Goaziou 7c0618b04d org-colview: Fix COLUMNS keyword update
* lisp/org-colview.el (org-columns-store-format): Make sure we're really
  at a COLUMNS keyword before replacing it.  Also replace only the first
  one, not all of them.

* testing/lisp/test-org-colview.el (test-org-colview/columns-new): Add
  tests.
2016-02-23 13:18:38 +01:00
Nicolas Goaziou de439a68c8 org-colview: Allow multiple summaries for a single property
* lisp/org-colview.el (org-columns--collect-values):
(org-agenda-colview-summarize): Use column format specification as the
  unique identifier for the returned alist.

* lisp/org-colview.el (org-columns--display-here): Store column format
  specification in a new overlay property.

(org-columns--set-widths):
(org-columns--display-here): Use column format specification instead of
(org-columns--displayed-value): Since the same property can have
multiple titles, use column specification instead of property as keys.

(org-columns--collect-values): Apply signature change.

(org-columns-update): Handle multiple columns for the same property.
Also apply signature change to `org-columns--displayed-value'.

(org-columns--compute-spec): New function.
(org-columns-compute):
(org-columns-compute-all): Use new function.

* testing/lisp/test-org-colview.el (test-org-colview/columns-summary):
(test-org-colview/columns-update): Add tests.

* doc/org.texi (Column attributes): Document computation with multiple
  summary types for a given property.
2016-02-23 13:18:34 +01:00
Nicolas Goaziou 633e4d4202 org-colview: Remove summarize function from format spec
* lisp/org-colview.el (org-columns--summarize): Throw an error when no
  summarize function is associated to a given operator.

(org-columns-compile-format): Do not provide summarize function, which
can be found using the accessor `org-columns--summarize'.

(org-columns-new):
(org-columns-uncompile-format):
(org-columns-compute):
(org-columns-compute-all):
(org-agenda-colview-summarize): Use new compiled format.
2016-02-22 22:15:13 +01:00
Nicolas Goaziou 9dfe3d8079 org-colview: Make `org-columns-current-maxwidths' a vector
* lisp/org-colview.el (org-columns-current-maxwidths): Update docstring.
(org-columns--autowidth-alist): Rename to...
(org-columns--set-widths): ... this.
(org-columns--display-here):
(org-columns--display-here-title):
(org-columns-widen):
(org-columns-update): Use new type.

(org-columns):
(org-agenda-columns): Apply renaming.

* testing/lisp/test-org-colview.el (test-org-colview/columns-width):
  Update test.
2016-02-22 22:15:13 +01:00
Nicolas Goaziou ebf7bbb308 org-colview: Store properties in upper case
* lisp/org-colview.el (org-columns-compile-format): Property is
  upper-cased.  Title is not, however.
(org-columns--displayed-value):
(org-columns--collect-values):
(org-columns--autowidth-alist):
(org-columns--overlay-text):
(org-columns--display-here):
(org-columns--display-here-title):
(org-columns-next-allowed-value):
(org-columns):
(org-columns-widen):
(org-columns-update):
(org-columns--capture-view):
(org-dblock-write:columnview):
(org-agenda-colview-summarize): Since properties in compiled format are
upper-cased, remove the `upcase' or `assoc-string' dance.

* testing/lisp/test-org-colview.el (test-org-colview/columns-new):
(test-org-colview/columns-update): Add case-sensitivity tests.

`assoc-string' is still necessary in functions where property is
provided by the user, e.g. `org-columns-update'.
2016-02-22 22:15:13 +01:00
Nicolas Goaziou 92443160fd ox-publish: Write cache after successfully publishing a file
* lisp/ox-publish.el (org-publish-file): Ignore NO-CACHE parameter when
  writing cache to file.  This is needed to recover from an interrupted
  publishing process.

Reported-by: Julien Cubizolles <j.cubizolles@free.fr>
<http://permalink.gmane.org/gmane.emacs.orgmode/105046>
2016-02-22 21:53:42 +01:00
Michael Brand 54b4be8208 orgstruct: Add `org-force-cycle-archived'
* lisp/org.el (orgstruct-setup): Add `org-force-cycle-archived' to the
list of the functions to be hijacked.
2016-02-22 20:53:48 +01:00
Aaron Ecay 84e3f23b9a ob-core: remove cruft
* lisp/ob-core.el (org-babel-execute-src-block): Simplify.
(org-babel-tramp-handle-call-process-region): Remove.

Commit 57104f9f changed an org-flet to a let, rendering the whole
apparatus of modifying call-process-region inoperative.  Supposedly this
was put in place to work around a bug in
tramp-handle-call-process-region, which was removed from tramp in
2012 (after being renamed to tramp-sh-call-process-region).  *shrug*
This commit just removes the whole thing.

It also no longer consults ‘org-src-lang-modes’, following on from
commit 6287416.
2016-02-22 16:04:08 +00:00
Aaron Ecay 848a87634d Add org-babel-make-language-alias function.
* lisp/ob-core.el (org-babel-make-language-alias): New function.
* lisp/ob-emacs-lisp.el: Use it.

Previously this was accomplished via org-src-lang-modes, but that is a
poor solution, as it conflates the remapping of language mode names with
the creation of aliases.
2016-02-22 16:04:03 +00:00