Commit Graph

9797 Commits

Author SHA1 Message Date
Nicolas Goaziou 815cfb6c02 ox: Reorder keywords in export templates
* lisp/ox.el (org-export-insert-default-template): Do not hard-code
  alphabetical order for keywords in templates.  Instead, follow order
  specified in back-ends or `org-export-options-alist' for the default
  case.
2014-01-22 15:33:38 +01:00
Bastien Guerry 0b67b7e283 Merge branch 'maint' 2014-01-22 11:44:59 +01:00
Bastien Guerry 77458b782a org-compat.el (org-set-transient-map): New alias
* org-compat.el (org-set-transient-map): Alias pointing at
`set-transient-map' if defined, at `set-temporary-overlay-map'
otherwise.

Thanks to Eric Abrahamsen for reporting this.
2014-01-22 11:42:51 +01:00
Nicolas Goaziou 410b6a65f9 Merge branch 'maint' 2014-01-21 23:40:33 +01:00
Justin Gordon d91650b854 ox-md: Set correctly blank lines between elements
* lisp/ox-md (org-md-separate-elements): Fix blank line insertion
  between elements.
* lisp/ox-md.el (org-md-inner-template): New function.
2014-01-21 23:39:23 +01:00
Nicolas Goaziou 34edfd846f org-element: Preserve Emacs 23 compatibility
* lisp/org-element.el (org-element--cache-mapc): New function.
(org-element--cache-sync): Use new function.

`avl-tree-mapc' exists in Emacs 24's "avl-tree" but not in Emacs
23's. The new function implements it.
2014-01-21 18:17:33 +01:00
Bastien Guerry 630096ca6d Merge branch 'maint' 2014-01-20 22:40:42 +01:00
Bastien Guerry ac7fb4dd79 org.el (org-priority): Don't use `org-preserve-lc'
* org.el (org-priority): Don't use `org-preserve-lc' as it is
not necessary here.
2014-01-20 22:40:37 +01:00
Bastien Guerry e5259962f6 org-agenda.el: Fix buglets
* org-agenda.el (org-agenda-next-item)
(org-agenda-previous-item, org-agenda-toggle-archive-tag)
(org-agenda-todo, org-agenda-priority, org-agenda-clock-in)
(org-agenda-clock-out): Put the cursor back on the correct
column, when possible.
(org-agenda-todo): When `org-clock-out-when-done' is `t', also
remove the current clock overlay.
2014-01-20 22:34:18 +01:00
Nicolas Goaziou 5f38f7b7b0 org-element: Comply to Emacs 23 signature requirements
* lisp/org-element.el (org-element--cache-sync): Call
  `avl-tree-delete' with 2 arguments only as a 4-arguments call is
  only compatible with Emacs 24.1 and later.
2014-01-20 19:03:50 +01:00
Nicolas Goaziou e5617b88cb Merge branch 'maint' 2014-01-20 17:16:32 +01:00
Bastien Guerry 80fc5adb58 org.el (org-provide-todo-statistics): Allow to set to a list of two lists, for TODO and DONE keywords
* org.el (org-provide-todo-statistics): Allow to set to a list
of two lists, one with TODO keywords, the other one with DONE
keywords.
(org-update-parent-todo-statistics): Correctly handle
`org-provide-todo-statistics' when it is set as a list of two
lists, for TODO and DONE keywords.

Thanks to Fletcher Charest for reporting this and requesting
this feature.
2014-01-20 16:06:19 +01:00
Bastien Guerry ea0d35674f org.el: New command org-insert-last-stored-link bound to `C-c M-l'
* org.el (org-insert-all-links): New parameters `pre' and
`post' to specify a string to preprend and append.
(org-insert-last-stored-link): New command.
(org-mode-map): Bind the new command to `C-c M-l'.

Thanks to Sébastien Vauban for requesting this and to Nick
Dokos for testing and fixing the patch.
2014-01-20 15:37:25 +01:00
Nicolas Goaziou dde6af3a62 ob-exp: Fix export of src blocks with flags
* lisp/ob-exp.el (org-babel-exp-code): Fix export of src blocks with
  flags.
* testing/lisp/test-ob-exp.el (ob-export/export-src-block-with-flags):
  New test.

