Commit Graph

16844 Commits

Author SHA1 Message Date
Nicolas Goaziou 176681bc65 org-footnote: Be more strict about location for new footnotes
* lisp/org-footnote.el (org-footnote--allow-reference-p): New
  function.
(org-footnote-new): Use new function.

* testing/lisp/test-org-footnote.el (test-org-footnote/new): New test.

In particular, Org now refuses to add a footnote reference in
a keyword, e.g., TITLE.
2015-02-15 21:56:57 +01:00
Nicolas Goaziou 13938b87c2 org-element: Faster inline footnotes parsing
* lisp/org-element.el (org-element--pair-square-table): New variable.
(org-element-footnote-reference-parser): Use new variable.
2015-02-15 13:33:25 +01:00
Nicolas Goaziou 836d9db8a9 org-list: Fix continuated items repair
* lisp/org-list.el (org-list-struct-apply-struct): Preserve disparate
  indentation in contuated contents, i.e., contents after a plain list
  still within an item.

* testing/lisp/test-org-list.el (test-org-list/repair): Add test.

This fixes the following case:

  - item
     - child
     item contents
       with different indentation

Reported-by: Mark Edgington <edgimar@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/94977>
2015-02-14 12:37:41 +01:00
Nicolas Goaziou 55ce4b74b3 Fix `org-return' on list items
* lisp/org.el (org-return): Properly preserve list structure when
  calling `org-return-indent' on an item.

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

Reported-by: Rasmus <rasmus@gmx.us>
<http://permalink.gmane.org/gmane.emacs.orgmode/94977>
2015-02-14 02:07:18 +01:00
Nicolas Goaziou e50baa4cf7 Fix `org-time-stamp'
* lisp/org.el (org-time-stamp): Correctly match repeater, if any.
  Refactor code.

* testing/lisp/test-org.el (test-org/time-stamp): New test.

Reported-by: Nicolas Richard <theonewiththeevillook@yahoo.fr>
<http://permalink.gmane.org/gmane.emacs.orgmode/94974>
2015-02-13 21:54:21 +01:00
Nicolas Goaziou 68f094a706 ox-odt: Fix nested footnotes export
* lisp/ox-odt.el (org-odt-footnote-reference): Fix nested footnotes
  export.

Reported-by: Vaidheeswaran <vaidheeswaran.chinnaraju@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/94900>
2015-02-13 14:14:39 +01:00
Nicolas Goaziou ccb663c742 ox: Add optional order argument to some footnotes related functions
* lisp/ox.el (org-export--footnote-reference-map): New function.
(org-export-footnote-first-reference-p,
org-export-get-footnote-number): Allow to change order when footnotes
references are contained within footnote definitions.

* testing/lisp/test-ox.el (test-org-export/footnote-first-reference-p):
(test-org-export/get-footnote-number):  New tests.
(test-org-export/footnotes): Update test.
2015-02-13 14:10:51 +01:00
Rainer M. Krug b95f7aa823 ob-core.el: Fix numeric error and add header-args
* lisp/ob-core.el (org-babel-view-src-block-info): when a property
  value was numeric, an error was raised. Fixed by converting property
  value to string before evauation.

* lisp/ob-core.el (org-babel-view-src-block-info): Add property string
  "header args" to output of org-babel-view-src-block-info to make
  debugging of header-args setting problems easier.

* lisp/ob-core.el (org-babel-view-src-block-info): Add property string
  for language specific "header args:LANG" to output of org-babel-view-src-block-info to make
  debugging of header-args setting problems easier.
2015-02-13 00:39:35 +01:00
Nicolas Goaziou 0ed5d4336b ox-publish: Clean-up `org-publish-find-date'
* lisp/ox-publish.el (org-publish-find-date): Remove useless cond
branch.

:date property is never a single timestamp, so the first branch is
always false.

Reported-by: Rasmus <rasmus@gmx.us>
2015-02-13 00:33:17 +01:00
Nicolas Goaziou 73fef543ea org.texi: Add missing `org-export-with-date'
* doc/org.texi (Export settings): Add `org-export-with-date'.
(Publishing options): Add `org-export-with-date' and
`org-export-with-title'.
2015-02-13 00:28:04 +01:00
Rasmus 4f905107c9 org.texi: Fix typo
* org.texi (Export settings): Fix typo in vindex.
2015-02-12 11:56:21 +01:00
Rasmus 1cc23c6f3d Fix bugs introduced in b39dd5a
* ox-man.el (org-man-template),
  ox-texinfo.el (org-texinfo-template): Fix bug.
