Commit Graph

17025 Commits

Author SHA1 Message Date
Nicolas Goaziou f8edfc9fb3 org-macs: Fix `org-string-nw-p'
* lisp/org-macs.el (org-string-nw-p): Return value doesn't depend
  anymore on the current syntax table.

Reported-by: Rasmus Rasmus <rasmus@gmx.us>
<http://permalink.gmane.org/gmane.emacs.orgmode/95467>
2015-02-26 15:14:40 +01:00
Nicolas Goaziou c1da4d01a9 Small fix
* lisp/org.el (org-fontify-meta-lines-and-blocks-1): Return a non-nil
  value in any case.  This fixes
  37d2a2d1cf.
2015-02-26 09:06:13 +01:00
Nicolas Goaziou 37d2a2d1cf Prevent invisible characters in keywords
* lisp/org.el (org-fontify-meta-lines-and-blocks-1): Forbid invisible
  characters (e.g. bracket links) in all keywords but TITLE, DATE,
  AUTHOR, CAPTION and EMAIL.  Also remove back-end specific keywords,
  which are treated just like any other regular keyword.

Reported-by: Rasmus <rasmus@gmx.us>
<http://permalink.gmane.org/gmane.emacs.orgmode/95415>
2015-02-26 00:21:53 +01:00
Nicolas Goaziou 50a0e712cc ox-odt: Fix handling math snippets in captions
* lisp/ox-odt.el (org-odt--translate-latex-fragments): Fix handling
  math snippets in captions.

Reported-by: Rasmus <rasmus@gmx.us>
<http://permalink.gmane.org/gmane.emacs.orgmode/95446>
2015-02-25 23:45:15 +01:00
Nicolas Goaziou 1493151b3f ob-core: Improper lists are returned in fixed-width areas
* lisp/ob-core.el (org-babel-insert-result): Improper lists are
  removeable.

When a list cannot be turned into a table, return it in a fixed-width
area so that it can be removed.

Suggested-by: Charles C. Berry <ccberry@ucsd.edu>
<http://permalink.gmane.org/gmane.emacs.orgmode/95430>
2015-02-25 14:41:13 +01:00
Nicolas Goaziou c76f254e8b ox: Fix custom link handling in anonymous back-end
* lisp/ox.el (org-export-custom-protocol-maybe): Change signature.
* contrib/lisp/ox-groff.el (org-groff-link):
* lisp/ox-ascii.el (org-ascii-link):
* lisp/ox-beamer.el (org-beamer-link):
* lisp/ox-html.el (org-html-link):
* lisp/ox-latex.el (org-latex-link):
* lisp/ox-man.el (org-man-link):
* lisp/ox-md.el (org-md-link):
* lisp/ox-odt.el (org-odt-link):
* lisp/ox-org.el (org-org-link):
* lisp/ox-texinfo.el (org-texinfo-link): Apply signature change.

* testing/lisp/test-ox.el (test-org-export/custom-protocol-maybe):
  Update test.

Provide explicitly back-end used instead of guessing it from INFO
channel as an anonymous back-end could be used, masquerading the real
one.

Reported-by: Christian Moe <mail@christianmoe.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/95402>
2015-02-24 15:54:01 +01:00
Nicolas Goaziou ad7b7efcdc ob-core: Fix inserting improper lists
* lisp/ob-core.el (org-babel-insert-result): Fix output when result is
  an improper list, which cannot be turned into a table.

* testing/lisp/test-ob.el (test-ob/org-babel-insert-result--improper-lists):
  New test.

Reported-by: Daniele Pizzolli <dan@toel.it>
<http://permalink.gmane.org/gmane.emacs.orgmode/95348>
2015-02-23 18:44:52 +01:00
Nicolas Goaziou e4da74c452 org-habit: Fix 6652baa39d
* lisp/org-habit.el (org-habit-parse-todo): Fix regexp introduced in
  6652baa39d.
2015-02-22 17:26:21 +01:00
Nicolas Goaziou 6652baa39d org-habit: Small refactoring
* lisp/org-habit.el (org-habit-parse-todo): Small refactoring.
2015-02-22 17:12:56 +01:00
Nicolas Goaziou 4eb4f47141 Simplify `org-show-context' configuration
* lisp/org.el (org-show-context-detail): New variable.
(org-context-choice, org-show-following-heading, org-show-siblings,
org-show-entry-below, org-show-hierarchy-above): Remove variables.
(org-show-set-visibility): New function.
(org-convert-to-oddeven-levels, org-get-location, org-show-context,
org-reveal): Use new function.
(org-link-search): Update docstring.

* lisp/org-agenda.el (org-agenda-cycle-show): Use new function.
(org-agenda-show): Replace missing variable.

* testing/lisp/test-org.el (test-org/show-set-visibility): New test.

* doc/org.texi (Sparse trees):
* doc/orgguide.texi (Sparse trees): Document changes.

* etc/ORG-NEWS: Signal changes.