Thanks to Giuseppe Lipari for reporting it.
2014-01-20 14:20:06 +01:00
Sylvain Chouleur 5a2d47e1ba Fix `org-outline-overlay-data' marker insertion-type
* org.el (org-outline-overlay-data): Set the insertion-type of end
bound marker of the function to t (means marker advances when you
insert text at it)

This is to conserve outline visibility property when changes are made
at the end bound of the data.
For example: try `org-babel-execute-subtree' on a folded outline:
The new result will be shown after the folded part of the outline
whereas the outline body should not be visible.

TINYCHANGE
2014-01-19 22:00:02 +01:00
Nicolas Goaziou 5f04b3815f Fix ae0f1c56a7
* lisp/org.el (org-toggle-item): Fix ae0f1c56a7.
2014-01-19 18:15:56 +01:00
Bastien Guerry 848d1926ec Merge branch 'maint' 2014-01-19 16:45:37 +01:00
Bastien Guerry 25e4e5b6f0 org.el (org-format-latex-options): Fix docstring
* org.el (org-format-latex-options): Fix docstring.

Thanks to Mirko Vukovic for reporting this.
2014-01-19 16:44:21 +01:00
Bastien Guerry 84aabd700e Merge branch 'maint' 2014-01-19 16:37:42 +01:00
Bastien Guerry f4715f1652 ox.el (org-export--get-subtree-options): Fix bug
* ox.el (org-export--get-subtree-options): When using the
headline as a title for a subtree export, only take the true
heading, no TODO keyword, no priority cookie, no tag.

Thanks to Robert Klein for reporting this.
2014-01-19 16:37:25 +01:00
Nicolas Goaziou fd877a7380 org-element: Small optimization
* lisp/org-element.el (org-element-at-point): Do not call
  `outline-next-heading' when an element at top level contains point.
  This is particularly important when the current section ends way
  after the point.
2014-01-19 15:06:09 +01:00
Eric Schulte cd3bc12a29 named and caching call lines working
* lisp/ob-core.el (org-babel-current-result-hash): Additional info
  argument so that named call line results may be found.
  (org-babel-set-current-result-hash): Additional info argument so
  that named call line results may be found.
* lisp/ob-lob.el (org-babel-lob-execute): Passing info to hash finding
  functions so that named results may be found.
2014-01-18 13:40:57 -07:00
Eric Schulte 6c0992939d do not eval vars in call lines before hashing
* lisp/ob-lob.el (org-babel-lob-execute): Do not eval vars in call
  lines before hashing, because for a call lines variable
  expansion *is* evaluation.
2014-01-18 13:40:57 -07:00
Nicolas Goaziou c25c80e3f3 Merge branch 'maint' 2014-01-18 15:40:43 +01:00
Nicolas Goaziou 3f9a6916aa ob-exp: Fix code execution in some corner cases
* lisp/ob-exp.el (org-babel-exp-process-buffer): Make processing more
  robust when results are inserted before source block or when source
  block is followed by multiple blank lines.
* testing/lisp/test-ob-exp.el (ob-export/export-with-results-before-block):
  Add test.
2014-01-18 15:32:41 +01:00
Bastien Guerry 92c9b69b7f Merge branch 'maint' 2014-01-18 09:17:33 +01:00
Bastien Guerry 7b2af7cb60 Backport Emacs changes from r116063 2014-01-18 09:17:14 +01:00
Nicolas Goaziou a3fab8d899 Merge branch 'maint' 2014-01-17 22:17:39 +01:00
Nicolas Goaziou b0ac2f6ac0 ox: Remove clutter from export templates
* lisp/ox.el (org-export-insert-default-template): Only insert
  keywords and options relatives to the selected back-end.  Ignore
  those relatives to its parent in the case of a derived back-end.
2014-01-17 22:16:41 +01:00
Nicolas Goaziou bf304c3485 Merge branch 'maint' 2014-01-17 12:45:21 +01:00
Nicolas Goaziou 1e25d087dd ox-beamer: Small clean-up
* lisp/ox-beamer.el: Remove unnecessary package definitions in default
  class.
2014-01-17 12:44:05 +01:00
Rick Frankel e955be903a Add better svg support to html exporter.
* lisp/ox-html.el (org-html--format-image): If image is an svg file,
  format as "object" using new function `org-html--svg-image' instead
  of "img".
