Commit Graph

16831 Commits

Author SHA1 Message Date
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
Konubinix 2ebb14d746 Make use of `org-insert-heading' instead of inserting the * character
* lisp/org-agenda.el (org-agenda-insert-diary-as-top-level): Make
  use of `org-insert-heading' instead of inserting the * character

Therefore, the hooks associated to the insertion of a heading will be
triggered.  Since those hooks may cause the creation of some
metadata.  `org-end-of-meta-data' is used afterward.
2015-02-02 13:24:37 +01:00
Nicolas Goaziou b5d9f4be4d org-table: Allow accentuated characters in remote table names
* lisp/org-table.el (org-table-eval-formula): Allow a larger set of
  characters in remote name.

Reported-by: flav <flav.justflav@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/75690>
2015-02-01 01:03:45 +01:00
Sami Airaksinen c90925be29 org.el: org-babel-load-file loads first tangle file
(org-babel-load-file): When org-mode FILE has multiple target files
for tangle blocks, `exported-file' will be set to last found
target file, which might not be the `file'.

Therefore fix for this bug is to select the last element of that
tangled file list, which is the tangle target file of the first found
tangle block, most typically the `file'.

TINYCHANGE
2015-02-01 00:02:21 +01:00
Marc-Oliver Ihm b4b16c6165 org-index.el: sorting in idle-timer; add now does updates too. 2015-01-31 21:47:05 +01:00
Charles Berry f9ab1e8ab6 testing/lisp/test-ob.el: Add `test-ob/remove-inline-result'
* testing/lisp/test-ob.el (test-ob/remove-inline-result): Check that
  whitespace in `src_emacs-lisp{1} {{{results(=1=)}}}.' is removed by
  `org-babel-remove-inline-result', and that whitespace following the
  macro (if any) is left intact.
2015-01-31 11:05:18 -08:00
Nicolas Goaziou a752684bf0 org-clock: Fix `org-clock-in-last' with universal argument
* lisp/org-clock.el (org-clock-in-last): `org-clock-in' expects an
  universal argument, not the return value of `org-clock-select-task'.

Reported-by: Peter Münster <pmlists@free.fr>
<http://permalink.gmane.org/gmane.emacs.orgmode/94331>
2015-01-31 12:46:50 +01:00
Charles Berry 37fc8667e0 ob-core.el: inline src block removal bugfix
* ob.core.el (org-babel-remove-inline-result): Removing an inline src
  block result removes all whitespace preceding it. The function is
  now `interactive'.

  * ob-core.el (org-babel-insert-result): The call to
  `org-babel-remove-inline-result' preceeds insertion of whitespace
  and setting location of local variable `inlinep'.

  Daniele Pizzolli reported that cleaning a buffer by evaluating
  `org-babel-remove-inline-result' can leave unwanted whitespace.  That
  bug is fixed, and the function is made `interactive'.
2015-01-30 19:27:54 -08:00
Nicolas Goaziou fe63e59faf Small refactoring
* lisp/org.el (org-log-beginning):
* lisp/org-agenda.el (org-agenda-insert-diary-make-new-entry): Small
  refactoring.
2015-01-30 19:41:02 +01:00
Nicolas Goaziou 98a1bc868a Replace `org-end-of-meta-data-and-drawers'
* lisp/org.el (org-end-of-meta-data): New function.
(org-end-of-meta-data-and-drawers): Remove function.

* lisp/org-capture.el (org-capture-place-plain-text): Use new
  function.

* testing/lisp/test-org.el (test-org/end-of-meta-data): New test.

* etc/ORG-NEWS: Document removal.
2015-01-30 19:31:27 +01:00
Sebastien Vauban f7e68cec78 Replace `org-ctrl-c-ctrl-c' by `org-babel-execute-maybe'
* testing/lisp/test-ob-emacs-lisp.el, test-ob-ruby.el, test-ob.el: Replace `org-ctrl-c-ctrl-c' by `org-babel-execute-maybe'.
2015-01-30 18:28:05 +01:00
Kyle Meyer 7834a1ce66 org-agenda: Add only-window setup option
* lisp/org-agenda.el (org-agenda-window-setup, org-agenda-prepare-window):
  Add option to show agenda as the only window in the current frame.
2015-01-30 10:39:53 +01:00
Nicolas Goaziou a1116aa54e Fix `org-agenda-insert-diary-make-new-entry'
* lisp/org-agenda.el (org-agenda-insert-diary-make-new-entry): Ensure
  point is at a real body line and not in front of meta data, so
  regular contents can be inserted safely after a call to this
  function.

Reported-by: Samuel Loury <konubinix@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/94482>
2015-01-30 10:23:47 +01:00
Nicolas Goaziou 31e7634779 Fix special properties list
* lisp/org.el (org-special-properties): Add missing "CATEGORY".

* doc/org.texi (Special properties): Remove "NOBLOCKING" as a special
  property, since it can only be set through a properties drawer.
  This is a reserved property.

Reported-by: Samuel Loury <konubinix@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/94483>
2015-01-30 09:55:31 +01:00