Configuration of `org-show-context' is done with a single variable
offering six different views, instead of four variables for a total
of 16 configurations.
2015-02-22 14:57:09 +01:00
Nicolas Goaziou 1ba7d23c52 Small fix
* lisp/org.el (org-mode-flyspell-verify): Small fix.
2015-02-22 11:41:01 +01:00
Arni Magnusson f79bc6d6c6 Add documentation regarding reserved keywords in @node Headlines 2015-02-21 18:30:35 +01:00
Nicolas Goaziou fa145361ec ox: Allow to narrow scope in footnotes API
* lisp/ox.el (org-export--footnote-reference-map,
  org-export-collect-footnote-definitions,
  org-export-footnote-first-reference-p,
  org-export-get-footnote-number): Allow to specify scope, through
  a new optional argument.

* lisp/ox-odt.el (org-odt-footnote-reference): Apply API change.

* testing/lisp/test-ox.el (test-org-export/footnote-first-reference-p,
  test-org-export/get-footnote-number,
  test-org-export/collect-footnote-definitions): Update tests.
2015-02-21 11:29:40 +01:00
Nicolas Goaziou 719dda85ea ox: Small refactoring
* lisp/ox.el (org-export-document-properties): New variable.
(org-export-prune-tree, org-export-remove-uninterpreted-data): Use new variable.
2015-02-20 18:50:27 +01:00
Nicolas Goaziou 014de0a532 ox: Change `org-export-collect-footnote-definitions' signature
* lisp/ox.el (org-export-collect-footnote-definitions): Refactor
  code.  Change signature.

* testing/lisp/test-ox.el (test-org-export/collect-footnote-definitions):
  New test.
(test-org-export/footnotes): Update test.

* lisp/ox-ascii.el (org-ascii-inner-template):
* lisp/ox-html.el (org-html-footnote-section): Apply signature change.

* etc/ORG-NEWS: Document signature change.

This change makes `org-export-collect-footnote-definitions' compatible
with `org-export-get-footnote-number' and
`org-export-footnote-first-reference-p'.
2015-02-20 18:06:23 +01:00
Nicolas Goaziou 21c6a1e1e9 org-habit: Update copyright year 2015-02-20 16:25:08 +01:00
Nicolas Goaziou de51e1aef6 org-habit: Extend tracking to done notes
* lisp/org-habit.el (org-habit-parse-todo): Also find timestamps when
  `org-log-done' is `note'.

Reported-by: Andrew Francis Swann <swann@math.au.dk>
2015-02-20 10:45:59 +01:00
Rasmus 1616e08448 org.el: Backwards compatibility
* org.el (org-cdlatex-environment-indent): Remove cl-prefixes for
  compatibility.
2015-02-20 01:35:34 +01:00
Rasmus 507d2aae0f Fix bug introduced in 438d75c
* ox-latex.el (org-latex--format-spec): Fix bug.
2015-02-20 00:05:56 +01:00
Rasmus 438d75c59d ox-latex: Format-spec for hyperref and title
* ox-latex.el (org-latex--format-spec): New function with format-specs.
  (org-latex-template): Use org-latex--format-spec.
  (org-latex-hyperref-template): New defaults and use
  org-latex--format-spec.
  (org-latex-title-command): Use org-latex--format-spec.
* ORG-NEWS: Mention change.
2015-02-19 22:41:02 +01:00
Rasmus 14a9510ce1 org.el: Change indention for cdlatex environments
* org.el (org-cdlatex-environment-indent): Use different indent
  algorithm based on content above the new latex-environment.
2015-02-19 22:40:51 +01:00
Nicolas Goaziou 38ab8b2af3 Fix `org-time-stamp'
* lisp/org.el (org-time-stamp): Properly insert time when specified.

This fixes e50baa4cf7.

Reported-by: Rasmus <rasmus@gmx.us>
<http://permalink.gmane.org/gmane.emacs.orgmode/95210>
2015-02-19 10:33:26 +01:00
Nicolas Goaziou 7745ef04c9 ob-core: Allow spaces in NAME
* lisp/ob-core.el (org-babel-src-name-w-name-regexp): Allow spaces as
  NAME value.

Suggested-by: Joost Helberg <joost@snow.nl>
<http://permalink.gmane.org/gmane.emacs.orgmode/95175>
2015-02-18 15:02:22 +01:00
Nicolas Goaziou 5894a74500 org-src: Update copyright year 2015-02-18 14:58:36 +01:00
Nicolas Goaziou a5f1a3e4be org-src: Small refactoring
* lisp/org-src.el (org-src--remove-overlay): New function.
(org-src--edit-element, org-src-mode-configure-edit-buffer): Use new
function.
2015-02-18 02:05:57 +01:00
Nicolas Goaziou 2dd548a4e0 Merge branch 'maint' 2015-02-18 02:04:39 +01:00
Nicolas Goaziou c41bbc577e Fix "Wrong type argument: overlayp"
* lisp/org-src.el (org-src-mode-configure-edit-buffer): Fix "Wrong
  type argument: overlayp".

Changing major mode in a source edit buffer resets local variables
used to link it to source buffer.  As a consequence, overlay in source
buffer can no longer be found nor deleted.
2015-02-18 01:59:51 +01:00
Łukasz Gruner 451c7b3247 Fix documentation-function for elisp-mode in emacs24 2015-02-16 06:05:30 +01:00
Paul Sexton da6e5a7eaf Updated org-drill to version 2.4.5. 2015-02-16 15:12:10 +13:00
Nicolas Goaziou 0d24086657 Update some copyright years 2015-02-16 01:40:07 +01:00
Nicolas Goaziou 7ebe87e2d5 org-element: Forbid footnote references in parsed keywords
* lisp/org-element.el (org-element-object-restrictions): Forbid
  footnote references in parsed keywords.

Inserting footnote references in parsed keywords (e.g., TITLE or
CAPTION) can lead to subtle bugs.  Indeed, it is impossible to know in
time if that particular footnote is going to be used in the output,
and, therefore, if it should count, e.g., in
`org-export-get-footnote-number'.
2015-02-15 21:56:57 +01:00
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