2015-02-12 11:00:56 +01:00
Rasmus b39dd5a099 org.texi: Fix bug
* org.texi: Fix bug introduced in e6fcc853c.
2015-02-12 10:42:19 +01:00
Rasmus e6fcc853c5 ox: Optional export of title
* ox.el (org-export-with-title): New variable.
* ox (org-export-options-alist),
  ox-ascii.el (org-ascii-template--document-title),
  ox-beamer.el (org-beamer-template), ox-html.el (org-html-template),
  ox-latex.el (org-latex-template), ox-man.el (org-man-template),
  ox-odt.el (org-odt-template), ox-org.el (org-org-template),
  ox-publish.el (org-publish-project-alist),
  ox-texinfo.el (org-texinfo-template),
  ox-groff.el (org-groff--mt-head): Use new variable.
* ox-koma-letter.el (org-koma-letter-use-title): Mark obsolete.
* test-ox.el (test-org-export/parse-option-keyword): Add :with-title.
* ORG-NEWS, org.texi: Mention org-export-with-title.

This is useful in e.g. ox-html where title can be set via
`org-html-preamble-template' or when using the {{{title}}}-macro.
2015-02-12 01:45:39 +01:00
Nicolas Goaziou fd51dad999 Turn momentarily planning keywords into defvar
* lisp/org.el (org-closed-string, org-deadline-string,
  org-scheduled-string): Use a defvar.

DEADLINE, SCHEDULED and CLOSED are now meant to be constants. However,
we preserve backward-compatibility during obsolencence phase.
2015-02-12 00:46:29 +01:00
Nicolas Goaziou 23d4d869f5 org-agenda: Ignore sticky feature when picking date from calendar
* lisp/org-agenda.el (org-calendar-goto-agenda): Ignore sticky
  feature.

Reported-by: Tory S. Anderson <torys.anderson@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/94865>
2015-02-11 23:44:26 +01:00
Nicolas Goaziou d92ef95170 org-agenda: Fix small bug
* lisp/org-agenda.el (org-todo-list): `org-last-args' property
  contains a list, not an atom.
2015-02-10 23:13:56 +01:00
Nicolas Goaziou f620efe1b8 Merge branch 'maint' 2015-02-10 22:27:12 +01:00
Nicolas Goaziou 880a2b4f90 ox-odt: Fix exporting target link without a description
* lisp/ox-odt.el (org-odt-link--infer-description): Fix comment.
(org-odt-link): When link to target has no description, use a number.

Reported-by: Christian Moe <mail@christianmoe.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/94815>
2015-02-10 22:23:40 +01:00
Nicolas Goaziou a4083de5c2 Fix typo
* lisp/org.el (org-read-date-analyze): Fix typo.

Reported-by: Charles Millar <millarc@verizon.net>
<http://permalink.gmane.org/gmane.emacs.orgmode/94820>
2015-02-10 17:43:13 +01:00
rasmus ae83b37e3e org.texi: New example on babel :post header
* org.texi (post): Clarification and new example.
2015-02-10 12:04:41 +01:00
Nicolas Goaziou 650278f775 org-element: Interpret pseudo objects without declaration
* lisp/org-element.el (org-element-object-containers): New variable
(org-element-interpret-data): Remove optional argument.
(org-element--interpret-data-1): Remove optional argument.  Guess when
a given element or object has a pseudo type.

* lisp/ox-latex.el (org-latex-pseudo-objects): Remove variable.
(org-latex-table, org-latex--math-table): Apply signature change above.

* testing/lisp/test-org-element.el (test-org-element/interpret-data):
  Update test.