2014-01-16 17:35:55 -05:00
Rick Frankel 1376df2648 Use an overridable list of available doctypes for customization.
* lisp/ox-html.el (org-html-doctype): Use choice of available
  doctypes (from `org-html-doctype-alist) plus user-entered string.
2014-01-16 17:35:39 -05:00
Nicolas Goaziou 6ef2bd0ef0 Merge branch 'maint' 2014-01-16 16:24:15 +01:00
Yasushi SHOJI b7c1014353 ox-ascii: Convert `length' to `string-width'
* lisp/ox-ascii.el (org-ascii--current-text-width): Convert `length'
  to `string-width'.
  (org-ascii--build-title, org-ascii--build-toc)
  (org-ascii--list-listings, org-ascii--list-tables)
  (org-ascii-template--document-title)
  (org-ascii-inner-template, org-ascii-format-inlinetask-default)
  (org-ascii-format-inlinetask-default, org-ascii-item
  (org-ascii--table-cell-width, org-ascii-table-cell)
  (org-ascii--current-text-width): Likewise.

I've checked all occurrences of the function `length' in ox-ascii.el.
It turns out that the most of them are calculating the width of given
string.  To support fullwidth characters, we better use `string-width'
instead of `length'.

Some characters in UCS are categorized as "East Asian Ambiguous"[1].
The return value of `string-width' with those characters depends on
how Emacs is setup.  We leave those ambiguous character handling to
Emacs.

Two usages of `length' in `ox-ascii.el' were left as-is, because those
were used for:

 - bullet depth calculation in `org-ascii-headline', and
 - cell position calculation in `org-ascii--table-cell-width'.

[1]: http://www.unicode.org/reports/tr11/#Ambiguous
2014-01-16 16:17:48 +01:00
Nicolas Goaziou d99ffcf954 Merge branch 'maint' 2014-01-16 15:52:12 +01:00
Nicolas Goaziou 7d3205a20f ox-latex: Fix items starting with a square bracket
* lisp/ox-latex.el (org-latex-headline, org-latex-item): Fix items
  starting with a square bracket.

Thanks to Jon Degenhardt, Vladimir Lomov and Eric S Fraga for
contributing to the discussion.
2014-01-16 15:49:34 +01:00
Bastien Guerry 81dad90342 Merge branch 'maint' 2014-01-16 12:07:37 +01:00
Bastien Guerry d16477913d Fix ff902c 2014-01-16 12:07:27 +01:00
Bastien Guerry 3fafad7eec Merge branch 'maint' 2014-01-16 11:57:55 +01:00
Bastien Guerry be54f049dd Backport Emacs trunk revno r116039 2014-01-16 11:57:45 +01:00
Bastien Guerry c7408a2bd7 Merge branch 'maint' 2014-01-16 01:19:49 +01:00
Nicolas Goaziou d4b653656e org.el (org-mode-restart): Fix turning off `org-indent-mode' when necessary
* org.el (org-mode-restart): Fix turning off `org-indent-mode'
when necessary.
2014-01-16 01:18:30 +01:00
Bastien Guerry a4a2935c3f org.el (customize-package-emacs-version-alist): Fix Org version for Emacs 24.4
* org.el (customize-package-emacs-version-alist): Fix Org
version for Emacs 24.4.
2014-01-16 01:13:15 +01:00
Bastien Guerry 73a6aba4b7 org.el (customize-package-emacs-version-alist): Fix Org version for Emacs 24.4
* org.el (customize-package-emacs-version-alist): Fix Org
version for Emacs 24.4.
2014-01-16 01:12:51 +01:00
Bastien Guerry c31782d903 org.el (org-src-fontify-natively): Default to `t'
* org.el (org-src-fontify-natively): Default to `t'.

Thanks to Sébastien Vauban for pushing this.
2014-01-16 01:11:33 +01:00
Bastien Guerry a5a7231304 Merge branch 'maint' 2014-01-16 00:55:46 +01:00
Bastien Guerry e7ebe4163a Fix bf0649 2014-01-16 00:53:28 +01:00
Bastien Guerry ff902c4429 Remove spurious defvar
Thanks to Nicolas Goaziou for reporting this.
2014-01-16 00:52:46 +01:00
Bastien Guerry 27ab61acd0 Fix 4a9820 2014-01-16 00:35:12 +01:00