2015-02-09 12:04:38 +01:00
Nicolas Goaziou 2d9ad82418 ORG-NEWS: Document `org-element-copy' 2015-02-09 10:58:57 +01:00
Nicolas Goaziou 7f66983184 org-element: Fix docstring
* lisp/org-element.el (org-element-copy): Fix docstring.
2015-02-09 10:57:39 +01:00
Nicolas Goaziou 16841306ed Use `org-element-copy'
* lisp/org.el (org-timestamp-split-range): Use `org-element-copy'.  Do
  not preserve :parent property anymore.

* lisp/ox.el (org-export-as): Use `org-element-copy'.

* testing/lisp/test-org.el (test-org/timestamp-split-range): Update test.
2015-02-09 10:15:59 +01:00
Nicolas Goaziou 70933a3dd6 org-element: Implement `org-element-copy'
* lisp/org-element.el (org-element-copy): New function.
* testing/lisp/test-org-element.el (test-org-element/copy): New test.
2015-02-09 10:07:34 +01:00
Rasmus 8f38f037b4 ox.el: {{{date}}} formatting argument
* ox.el (org-export-as): Allow {{{date}}} to take formatting-argument.
* org.texi (Macro replacement): Document {{{date}}} formatting.
* test-ox.el (test-org-export/expand-macro): Test {{{data(format)}}}
* org-NEWS: Mention optional {{{data}}} argument.

Optional argument to {{{date}}} like {{{date(FMT)}}} are treated
similar to {{{time(FMT)}}} if \#+DATE is a timestamp.
2015-02-09 01:47:21 +01:00
Yuri D. Lensky ba544e4caa Fix timestamp-based sorting of tags-based entries in agenda
* lisp/org.el (org-scan-tags): Fix agenda org tags scans to properly
  add timestamp property, completely analogously to
  org-agenda-get-todos.
* lisp/org-agenda.el (org-agenda-entry-get-agenda-timestamp,
  org-agenda-get-todos): Factored timestamp retrieval code out to
  separate function org-agenda-entry-get-agenda-timestamp from
  org-agenda-get-todos.

Before this fix, timestamps were ignored when sorting agenda views of
the 'tags' and 'tags-todo' types.

TINYCHANGE
2015-02-09 01:08:42 +01:00
Rasmus 1aad2fd6de org.texi: Consistent formatting of non-nil
* org.texi: All occurances of non-nil changed to non-@code{nil}.
2015-02-08 22:48:57 +01:00
Rasmus 41cd87ab76 org.texi: Document all predefined macros
* org.texi (Macro replacement): Document all predefined macros.
2015-02-08 22:43:25 +01:00
Nicolas Goaziou 0be8495d01 Call `org-insert-heading' instead of (insert "* ")
* lisp/org-agenda.el (org-agenda-insert-diary-as-top-level):
* lisp/org.el (org-link-search):  Call `org-insert-heading' instead
  of (insert "* ").

This allows, in particular, to run `org-insert-heading-hook' and
possibly fix up blank lines around.
2015-02-08 01:45:38 +01:00
Nicolas Goaziou ca0199c7ee `org-insert-heading' can be forced to insert top-level headline
* lisp/org.el (org-insert-heading): Change signature.  Tiny refactoring.
* testing/lisp/test-org.el (test-org/insert-heading): Add tests.
2015-02-08 01:43:30 +01:00
Alan Schmitt 6d691e2aa8 Function `org-link-search' does exact headline search
* lisp/org.el (org-link-search): Change headline search such that it
always does an exact search, ignoring spaces.

* testing/lisp/test-org.el (test-org/fuzzy-links): Test exact headline
match with spaces and cookies.

* doc/org.texi (External links): Cleanup footnote about the
`org-link-search-must-match-exact-headline' option for text searches
and add a footnote about the effect of the same option for heading
searches.

* doc/ORG-NEWS: Document changes.
2015-02-07 22:42:40 +01:00
Nicolas Goaziou a9a9af030d org-wikinodes: Fix fontification
* contrib/lisp/org-wikinodes.el (org-wikinodes-add-to-font-lock-keywords):
  Properly install fontification mechanism.  Small refactoring.

Suggested-by: Scott Campbell <scott.campbell@uwaterloo.ca>
<http://permalink.gmane.org/gmane.emacs.orgmode/94683>
2015-02-07 22:01:38 +01:00
Nicolas Goaziou 7e4228a137 org-agenda: Fix logging with bulk agenda commands
* lisp/org-agenda.el (org-agenda-new-marker): Make sure data inserted
  inserted in the heading above marker updates it.
(org-agenda-bulk-action): Enforce calling `org-add-log-note' after
each action.

Reported-by: Maxim Baz <z0rch.coding@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/94654>
2015-02-06 09:52:25 +01:00
Nicolas Goaziou ab9e9d2857 Tiny refactoring
* lisp/org.el (org-ctrl-c-ctrl-c): Tiny refactoring.
2015-02-05 18:12:23 +01:00
Nicolas Goaziou e76a541865 org-texi: Fix typo
* doc/org.texi (Timers): Fix typo.

This fixes e3bd15a8dd.
2015-02-05 17:44:48 +01:00
Nicolas Goaziou e3bd15a8dd org.texi: Fix typo
* doc/org.texi (Timers): Fix typo.

Reported-by: J. David Boyd <dboyd2@mmm.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/94674>
2015-02-05 17:42:20 +01:00
Nicolas Goaziou 528b909fe1 ox-html: Properly escape ampersands in links
* lisp/ox-html.el (org-html-link): Properly escape ampersands in
  links.
(org-html-encode-plain-text): Small refactoring.

Reported-by: Karl Voit <devnull@Karl-Voit.at>
<http://permalink.gmane.org/gmane.emacs.orgmode/94640>
2015-02-05 12:56:23 +01:00
Marco Wahl a5c4568de5 Merge branch 'maint' 2015-02-05 10:19:48 +01:00
Marco Wahl ddaa1d745c contrib/org-drill.el: update to v2.4.4 2015-02-05 10:18:15 +01:00
Nicolas Goaziou 226639b239 org-agenda: Fix adding diary entries
* lisp/org-agenda.el (org-agenda-insert-diary-make-new-entry): Fix
  adding adding diary entries the same day.

This is a follow-up to a1116aa54e.

Reported-by: Gregor Zattler <telegraph@gmx.net>
<http://permalink.gmane.org/gmane.emacs.orgmode/94638>
2015-02-05 10:00:46 +01:00
Nicolas Goaziou 55c0708bc4 org-element: Externalize docview links
* lisp/org-element.el (org-element-link-type-is-file): Remove.
(org-element-link-parser): Do not treat specially anymore "docview"
link type.

* testing/lisp/test-org-element.el (test-org-element/link-parser):
  Update test.

* lisp/org-docview.el (org-docview-export): Fix path.

"docview" is a custom link type handled in its own library.  There is
no reason to include it in core parser.
2015-02-03 23:00:21 +01:00
Nicolas Goaziou 21c73e38e4 org.texi: Fix typo
* doc/org.texi (Filtering/limiting agenda items): Fix typo.
2015-02-03 21:46:22 +01:00
Nicolas Goaziou 4c00842e88 Fix `org-toggle-heading'
* lisp/org.el (org-toggle-heading): Avoid adding spurious stars when
  changing a plain list into a subtree.

Reported-by: Rainer Stengele <rainer.stengele@online.de>
<http://permalink.gmane.org/gmane.emacs.orgmode/94223>
2015-02-03 21:39:53 +01:00
Oleh Krehel 43fe141fe3 org-download.el: Update to commit d01bdfd6 2015-02-03 19:46:05 +01:00
Nicolas Goaziou b719c10e9a org.texi: Fix typo
* doc/org.texi (Summary): Fix typo

Suggested-by: Thierry Pellé <abonnements@thierry-pelle.eu>
2015-02-03 12:19:02 +01:00
Achim Gratz aaee171921 Merge branch 'maint' 2015-02-03 09:23:58 +01:00
Achim Gratz 5542a4fd95 mk/server.mk: correct file globs for contrib/lisp 2015-02-03 09:23:20 +01:00
Nicolas Goaziou 1d4c79d415 org-agenda: Fix agenda diary corruption
* lisp/org-agenda.el (org-agenda-insert-diary-make-new-entry): Do not
  save excursion or final position is lost.

Reported-by: Gregor Zattler <grfz@gmx.de>
<http://permalink.gmane.org/gmane.emacs.orgmode/94543>
2015-02-02 18:19:30 +01:00