Commit graph

8773 commits

Author SHA1 Message Date
Bastien Guerry 9d72d34bda org.el (org-options-keywords): Add #+TARGET
* org.el (org-options-keywords): Add #+TARGET.
2013-04-03 18:28:29 +02:00
Bastien Guerry 00a227c0d2 org-clock.el: Set clock markers to nil on clock out/cancel
* org-clock.el (org-resolve-clocks-if-idle): Only try to
resolve last clock if the clock buffer still exists.
(org-clock-out, org-clock-cancel): Set markers to nil.

Thanks to John Wiegley for reporting this bug.
2013-04-03 18:28:29 +02:00
Aaron Ecay 5b3508698b Clean up org-babel-expand-body: functions for awk and picolisp
* lisp/ob-awk.el (org-babel-expand-body:awk),
  lisp/ob-picolisp.el (org-babel-expand-body:picolisp): remove optional
  arg from these functions

The optional argument is apparently never passed by org-babel code.
Maybe this is a relic of an earlier calling convention?
2013-04-03 09:17:22 -06:00
Eric Schulte cd9d3d948e remove save-excursion inside save-window-excursion
it is not necessary

* lisp/ob-R.el (org-babel-R-initiate-session): Remove unnecessary
  save-excursion nested inside a save-window-excursion.
2013-04-03 09:17:12 -06:00
Aaron Ecay fe98647f14 Fix org-babel-R-initiate-session
* lisp/ob-R.el (org-babel-R-initiate-session): handle case where the
  session buffer exists, but does not have a live process

If the session buffer exists, but the user has exited the R process
manually, then the (R) command will create a new buffer, then try to
rename it over the old buffer, causing an error.  The right thing to do
is to start R within the existing buffer.
2013-04-03 09:17:06 -06:00
Eric Schulte 2f39a704cf removing alternate code block variable syntax
* doc/org.texi (var): Remove the "Alternate argument syntax" section
  from the documentation.
* lisp/ob-core.el (org-babel-src-name-w-name-regexp): Update the regexp
  used to match code block names.
  (org-babel-get-src-block-info): Remove the code used to parse this
  alternate variable specification syntax.
2013-04-03 09:17:00 -06:00
Rasmus 04b13a0e0e contrib/lisp/org-bbdb.el: Use `bbdb-record-xfield' when available
* contrib/lisp/org-bbdb.el (bbdb-record-xfield): Declare.
(org-bbdb-make-anniv-hash): Use it and fall back on
`bbdb-record-note' if not defined.

TINYCHANGE
2013-04-03 13:54:17 +02:00
Bastien Guerry a597a8b622 ox-html.el and ox-org.el: Use the custom HTML extension.
* ox-org.el (org-org-publish-to-org):
* ox-html.el (org-html-publish-to-html): Use the custom
extension.

Thanks to Ian Barton for reporting this.
2013-04-03 13:25:11 +02:00
Bastien Guerry b70ec7a29c org.el (org-cycle-internal-local): Fix invalid search bound
* org.el (org-cycle-internal-local): Fix invalid search bound
when `org-cycle-include-plain-lists' is set to 'integrate.

Thanks to James Harkins for reporting this.
2013-04-03 12:43:42 +02:00
Nicolas Goaziou e7bf989b28 export back-ends: Handle DATE keyword in a uniform way
* lisp/ox-ascii.el (org-ascii-template--document-title): Use new function.
* lisp/ox-beamer.el (org-beamer-template): Use new function.
* lisp/ox-html.el (org-html-format-spec): Use new function.
* lisp/ox-latex.el (org-latex-template): Use new function.
(org-latex-date-timestamp-format): Remove variable.

The uniform way is to format DATE according to
`org-export-date-timestamp-format' when keyword value consists in
a single timestamp.
2013-04-02 23:59:00 +02:00
Nicolas Goaziou 0bd6ccd6f9 ox: Add generic function to retrieve the date of a document
* lisp/ox.el (org-export-date-timestamp-format): New variable.
(org-export-get-date): New function.
* testing/lisp/test-ox.el: Add tests.
2013-04-02 23:55:28 +02:00
Nicolas Goaziou 9c854372ff ox-odt: Fix export of footnotes outside subtree during subtree export
* etc/styles/OrgOdtStyles.xml: Define "OrgFootnoteCenter" and
  "OrgFootnoteQuotations" styles.
* lisp/ox-odt.el (org-odt--format-paragraph): New function.
(org-odt-paragraph): Use new function to limit code duplication.
(org-odt-footnote-reference): Change default style for paragraphs when
transcoding a footnote definition.
2013-04-01 17:23:32 +02:00
Nicolas Goaziou a82b06ae4b org-macro: Properly handle macros in setup files
* lisp/org-macro.el (org-macro--collect-macros): Fix a bug where
  reading a macro in a setup file would remove other macros read so
  far from template.  Change function signature.
(org-macro-initialize-templates): Apply signature change from function
above.
* testing/lisp/test-org-macro.el: Add test.
2013-04-01 15:47:39 +02:00
Nicolas Goaziou 55db57dc0a ox: Properly transfer bound variables through export process
* lisp/ox.el (org-export--list-bound-variables): Renamed from
  `org-export--install-letbind-maybe'.  Though, only return list of
  bound variables instead of installing them as buffer-local
  variables.
(org-export-get-environment): Use new function.  Take care of the
installation of bound variables.
(org-export--generate-copy-script): Make sure non-Org variables are
also installed in buffer copy.
* testing/lisp/test-ox.el: Add test.
2013-04-01 15:20:52 +02:00
Aaron Ecay fa3b4830b8 ox-latex: Properly escape ~ for export
* lisp/ox-latex.el:
(org-latex-plain-text): Properly escape ~ for LaTeX export

In LaTeX, \~ gives a tilde diacritic (as in ã).  \textasciitilde{} is
the correct escape for a tilde.
2013-04-01 09:55:07 +02:00
Bastien Guerry 6caddbca05 org.el (org-sparse-tree-default-date-type): Add an option for closed time-stamps
* org.el (org-sparse-tree-default-date-type): Add an option
for closed time-stamps.
(org-sparse-tree): Allow to check against closed time-stamps.
(org-re-timestamp): Handle closed time-stamps.
(org-closed-in-range): Delete.
2013-03-30 20:06:32 +01:00
Bastien Guerry 2c41456b1d org-capture.el (org-capture-import-remember-templates): Take care of adding :jump-to-captured option if needed
* org-capture.el (org-capture-import-remember-templates): Take
care of adding :jump-to-captured option if needed.
2013-03-30 19:03:09 +01:00
Bastien Guerry b802df337a org.el (org-raise-scripts): Handle scripts like "a_b^c"
* org.el (org-toggle-pretty-entities): Enhance messages.
(org-raise-scripts): Handle scripts like "a_b^c".

Thanks to Jae Hee Lee for reporting this.
2013-03-30 15:55:57 +01:00
Bastien Guerry 15c3792f2b org-capture.el: New capture template option :jump-to-captured
* org-capture.el (org-capture-templates): Document new option
:jump-to-captured in the docstring.  Offer the complete list
of options when customizing.
(org-capture-finalize): Handle :jump-to-captured.

This emulates the behavior triggered by %& in remember templates.

Thanks to Adam Spiers for reporting this.
2013-03-30 15:43:30 +01:00
Eric Schulte 221da3ad27 cycle tables for :results org and :results wrap
* lisp/ob-core.el (org-babel-insert-result): Cycle tables for :results
  org and :results wrap.
2013-03-29 17:57:06 -06:00
Eric Schulte d136eb20c7 fixed a bug pointed out by Gary Oberbrunner
* lisp/ob-python.el (org-babel-python-initiate-session-by-key): Fixed a
  bug pointed out by Gary Oberbrunner.
2013-03-29 15:12:57 -06:00
Nicolas Goaziou 7736c2d7fb ox: Handle BIND keywords in SETUPFILE files
* lisp/ox.el (org-export-get-environment): Update comment.
(org-export--install-letbind-maybe): Go into SETUPFILE files and
handle BIND keywords there.
* testing/examples/setupfile.org: Update test file.
* testing/lisp/test-ox.el: Add tests.
2013-03-29 21:51:57 +01:00
Eric Schulte 2a0e45f701 Add "-i" to the python command on windows sessions
Thanks to Gary Oberbrunner for showing how to do this, and noticing
 that it was required, and even for submitting a patch which I
 unfortunately didn't notice until it had already been overcome by
 events.

* lisp/ob-python.el (org-babel-python-initiate-session-by-key): Add "-i"
  to the python command on windows sessions
2013-03-29 14:28:29 -06:00
Christopher Schmidt 310e76b744 org.el (orgstruct-make-binding): Keep modifiers when translating keys
* org.el (orgstruct-make-binding): Keep modifiers when
translating keys.
2013-03-29 20:35:54 +01:00
Eric Schulte e431298fda actually setting new session names
* lisp/ob-python.el (org-babel-python-initiate-session-by-key): Actually
  setting new session names.
2013-03-29 12:49:39 -06:00
Eric Schulte 993e3ee621 fixed ob-python to work with newest Emacs
* lisp/ob-python.el (org-babel-python-with-earmufs): Add earmufs to a
  buffer name.
  (org-babel-python-without-earmufs): Remove earmufs from a buffer name.
  (org-babel-python-initiate-session-by-key): Set the buffer name in a
  way which is understandable by the new python.el
2013-03-29 10:45:01 -06:00
Eric Schulte 9e9edd4830 change the default python buffer name
Working to fix a bug introduced by recent upstream changes in
  python.el in Emacs.

* lisp/ob-python.el (org-babel-python-buffers): Change the default
  python buffer name.
  (org-babel-python-initiate-session-by-key): Pass Python buffer names
  to the new `run-python' command.
2013-03-29 10:31:37 -06:00
Eric Schulte df0c8a3bc4 don't interpret single "-" as a number
* lisp/ob-core.el (org-babel-number-p): Don't interpret single "-" as a
  number.
2013-03-29 08:48:59 -06:00
Bastien Guerry 575c9f16c3 org.el (org-agenda-prepare-buffers): Fix bugs
* org.el (org-agenda-prepare-buffers): Fix bugs: don't
let-bind `org-tag-alist' to nil and don't append duplicate
tags to `org-tag-alist-for-agenda'.

Thanks to Toby Cubitt for reporting this.
2013-03-28 22:28:15 +01:00
Nicolas Goaziou 2746c764c6 ox-latex: Do not prefix relative paths with "file://"
* lisp/ox-latex.el (org-latex-link): Do not prefix relative paths with
  "file://".
2013-03-27 23:24:50 +01:00
Nicolas Goaziou 7f9893887e Preserve priority of #+TARGET over #+NAME when resolving a link
* lisp/org.el (org-link-search): Preserve priority of #+TARGET over
  #+NAME when resolving a link.  This reverts partially commit
  49b14b0224.
2013-03-27 23:14:56 +01:00
Eric Abrahamsen 62bb13e8e7 ox-latex: Allow use of the "tabu" and "longtabu" table environments
* lisp/ox-latex.el (org-latex--org-table, org-latex-table-row): Allow
  use of the "tabu" and "longtabu" table environments.  New table
  attribute :spread handles the width specification syntax of "tabu"
  and "longtabu" table environments.
2013-03-27 15:26:41 +01:00
Nicolas Goaziou 03b59ed1f9 ox-latex: :long-listing avoids wrapping src-blocks within floats
* lisp/ox-latex.el (org-latex-long-listings): New variable.
(org-latex-src-block): Use new variable.
2013-03-27 15:04:18 +01:00
Bastien Guerry aa7b1e0b39 Merge branch 'master' of orgmode.org:org-mode 2013-03-26 16:00:56 +01:00
Bastien Guerry 4184699910 Revert "org-capture.el (org-capture): Don't store multiple links over lines in the active region"
This reverts commit 2c994218ea.
2013-03-26 14:16:56 +01:00
Bastien Guerry caabb0c3be org.el (org-store-link): Storing multiple links in the active region now requires a triple prefix argument
* org.el (org-store-link): Storing multiple links in the
active region now requires a triple prefix argument.

Thanks to Matt Lundin for reporting bugs in this area.
2013-03-26 13:50:07 +01:00
Bastien Guerry 49b14b0224 org.el (org-store-link, org-link-search): Fix handling of links to #+NAME and #+TARGET keywords
* org.el (org-store-link, org-link-search): Fix handling of
links to #+NAME and #+TARGET keywords.
2013-03-26 13:23:45 +01:00
Bastien Guerry 308f380ebc org-compat.el (org-ignore-region): Tiny docstring fix
* org-compat.el (org-ignore-region): Tiny docstring fix.
2013-03-26 12:50:14 +01:00
Max Mikhanosha 9594249b4d Fix agenda generation error if agenda had time grid and agenda format
contain effort

* lisp/org-agenda.el (org-agenda-format-item): Ensure effort is "" when unset
2013-03-26 06:55:53 -04:00
Bastien Guerry 2c994218ea org-capture.el (org-capture): Don't store multiple links over lines in the active region
* org-capture.el (org-capture): Don't store multiple links
over lines in the active region.

Thanks to Matt Lundin for reporting this.
2013-03-25 23:49:39 +01:00
Bastien Guerry 8aeea9b02c Revert "ox-odt.el: Fix annotation insertion."
This reverts commit 9eb384fe4f.
2013-03-25 22:45:17 +01:00
Bastien Guerry 57aaaa9330 Revert "Fix previous commit again"
This reverts commit a3e8a1d604.
2013-03-25 22:45:06 +01:00
Nicolas Goaziou a6d9fd82ea ox: White spaces after export snippets are never ignored
* lisp/ox.el (org-export-data): White spaces after export snippets are
  never ignored.
* testing/lisp/test-ox.el: Add test.

Back-end developers should pay attention to the fact that white spaces
before and after an ignored export snippet now are accumulated in the
output.
2013-03-25 20:29:31 +01:00
Bastien Guerry a3e8a1d604 Fix previous commit again
Now off.
2013-03-25 18:28:50 +01:00
Bastien Guerry 9eb384fe4f ox-odt.el: Fix annotation insertion.
* ox-odt.el (org-odt-special-block): Don't wrap annotations
into <text:p>...</text:p> at all.
(org-odt--fix-annotations): New defun.
(org-odt--export-wrap): Use the new defun to fix annotations
insertion in content.xml.

Please don't insult me because of the uglyness of this fix.
Send me a proper fix instead!
2013-03-25 18:05:06 +01:00
Bastien Guerry e7cfb4d13c org.el (org-mode-flyspell-verify): Require 'org-element so that `org-element-affiliated-keywords' is defined
* org.el (org-mode-flyspell-verify): Require 'org-element so
that `org-element-affiliated-keywords' is defined.

Thanks to Matt Lundin for reporting this.
2013-03-25 17:01:18 +01:00
Bastien Guerry f09471e5d9 ox-odt.el (org-odt-special-block): Don't insert annotations using style "Text_20_body"
* ox-odt.el (org-odt-special-block): Don't insert annotations
using style "Text_20_body".

Thanks to Christian Moe for reporting this bug.
2013-03-25 16:12:24 +01:00
Bastien Guerry e800105122 Merge branch 'master' of orgmode.org:org-mode 2013-03-25 15:54:42 +01:00
Bastien Guerry ce8706f268 Fix commit 3abd5e 2013-03-25 15:54:36 +01:00
Bastien Guerry dd3fbd246e Fix commit a9880a
* org.el (org-toggle-tags-groups): Correctly highlight group
tags.
(org-tags-expand): Expand tags as words, with characters ?@
and ?_ being considered words constituents.
2013-03-25 15:53:21 +01:00
Carsten Dominik 181abcaf29 Merge branch 'master' of orgmode.org:org-mode 2013-03-25 15:49:35 +01:00
Carsten Dominik 21fead7888 Revert "Work around calc-eval regression"
This reverts commit 10e239f434.
2013-03-25 15:48:56 +01:00
Eric Schulte 727a22e327 print Perl variables with a format string
Don't use princ because it doesn't always return a string.

Thanks to Rick Frankel for pointing this out.

* lisp/ob-perl.el (org-babel-perl--var-to-perl): Print Perl variables
  with a format string.
2013-03-25 07:39:40 -06:00
Carsten Dominik acff82f9fe Merge branch 'master' of orgmode.org:org-mode 2013-03-25 11:48:40 +01:00
Carsten Dominik 10e239f434 Work around calc-eval regression
* lisp/org-table.el (org-table-eval-formula): Work-around for
  calc-eval regression.

Calc-eval can no longer be called without initializing the
*Calculator* buffer first.
2013-03-25 11:48:21 +01:00
Bastien Guerry 78959943e2 Merge branch 'master-group-tags2' 2013-03-25 06:59:23 +01:00
Bastien Guerry d26431cea4 org.el (org-set-regexps-and-options): Don't read setup files from read-only buffers
* org.el (org-set-regexps-and-options): Don't read setup files
from read-only buffers.
(org-file-contents): When no-error is non-nil, throw a less
intrusive message.

This commit prevents Gnus to try reading arbitrary files on your machine
when opening a message with #+SETUPFILE keyword.

In general, it prevents reading a setup file from any read-only buffer.

Thanks to Eric Abrahamsen and Andreas Leha for reporting this.
2013-03-25 06:45:33 +01:00
Suhail Shergill 3b2abfce7b bugfix: fix `org-babel-execute-src-block' on remote hosts
* lisp/ob-core.el (org-babel-temp-file): For remote hosts, modify the prefix
  and leave `temporary-file-directory' unchanged.

The reason setting `temporary-file-directory' doesn't work here is
because `make-temp-file' recursively calls itself (indirectly).
Modifying `temporary-file-directly', affects the recursive calls as well,
which results in a "No such file file or directory" error.

The fix is to leave `temporary-file-directory' unaltered, for remote
hosts, and instead modifying the 'prefix' argument to `make-temp-file'
appropriately.

TINYCHANGE
2013-03-25 06:09:14 +01:00
Bastien Guerry 3abd5ef707 org-agenda.el: Re-align leaders to the left
* org-agenda.el (org-agenda-scheduled-leaders)
(org-agenda-deadline-leaders): Re-align leaders to the left,
back to a 11 characters width.

Thanks to Matt Lundin for reporting display problems here.
2013-03-25 06:03:17 +01:00
Bastien Guerry 0f175ea128 org.el (org-refile-cache-check-set): More informative message
* org.el (org-refile-cache-check-set): More informative message.

Thanks to Samuel Wales for raising this.
2013-03-25 05:47:45 +01:00
Bastien Guerry a9880a7710 Implement group tags
* org-agenda.el (org-tags-view): Set the matcher after
preparing the agenda, as `org-tag-groups-alist-for-agenda'
might be needed.
(org-agenda-filter-make-matcher): New parameter `filter' and
`type'.  Handle group tags.
(org-agenda-filter-expand-tags): New function.
(org-agenda-filter-apply): Handle group tags.

* org.el (org-blank-before-new-entry): Tiny docstring fix.
(org-tag-alist-for-agenda): Add docstring.
(org-tag-groups-alist-for-agenda): New global variable.
(org-tag-groups-alist): New buffer-local variable.
(org-tag-alist, org-tag-persistent-alist): Handle :grouptags.
(org-group-tags): New option.
(org-toggle-group-tags): New command.
(org-mode-map): Bind `org-toggle-group-tags' to `C-c C-x q'.
(org-set-regexps-and-options-for-tags): New function, factored
out from `org-set-regexps-and-options'.
(org-set-regexps-and-options): Don't handle tags, they are now
handled separately by `org-set-regexps-and-options-for-tags'.
(org-assign-fast-keys): Handle :grouptags.
(org-mode): Use `org-set-regexps-and-options-for-tags' on top
of `org-set-regexps-and-options'.
(org-fontify-meta-lines-and-blocks-1): Fontify group tags.
(org-make-tags-matcher): Expand group tags in the matcher.
(org-tags-expand): New function.
(org-tags-completion-function): Tiny code clean up.
(org-set-current-tags-overlay): Add a docstring.
(org-fast-tag-selection): Highlight group tags.
(org-agenda-prepare-buffers): Set `org-tag-alist-for-agenda'
and `org-tag-groups-alist-for-agenda'.  Don't uniquify
`org-tag-alist-for-agenda' as we may need the grouping
information for filtering in the agenda buffer.
(org-uniquify-alist): New function.

* org-pcomplete.el (pcomplete/org-mode/file-option/tags):
Handle :grouptags.

* org-faces.el (mode-line): New face for group tags.
2013-03-25 05:42:35 +01:00
Bastien Guerry 7610231952 ob-core.el (org-babel-hash-show-time): tiny Docstring enhancement
* ob-core.el (org-babel-hash-show-time): tiny Docstring enhancement.
2013-03-25 05:41:58 +01:00
Nicolas Goaziou 42e1a6351d org-element: Allow to escape escaping character before a comma
* lisp/org-element.el (org-element-macro-parser): Allow to escape
  escaping character before a comma.  Also do not trim spaces at
  argument boundaries.
* doc/org.texi (Macro replacement): Update documentation about
  possible locations and escaping mechanism.
* testing/lisp/test-org-element.el: Add tests.

With this patch, macro's arguments are read as the following:

  "a,b"     -> '("a" "b")
  "a\,b"    -> '("a,b")
  "a\\,b"   -> '("a\" "b")
  "a\\\,b"  -> '("a\,b")
  "a\\\\,b" -> '(a"\\" "b")

Note that with the patch, you only need to escape backslashes before
a comma:

  "a\\b\,c" -> '("a\\b,c")
2013-03-23 20:42:34 +01:00
Nicolas Goaziou 7847b4d7a8 ox: Fix coding system problem in asynchronous export
* lisp/ox.el (org-export-async-start): Use correct coding system so
  unibyte characters do not appear in the resulting buffer or file.
2013-03-23 19:02:50 +01:00
Bastien Guerry f373bca58b Rename some list variables
* org-element.el (org-element-paragraph-separate): Use
new name `org-list-allow-alphabetical'.

* org-list.el (org-list-allow-alphabetical): Rename from
`org-alphabetical-lists'.
(org-list-empty-line-terminates-plain-lists): Rename from
`org-empty-line-terminates-plain-lists'.
(org-checkbox-hierarchical-statistics): Rename from
`org-hierarchical-checkbox-statistics'.

* org.texi (Plain lists, Checkboxes): Use non-obsolete
variable names.
2013-03-23 17:45:15 +01:00
Bastien Guerry 412d980f28 org.el (org-display-inline-images): Use the #+attr_html: :width syntax
* org.el (org-image-actual-width): Update docstring.
(org-display-inline-images): Use the #+attr_html: :width syntax.
2013-03-21 16:02:19 +01:00
Bastien Guerry d738f047ef org.el (org-modules): Remove deleted libraries, add new ones
* org.el (org-modules): Remove deleted libraries, add new
ones.
2013-03-21 15:53:24 +01:00
Bastien Guerry 51233b8ae2 ox-html.el (org-html-indent): Default to nil
* ox-html.el (org-html-indent): Default to nil, as non-nil can
break indentation of source code blocks.

Thanks to Vladimir Lomov for reporting this.
2013-03-21 14:25:18 +01:00
Nicolas Goaziou fbb30a5e79 ox: Move a function in the file
* lisp/ox.el (org-export--copy-to-kill-ring-p): Move function
  elsewhere in the file.
2013-03-20 16:58:48 +01:00
Bastien Guerry 73fe0ab77a ox-html.el (org-html-link): Don't insert nil if there is no attributes
* ox-html.el (org-html-link--inline-image): Small refactoring.
(org-html-link): Don't insert nil if there is no attributes.

Thanks to Samuel Wales for reporting this.
2013-03-20 07:54:16 +01:00
Bastien Guerry 1fb57438bd Fix code typo in commit 78b3a0 2013-03-20 07:46:53 +01:00
Bastien Guerry 855dcfbf2a Merge branch 'master' of orgmode.org:org-mode 2013-03-20 01:00:24 +01:00
Bastien Guerry 9c1ea74c2b Fix typo in commit a13b19e
Thanks to John Hendy for reporting the bug!
2013-03-20 00:57:56 +01:00
Rick Frankel 78b3a03981 Fix issue with dbi processing in ob-sql.
* lisp/ob-sql.el (org-babel-execute:sql): Unquote cmdline argument in
  format string, dbish requires three separate arguments. Add dbi to
  the list of engines with automatically added header separator.
2013-03-19 16:51:42 -04:00
Bastien Guerry eff59a15d7 ox-html.el: Use the correct syntax for image and link attributes
* ox-html.el (org-html-link--inline-image): Use the correct
syntax for image attributes.  Allow :width :height and :alt as
predefined attributes for inline images.
(org-html-link, org-html-table): Use the standard syntax---
e.g. "#+attr_html: :options ..."--- to get attributes.
2013-03-19 19:39:35 +01:00
Bastien Guerry 9cd0810f90 ox.el (org-export-table-cell-alignment): Treat an empty cell as a number if it follows a number
* ox.el (org-export-table-cell-alignment): Treat an empty cell
as a number if it follows a number.

Thanks to Kodi Arfer for reporting this.
2013-03-19 19:39:35 +01:00
Bastien Guerry 492e20dbfa ox.el (org-export-as): Allow user functions in `org-export-before-parsing-hook' to modify the point
* ox.el (org-export-as): Allow user functions in
`org-export-before-parsing-hook' to modify the point.

Thanks to Charles Berry for reporting this.
2013-03-19 19:39:35 +01:00
Bastien Guerry 1ab084ba73 org.el (org-entry-add-to-multivalued-property): Add the new value by appending it at the end of the line
* org.el (org-entry-add-to-multivalued-property): Add the new
value by appending it at the end of the line.

Thanks to Thorsten Jolitz for a preliminary patch for this.
2013-03-19 19:39:35 +01:00
Bastien Guerry 70417caa90 org-table.el (orgtbl-to-latex, orgtbl-to-texinfo): Export cells to LaTeX and Texinfo before sending the table
* org-table.el (orgtbl-to-generic): New parameter `backend' to
export cells content using a specific backend.
(orgtbl-to-latex, orgtbl-to-texinfo): Export cells to LaTeX
and Texinfo before sending the table.

Thanks to Luca Sabbatini for reporting a problem that led to this change.
2013-03-19 19:39:35 +01:00
Bastien Guerry a13b19e384 ox.el (org-export-define-backend, org-export-define-derived-backend): Use defuns
* ox.el (org-export-define-backend)
(org-export-define-derived-backend): Make defuns and update
docstrings.

* ox-texinfo.el (texinfo):
* ox-org.el (org):
* ox-odt.el (odt):
* ox-md.el (md):
* ox-man.el (man):
* ox-latex.el (latex):
* ox-icalendar.el (icalendar):
* ox-html.el (html):
* ox-beamer.el (beamer):
* ox-ascii.el (ascii): Use the defuns.
2013-03-19 19:39:34 +01:00
Bastien Guerry d8969931a9 org-table.el: Fix setting of constants.
* org.el (org-set-regexps-and-options): Use
`org-table-set-constants'.

* org-table.el (org-table-set-constants): New function.
(orgtbl-ctrl-c-ctrl-c): Use it.

Thanks to Oliver Večerník for reporting problems here.
2013-03-19 19:39:34 +01:00
Bastien Guerry f4b38bcdbb org-pcomplete.el (pcomplete/org-mode/block-option/clocktable): Add parameters
* org-pcomplete.el
(pcomplete/org-mode/block-option/clocktable): Add parameters.
2013-03-19 19:39:34 +01:00
Bastien Guerry 6b2693393b org.el (org-options-keywords): Remove "INFOJS_OPT": it is added through ox-html.el now
* org.el (org-options-keywords): Remove "INFOJS_OPT": it is
added through ox-html.el now.
2013-03-19 19:39:34 +01:00
Bastien Guerry c8a3425559 org-agenda.el (org-agenda-redo): Set filters after agenda has been redone
* org-agenda.el (org-agenda-redo): Set filters after agenda
has been redone.
2013-03-19 19:39:34 +01:00
Bastien Guerry ecb9e5811d org.el (org-store-link): Store each line of the active as a separate link
* org.el (org-store-link): When there is an active region,
store each line as a separate link.
(org-insert-all-links): Use a default description when links
do not have one already.

* org-agenda.el (org-agenda-redo): Fix typo in code.
2013-03-19 19:39:12 +01:00
Bastien Guerry 00e8ef22f2 org.el (org-link-display-format): Fix docstring
* org.el (org-link-display-format): Fix docstring.
2013-03-19 19:39:12 +01:00
Bastien Guerry e89c5f2164 org.el: Remove outdated FIXME 2013-03-19 19:39:11 +01:00
Bastien Guerry b9974192a1 ox-publish.el: Set `org-inhibit-startup' to t when visiting files for publication
* ox-publish.el (org-publish-org-to)
(org-publish-org-sitemap, org-publish-find-title)
(org-publish-find-date)
(org-publish-cache-file-needs-publishing): Set
`org-inhibit-startup' to t when visiting files for
publication.

Thanks to Samuel Wales for this idea.
2013-03-19 19:39:11 +01:00
Bastien Guerry f5bf08c92c ox-org.el (org-org-publish-to-org): Kill buffers not visited at publication time
* ox-org.el (org-org-publish-to-org): Kill buffers not visited
at publication time.
2013-03-19 19:38:52 +01:00
Bastien Guerry e996307556 org.el (org-set-font-lock-defaults): Set font-lock keywords correctly for plain links
* org.el (org-set-font-lock-defaults): Set font-lock keywords
correctly for plain links.
2013-03-19 10:58:12 +01:00
Bastien Guerry 1e916b7293 ox-texinfo.el: New options for removing files after compiling
* ox-texinfo.el (org-texinfo-logfiles-extensions)
(org-texinfo-remove-logfiles): New options.
(org-texinfo-compile): Use the new options to remove files
after compiling a Texinfo file.
2013-03-19 10:31:23 +01:00
Bastien Guerry a6e1f67d34 ox-texinfo.el: Add @documentlanguage and @documentencoding and `org-texinfo-publish-to-texinfo'
* ox-texinfo.el (org-texinfo-coding-system): New option.
(org-texinfo-template): Add @documentlanguage and
@documentencoding.
(org-texinfo-headline): Add a space before tags.
(org-texinfo-export-to-texinfo, org-texinfo-export-to-info):
Use `org-texinfo-coding-system' as the coding system for
exported buffers.
(org-texinfo-publish-to-texinfo): New function.
2013-03-19 10:24:30 +01:00
Bastien Guerry 3b0c9b4e78 ox-texinfo.el: Docstrings tiny fixes
* ox-texinfo.el (org-texinfo-filename)
(org-texinfo-info-process, org-texinfo-max-toc-depth)
(org-texinfo--sanitize-menu): Docstrings tiny fixes.
2013-03-19 10:01:42 +01:00
Bastien Guerry 5127f56790 org-agenda.el (org-agenda-dim-blocked-tasks): Only throw a message when called interactively
* org-agenda.el (org-agenda-dim-blocked-tasks): Only throw a
message when called interactively.  Fix docstring position in
the defun.
2013-03-19 09:57:11 +01:00
Bastien Guerry 3725c417ea ox-html.el (org-html--build-meta-info): Fix setting of http-equiv="Content-Type"
* ox-html.el (org-html--build-meta-info): Fix setting of
http-equiv="Content-Type".
2013-03-19 09:55:39 +01:00
Eric Schulte a461b0a444 allow comments between code blocks and un-named res
* lisp/ob-core.el (org-babel-where-is-src-block-result): Allow comments
  between code blocks and un-named results.
2013-03-17 19:57:01 -05:00
Nicolas Goaziou 90faed3672 ox-latex: Fix 7b36019069
* lisp/ox-latex.el (org-latex--inline-image): Fix commit
  7b36019069.
2013-03-17 22:17:31 +01:00
Nicolas Goaziou 7b36019069 ox-latex: Fix error with inline image with no option provided
* lisp/ox-latex.el (org-latex--inline-image): Fix error when no
  default width, height and option are provided and no attribute is
  set for the inline image.
2013-03-17 22:01:36 +01:00
Nicolas Goaziou fffc2b980c Fix commenting lines beginning with a link
* lisp/org.el (org-comment-or-uncomment-region): Fix commenting lines
  beginning with a link.
2013-03-17 20:22:47 +01:00
Nicolas Goaziou 6a85a85e99 org-table: Fix "Invalid use of `\\' in replacement text"
* lisp/org.el (org-delete-char): Fix "Invalid use of `\\' in
  replacement text" when deleting a character in a cell which contains
  "\"
2013-03-17 18:21:45 +01:00
Rick Frankel 67a17cfe85 Update s5 and deck,js slideshow exporters to work with refactored html
backend.

* lisp/ox-html.el (org-html--build-pre/postamble): Add css class to
  wrapper div (defaults to `org-pre/postamble-class').  Move spec
  building to separate function (`org-html-format-spec').
(org-html-format-spec): New function.
(org-pre/postamble-class): New variable.

* contrib/lisp/ox-deck.el: Replace :html-{pre,post}amble export
  options with :deck versions.
(org-deck-postamble): Replaces `org-deck-postamble-template', uses
format-spec (and `org-html-format-spec') instead of custom template
option.
(org-deck-preamble): Replaces `org-deck-postamble-template', uses
format-spec (and `org-html-format-spec') instead of custom template
option.
(org-deck-title-slide-template): Use standard format specs.
(org-deck-template): Use org-html--build-pre/postamble instead of
`org-deck-fill-template'. Use fill-template for title slide (with
standard format specs) instead of custom `org-fill-template'
(org-deck-template-alist):  Delete.
(org-deck-postamble-template): Delete.
(org-deck-preamble-template): Delete.

* contrib/lisp/ox-s5.el: Same overall set of changes as ox-deck.
(org-s5-divs): New option, similar usage to `org-html-divs'.
(org-s5-footer-template): Delete.
(org-s5-header-template): Delete.
2013-03-16 15:17:44 -04:00
Bastien Guerry acbf00ea24 org-agenda.el (org-agenda-mode-map): Use ?= for filtering by regexp and ?| for removing all filters
* org-agenda.el (org-agenda-mode-map): Use ?= for filtering by
regexp and ?| for removing all filters.
(org-agenda-filter-remove-all): New command.
(org-agenda-filter-show-all-re): Rename from
`org-agenda-filter-show-all-regexp'.
(org-agenda-filter-by-regexp): Call
`org-agenda-filter-show-all-re'.
2013-03-16 19:40:02 +01:00
Bastien Guerry 6b38452498 org-list.el (org-insert-item): Don't ask for a definition term
* org-list.el (org-insert-item): Don't ask for a definition
term when insert an item in a description list.

This breaks the type-flow way too much.
2013-03-16 19:15:58 +01:00
Bastien Guerry 7e806c155c org-agenda.el (org-agenda-Quit): Set `org-agenda-buffer' to nil
* org-agenda.el (org-agenda-Quit): Set `org-agenda-buffer' to
nil.  This prevents bugs when calling e.g., `org-diary' after
quitting an agenda window.
2013-03-16 18:59:52 +01:00
Bastien Guerry 00948a6834 org-agenda.el: Don't hardcode the default agenda entry types
* org-agenda.el (org-agenda-entry-types): Move earlier in the file.
(org-agenda-custom-commands-local-options, org-diary)
(org-agenda-get-day-entries): Don't hardcode the default
agenda entry types, use `org-agenda-entry-types'.
2013-03-16 18:56:56 +01:00
Bastien Guerry 7c71b7c686 org-agenda.el (org-agenda-custom-commands): Fix default setting
* org-agenda.el (org-agenda-custom-commands): Fix default
setting so that the customize interface does not complain
about a mismatch.
2013-03-16 18:54:26 +01:00
Rick Frankel ffdd9e9d73 ox-html.el: Cleanup pre/postamble handling
* lisp/ox-html.el (org-html--timestamp-format): New variable used
in the metadata and the pre/postamble.
(org-html-style-default): Make the preamble and postamble use the
same style.  Make all anchors font-size %100.  Remove margin from
the content section.
(org-html-container-element): Fix docstring.
(org-html-postamble-format, org-html-preamble-format): Update
docstrings.
(org-html-template): Use `org-html--build-pre/postamble'.
(org-html--build-pre/postamble): New function, combining the
pre/postamble generator.  Merge lists of formatters from the
preamble and postamble.  Fix bug, using :time-stamp-file instead
of :with-date for auto display of date: this brings usage in-line
with the latex and beamer exporter.
(org-html--build-postamble, org-html--build-postamble): Delete.
2013-03-16 09:23:35 +01:00
Christopher Schmidt ac2415ae38 org.el: Make the hijacker commands of orgstruct-mode try both general and specialised (function) key bindings
* org.el (orgstruct-make-binding): Make the hijacker commands
try both general and specialized (function) key bindings.
2013-03-15 22:16:47 +01:00
Nicolas Goaziou b56a648e9c Fix `org-export-backends' value
* lisp/org.el (org-export-backends): Remove duplicates.  Reorder
  alphabetically.
2013-03-15 21:00:39 +01:00
Christopher Schmidt 404cf23fa9 org.el: Use most general key bindings in orgstruct-mode
* org.el (orgstruct-setup): Generalize key bindings.
2013-03-15 19:50:04 +01:00
Christopher Schmidt ce6c048305 org.el: Emulate outline's buffer-invisiblity-spec in orgstruct-mode
* org.el (orgstruct-mode): Emulate outline's
buffer-invisiblity-spec.
2013-03-15 19:49:49 +01:00
Bastien Guerry 437c626b04 org.el (org-export-backends): Add new backends
* org.el (org-export-backends): Add new backends.
2013-03-15 16:53:35 +01:00
Bastien Guerry 3293c8fc48 Fix compiler warning 2013-03-15 16:10:07 +01:00
Bastien Guerry e8742b78e0 ox-html.el: New option `org-html-indent' to indent the HTML output
* ox-html.el (org-html-indent): New option.
(org-html-use-unicode-chars): New option.
(org-html-pretty-output): Delete.
(org-html-final-function): Use the new options.
2013-03-15 15:02:18 +01:00
Bastien Guerry d660979a0e ox-html.el (org-html-link): Fix handling of abbreviated links which include a file: protocol
* ox-html.el (org-html-link): Fix handling of abbreviated
links which include a file: protocol.

Before the patch, exporting this buffer does not export the link correctly:

#+LINK: test file:my.file::%s

[[test::search]]
2013-03-15 14:31:13 +01:00
Bastien Guerry 4eba81e5f4 ox-html.el: Enhance date insertion
* ox-html.el (org-html--build-postamble): Default to today's
date.
(org-html--build-meta-info): When #+DATE contains a time
stamp, parse it as a RFC 822 time string, otherwise simply
insert the date as a string.
2013-03-15 14:15:32 +01:00
Bastien Guerry ce0473532d ox.el (org-export-copy-to-kill-ring): Default back to 'if-interactive
* ox.el (org-export--copy-to-kill-ring-p): New function.
(org-export-copy-to-kill-ring): Use 'if-interactive as the
default.
(org-export-to-buffer, org-export-to-file): Use
`org-export--copy-to-kill-ring-p' and fix docstrings.

* ox-odt.el (org-odt-export-as-odf): Use
`org-export--copy-to-kill-ring-p'.
2013-03-15 13:39:45 +01:00
Bastien Guerry 791ebc6e7b Add macros fontifications
* org.el (org-set-font-lock-defaults): Fontify macros.

* org-faces.el (org-macro): New face.
2013-03-15 13:23:24 +01:00
Bastien Guerry ad95f19be1 org.el (org-clone-subtree-with-time-shift): Don't prompt for a time shift by default
* org.el (org-clone-subtree-with-time-shift): Only prompt for
a time shift when the entry at point has a time stamp and when
the command is called with a universal prefix argument.
2013-03-15 13:13:14 +01:00
Bastien Guerry 72bb08f0b8 org.el (org-execute-file-search-functions): Docstring fix
* org.el (org-execute-file-search-functions): Docstring fix.
2013-03-15 13:01:29 +01:00
Bastien Guerry f9224ea36a lisp/org-compat.el (org-defvaralias): Fix declare form
* lisp/org-compat.el (org-defvaralias): Fix declare form.
2013-03-15 12:06:44 +01:00
Bastien Guerry 450878fb21 Fix previous commit 2013-03-15 11:43:27 +01:00
Bastien Guerry 6ae1718df5 org-clock.el: New :mstart parameter for clocktables
* doc/org.texi (The clock table): Document :mstart.

* lisp/org-clock.el (org-clocktable-defaults): Add :mstart
parameter.
(org-clock-special-range): New argument mstart.
(org-dblock-write:clocktable, org-dblock-write:clocktable)
(org-clocktable-write-default, org-clocktable-steps)
(org-clock-get-table-data): Handle the :mstart parameter.

Thanks to Peder Stray for coming up with this idea and for
proposing a first implementation.
2013-03-15 11:17:12 +01:00
Bastien Guerry 3ec38f5c06 org.el (org-map-entries): Use `save-window-excursion'
* org.el (org-map-entries): Use `save-window-excursion'.
2013-03-14 14:40:00 +01:00
Bastien Guerry e0e699ab3d org-compat.el: New compatibility function `org-defvaralias'
* org-compat.el (org-defvaralias): Newcompatibility function.
* org.el:
* org-agenda.el:
* org-list.el:
* org-gnus.el:
* org-clock.el: Use it.
2013-03-14 13:53:52 +01:00
Bastien Guerry 8481088c4a org-list.el: Rename some options and add aliases
* org-list.el (org-cycle-include-plain-lists): Also add to the
'org-cycle customization group.
(org-list-allow-alphabetical)
(org-checkbox-hierarchical-statistics)
(org-list-empty-line-terminates-plain-lists)
(org-list-description-max-indent): Rename and add aliases to old
names.
2013-03-14 13:41:06 +01:00
Bastien Guerry a5a676e609 org-element.el (org-element-context): Prevent an error when getting the context of a table rule
* org-element.el (org-element-context): Prevent an error when
getting the context of a table rule.

Thanks to Eric Abrahamsen for reporting this bug.
2013-03-14 12:20:33 +01:00
Bastien Guerry d3361ce350 Fix a compiler warning. 2013-03-13 23:05:45 +01:00
Bastien Guerry a3ed698dbb Merge branch 'master-agenda' 2013-03-13 19:54:55 +01:00
Bastien Guerry 81daada648 Fix compiler warning 2013-03-13 19:54:30 +01:00
Bastien Guerry df31fe6bdd org-agenda.el: New agenda entry types :scheduled* and :deadline*
* org.el (org-deadline-time-hour-regexp)
(org-scheduled-time-hour-regexp): New buffer local variables.
(org-set-regexps-and-options): Set the new variables.

* org-agenda.el (org-agenda-custom-commands-local-options):
Add :deadline* and :scheduled* to the list of possible agenda
entry types.
(org-agenda): Implement a new agenda type agenda* with :scheduled*
and :deadline* replacing :scheduled and :deadline respectively in
agenda entry types.  In such agenda, only scheduled and deadline
items with a time specification [h]h:mm will be considered.
(org-agenda-entry-types): Document the new agenda entry types
:scheduled* and :deadline*.
(org-agenda-list): New parameter `with-hour'.  Use :scheduled* and
:deadline*.
(org-agenda-get-day-entries): Handle :scheduled* and :deadline*.
(org-agenda-get-deadlines, org-agenda-get-scheduled): New
parameter `with-hour'.  Use `org-deadline-time-hour-regexp' or
`org-scheduled-time-hour-regexp' as the search string if needed.
(org-agenda-to-appt): Use :scheduled* and :deadline* by default,
as other scheduled and deadline items don't have a time spec and
cannot be turned into appointments.  Trim bracket links and use
only the description as the appointment text.
(org-agenda-get-restriction-and-command): Add
default description for the agenda* view.
(org-agenda-run-series): Handle agenda* views.
2013-03-13 19:52:25 +01:00
Bastien Guerry c1e437bbe9 org-agenda.el: Implement agenda filtering by regexp with "|"
* org-faces.el (org-agenda-filter-tags)
(org-agenda-diary, org-agenda-calendar-event)
(org-agenda-calendar-sexp): Minor code clean up.
(org-agenda-filter-category): Docstring fix.
(org-agenda-filter-category): New face.

* org-agenda.el (org-agenda-local-vars): Add
`org-agenda-re-filter-overlays' and `org-agenda-regexp-filter'.
(org-agenda-mode-map): Use "|" for
`org-agenda-filtered-by-regexp'.
(org-agenda-re-filter-overlays): New variable.
(org-agenda-mark-filtered-text): Use
`org-agenda-re-filter-overlays'.
(org-agenda-finalize, org-agenda-redo): Allow regexp filtering.
(org-agenda-filter-by-category): Set `org-agenda-category-filter'
here instead of within `org-agenda-apply-filter'.
(org-agenda-regexp-filter): New variable.
(org-agenda-filter-by-regexp): New function to filter agenda
buffers by regexp.
(org-agenda-filter-make-matcher): Make matcher for regexp filters.
(org-agenda-filter-apply): Don't set `org-agenda-tag-filter' and
`org-agenda-category-filter'.  Maybe apply regexp filter.
(org-agenda-filter-hide-line): Add docstring.  Hide
regexp-filtered lines.
(org-agenda-filter-show-all-tag, org-agenda-filter-show-all-cat):
Add docstring.
(org-agenda-filter-show-all-regexp): New function.
(org-agenda-set-mode-name): Add regexp-filter information.
(org-agenda-custom-commands-local-options): Add regexp filter.
(org-agenda-regexp-filter-preset): New variable.
(org-agenda-prepare): Use the new variable.

* org.texi (Agenda commands): Document `org-agenda-filter-by-regexp'.
2013-03-13 19:26:41 +01:00
Bastien Guerry 80724ea2a6 ox-odt.el (org-odt-code, org-odt-verbatim): Use `org-odt--encode-plain-text'
* ox-odt.el (org-odt-code, org-odt-verbatim): Use
`org-odt--encode-plain-text'.

Thanks to Bernd Haug for reporting this.
2013-03-13 17:02:34 +01:00
Bastien Guerry ab33f3cfac ox-html.el (org-html-link): Minor code clean-up
* ox-html.el (org-html-link): Minor code clean-up.
2013-03-13 12:05:15 +01:00
Bastien Guerry bc7dbcab9f org.el (org-insert-heading): DTRT when in a narrowed region
* org.el (org-insert-heading): DTRT when in a narrowed region.

* org-compat.el (org-buffer-narrowed-p): New compatibility
function.

Thanks to Samuel Wales for reporting this problem.
2013-03-13 10:57:49 +01:00
Bastien Guerry 8091854eaf ox-html.el (org-html-format-inline-image): Fix missing string in formatting string
* ox-html.el (org-html-format-inline-image): Fix missing string in
formatting string.

Thanks to Richard Stanton for reporting this.
2013-03-13 09:48:53 +01:00
Bastien Guerry 742f473820 org-agenda.el (org-agenda-skip-scheduled-if-deadline-is-shown): New allowed value `repeated-after-deadline'
* org-agenda.el (org-agenda-skip-scheduled-if-deadline-is-shown):
New allowed value `repeated-after-deadline' which will prevent the
display of scheduled items when repeated after the current
deadline.
(org-agenda-get-scheduled): Handle the new value.

This allows this task

* Do me every day before March, 16th (included)
  SCHEDULED: <2013-03-12 mar. +1d> DEADLINE: <2013-03-16 sam.>

to step being displayed after March, 16th.

Thanks a lot to Rick Hanson for coming with this idea and a clear example.
2013-03-12 18:58:18 +01:00
Bastien Guerry 5f38a32664 org.el (org-time-string-to-absolute): Tiny docstring fix
* org.el (org-time-string-to-absolute): Tiny docstring fix.
2013-03-12 17:31:17 +01:00
Bastien Guerry 93489893dc ox-html.el: Better formatting for footnotes
* ox-html.el (org-html-style-default): New classes `footpara' and
`footdef' for the footnotes paragraphs and definitions.
(org-html-format-footnote-definition): Wrap the footnote
defintions into their own div.
(org-html-paragraph): Don't add extra <br/> after a paragraph in a
footnote.
2013-03-12 15:17:15 +01:00
Bastien Guerry 549d81878e ox-html.el (org-html-container-element, org-html-divs): Docstring enhancement
* ox-html.el (org-html-container-element, org-html-divs): Mention
that org-info.js will not work when changing the defaults.
2013-03-12 09:49:34 +01:00
Bastien Guerry 25222853f9 Merge branch 'master-reapply-rick-patch'
Conflicts:
	lisp/ox-html.el
2013-03-12 09:43:58 +01:00
Rick Frankel ec8823bea5 Parameterize some html content containers
* lisp/ox-html.el: (define-backend): Add :html-doctype and
:html-container parameters.
(org-html-doctype): New option for doctype declaration.
(org-html-container-elemnt): New option for specifying the wrapper
container element.
(org-html-divs): Change to alist of three entries each containing a
key ('preamble, 'content, 'postamble), an HTML element type and an
id to allow setting container elements.
(org-html--build-preamble): Modified to use `org-html-divs'.
(org-html--build-postamble): Modified to use `org-html-divs'.
(org-html-template): Modified to use doctype and container-element
settings.
2013-03-12 09:42:27 +01:00
Bastien Guerry d90d1071ba ox-md.el (md): Export underlined text as verbatim
* ox-md.el (md): Export underlined text as verbatim.

Thanks to Rick Frankel for suggesting this.
2013-03-12 08:44:11 +01:00
Bastien Guerry fa23e00915 Revert "ox-md.el (org-md-underline): New function"
This reverts commit abc94ec96a.
2013-03-12 08:43:14 +01:00
Bastien Guerry baa299952f ox-html.el: New CSS .underline and #org-div-home-and-up.
* ox-html.el (org-html-style-default): New CSS .underline and
#org-div-home-and-up.
(org-html-text-markup-alist): Don't hardcode the style, use the
new class .underline.
(org-html-home/up-format): Don't hardcode the style, use
#org-div-home-and-up.
(org-html-center-block): Use the .center class.
2013-03-12 07:41:38 +01:00
Bastien Guerry abc94ec96a ox-md.el (org-md-underline): New function
* ox-md.el (org-md-underline): New function.
2013-03-12 00:05:30 +01:00
Bastien Guerry 9e00635699 org-agenda.el (org-sorting-choice): Fix default value
* org-agenda.el (org-sorting-choice): Fix default value.
2013-03-11 18:18:11 +01:00
Nicolas Goaziou 5c25ede5d9 ox-texinfo: Fix small bug
* lisp/ox-texinfo.el (org-texinfo-plain-list): Use `member' instead of
  `memq' when matching strings.
2013-03-11 08:33:10 +01:00
Nicolas Goaziou 59cb22d638 ox: Simplify syntax for attributes
* lisp/ox.el (org-export-read-attribute): Do not use `read' to read
  attributes.  Instead, extract keywords and values from it, which
  means each value will be a string when non-nil.
* contrib/lisp/ox-groff.el (org-groff-link--inline-image): Use new
  attribute syntax.  Small refactoring.
* lisp/ox-ascii.el (org-ascii-horizontal-rule): Use new attribute
  syntax.
* lisp/ox-beamer.el (org-beamer-plain-list): Use new attribute syntax.
* lisp/ox-html.el (org-html--textarea-block): Use new attribute
  syntax.
* lisp/ox-latex.el (org-latex--inline-image, org-latex--org-table,
  org-latex--math-table): Use new attribute syntax.
* lisp/ox-man.el (org-man-table--org-table): Use new attribute syntax.
  Small refactoring.
* lisp/ox-odt.el (org-odt-link--inline-image, org-odt-table-cell): Use
  new attribute syntax.
* testing/lisp/test-ox.el: Add tests.

This patch introduces two changes.  To begin with, it removes the need
for quoting and escaping characters.  Also, all non-nil values are
stored as strings.  As an exception "nil" is stored as nil.
2013-03-11 08:33:10 +01:00
Eric Schulte cc756ecac9 don't read sqlite output as lisp
Thanks to Michael Gauland for pointing out this bug.

* lisp/ob-sqlite.el (org-babel-sqlite-table-or-scalar): Don't read
  sqlite output as lisp.
2013-03-10 16:55:42 -06:00
Jonathan Leech-Pepin 731428e7a5 lisp/ox-texinfo.el: Fix parsing of list entries without content
* lisp/ox-texinfo.el (org-texinfo-item): Check for contents before
  trimming whitespace from it.
2013-03-10 16:38:26 -04:00
Jonathan Leech-Pepin 3e10bab25a lisp/ox-texinfo.el: Fix export of source blocks
* lisp/ox-texinfo.el (org-texinfo-src-block): Escape texinfo commands
  within source blocks to ensure proper export.  `@ { }' all need to
  be escaped to ensure proper formatting when processing to info.
2013-03-10 15:32:46 -04:00
Christopher Schmidt 03b1edf3c1 org.el: Disable {pro,de}motion commands in orgstruct-mode if orgstruct-heading-prefix-regexp is non-nil
* org.el (orgstruct-heading-prefix-regexp): Change default
value to nil.
(orgstruct-error): Use user-error if available.
(orgstruct-setup): Disable bindings of {pro,de}motion commands
if orgstruct-heading-prefix-regexp is non-nil.  Always use
org-outline-level.
(orgstruct-make-binding): New argument
DISABLE-WHEN-HEADING-PREFIX.
2013-03-10 14:41:04 +01:00
Bastien Guerry ccee7e4885 Don't use HTML tables for footnote defintions.
* ox-html.el (org-html-format-footnote-definition)
(org-html-footnote-section): Don't wrap footnote definitions into
tables.
(org-html-paragraph): Add HTML style and class parameter when the
paragraph is in a footnote definition.  Also allow to add an extra
string after the paragraph.  Further parameters can be added for
paragraphs in other environments.

Thanks to Samuel Wales for asking this.
2013-03-10 12:09:43 +01:00
Nicolas Goaziou 69c617c998 ox: Remove code evaluation queries from asynchronous export
* lisp/ox.el (org-export-async-start): Remove code evaluation queries
  from asynchronous export.
2013-03-10 00:17:09 +01:00
Achim Gratz 4f7d514f13 ob-core: allow auto-denial of source block evaluation
* lisp/ob-core.el (org-babel-confirm-evaluate-answer-no): Dynamically
  scoped variable, if bound non-nil the confirmation dialog will not
  be initiated and denial of evaluation is assumed.

  The new variable `org-babel-confirm-evaluate-answer-no´ can be bound
  to suppress the user interaction as is needed for async export, as
  discussed in http://thread.gmane.org/gmane.emacs.orgmode/67719
2013-03-09 23:09:15 +01:00
Eric Schulte d7758f565c refactor `org-babel-check-confirm-evaluate' macro
- meaningful variable names
- don't overly pollute the name space of the macro body

* lisp/ob-core.el (org-babel-check-confirm-evaluate): Refactoring.
2013-03-09 21:45:40 +01:00
Eric Schulte bc6564ab48 whitespace changes
spaces between lines, and fix overlong lines

* lisp/ob-core.el (org-babel-check-confirm-evaluate): Whitespace.
  (org-babel-confirm-evaluate): Whitespace.
2013-03-09 21:43:29 +01:00
Eric Schulte b0bccccb5c additional code block execution refactoring
multiple changes to remove overly long lines.

* lisp/ob-core.el (org-babel-execute-src-block): A cond makes it more
  clear that we definitely do not execute without user confirmation.

  (org-babel-where-is-src-block-result): Overly long line.
2013-03-09 21:43:18 +01:00
Achim Gratz be0883940d ob-core: refactor org-babel-confirm-evaluate, do not confirm evaluation if cache is current
* lisp/ob-core.el (org-babel-check-confirm-evaluate): New macro to
  establish bindings based on INFO.
* lisp/ob-core.el (org-babel-check-evaluate): New defsubst that checks
  if the evaluation of a code block is disabled.  Refactors the first
  part of the original function `org-babel-confirm-evaluate´.
* lisp/ob-core.el (org-babel-confirm-evaluate): New defsubst that
  checks if the user should be queried and returns the answer.  Keeps
  the second part of the original function `org-babel-confirm-evaluate´.
* lisp/ob-core.el (org-babel-execute-src-block): Do not ask for
  confirmation if the cached result is current.
2013-03-09 21:33:19 +01:00
Achim Gratz 5fe486807e ob-core: reimplement org-babel-confirm-evaluate
* lisp/ob-core.el (org-babel-confirm-evaluate): Re-implement using
  bindings for common subexpressions.

There was a minor bug in the reporting of an aborted evaluation as
"disabled" when no export was happening and eval-no-export was t since
the state of the export was not checked again.
2013-03-09 21:31:01 +01:00
Eric Schulte 9dd13b2e1e fixed line over 80 chars long
* lisp/ob-core.el (org-babel-call-process-region-original): Fixed line
  over 80 chars long.
2013-03-09 21:30:35 +01:00
Achim Gratz 1ffd4f615a ob-core: do not declare and define org-babel-call-process-region-original
* lisp/ob-core.el (org-babel-call-process-region-original): Change
  declaration into definition with nil initial value at the beginning
  of the file and drop the later definition.  Add comment that the
  dynamic scoping of this variable is done for tramp.
2013-03-09 21:27:24 +01:00
Nicolas Goaziou cd06578af4 ox-latex: Activate smart quotes by default
* lisp/ox-latex.el (latex): Activate smart quotes by default.
2013-03-08 23:42:24 +01:00
Nicolas Goaziou 1d6aba908b ox-latex: Don't insert a default width when height is provided in a figure environment
* lisp/ox-latex.el (org-latex--inline-image): Don't insert a default
  width when height is provided in a figure environment.

Thanks to Aaron Ecay for the patch.
2013-03-08 22:37:45 +01:00
Aaron Ecay 50226db65d org-src.el (org-edit-src-exit): Don't modify the undo list when inserting the code
* org-src.el (org-edit-src-exit): Don't modify the undo list when
inserting the code.
2013-03-08 18:31:14 +01:00
Bastien Guerry e100bf91c4 ox-html.el (org-html-template): Always include the title.
* ox-html.el (org-html-template): Always include the title as <h1
class="title"></h1>, even when there is no title, as org-info.js
needs it.

Thanks to Henry Atting for reporting this.
2013-03-08 16:53:06 +01:00
Bastien Guerry a68ae08422 org-element.el (org-element-map): Fix tiny typo in docstring
* org-element.el (org-element-map): Fix tiny typo in docstring.
2013-03-08 16:53:03 +01:00
Bastien Guerry a646a24229 Merge branch 'master' of orgmode.org:org-mode 2013-03-08 12:23:15 +01:00
Bastien Guerry 32385e9536 org-agenda.el (org-agenda-day-view): Fix parameter's name
* org-agenda.el (org-agenda-day-view): Fix parameter's name.
2013-03-08 12:23:10 +01:00
Nicolas Goaziou 142ca75957 ox-latex: Fix overuse of default width/height
* lisp/ox-latex.el (org-latex--inline-image): Do not use default
  width (resp. height) when an user height (resp. width) is provided.
  Also, default height is only used when image is not wrapped within
  a figure or wrapfigure environment, in order to preserve ratio.
(org-latex-image-default-width, org-latex-image-default-height):
Update docstring.
2013-03-08 11:32:44 +01:00
Bastien Guerry e1f42859b4 ox-html.el (org-html-format-inline-image): Don't add superfluous <p></p> when there is an empty caption
* ox-html.el (org-html-format-inline-image): Don't add superfluous
<p></p> when there is an empty caption.
2013-03-08 11:22:01 +01:00
Bastien Guerry a2e39d98b8 org-agenda.el (org-agenda-refile): Enhance docstring. Allow to clear the refile cache with C-0 or C-u C-u C-u
* org-agenda.el (org-agenda-refile): Enhance docstring.  Allow to
clear the refile cache with C-0 or C-u C-u C-u.
2013-03-08 10:33:19 +01:00
Bastien Guerry b2e1d6d2bf Merge branch 'master' of orgmode.org:org-mode 2013-03-07 16:31:40 +01:00
Bastien Guerry 81d0b52f13 ox-md.el (org-md-export-as-markdown): Tiny docstring fix
* ox-md.el (org-md-export-as-markdown): Tiny docstring fix.
2013-03-07 16:31:24 +01:00
Bastien Guerry 8bf9e9aff8 ox-md.el: Fix a library keyword in the comment section
* ox-md.el: Fix a library keyword in the comment section.
2013-03-07 14:44:58 +01:00
Nicolas Goaziou 3b0e662181 ox-icalendar: Fix error when `org-icalendar-store-UID' is non-nil
* lisp/ox-icalendar.el (org-icalendar-create-uid): Fix error when
  `org-icalendar-store-UID' is non-nil.
2013-03-07 13:54:33 +01:00
Bastien Guerry 855ee9a0f3 Make org-toggle-item' and org-toggle-heading' behave more alike
* org.el (org-toggle-item): Convert all normal lines as items when
there is a region, and only convert the first line when called
with a universal prefix argument.  This is consistent with the
behavior of `org-toggle-heading'.
(org-toggle-heading): When the region contains only normal lines,
a universal prefix arg will only convert the first line.  This is
more consistent with `org-toggle-item'.
2013-03-07 12:06:46 +01:00
Bastien Guerry 3a11c24b99 org.el (orgstruct-setup): Add org-ctrl-c-minus' and org-ctrl-c-star'
* org.el (orgstruct-setup): Add `org-ctrl-c-minus' and
`org-ctrl-c-star'.
2013-03-07 11:26:02 +01:00
Nicolas Goaziou ee9372653f ox-latex: Introduce LATEX_HEADER_EXTRA keyword
* lisp/ox-latex.el (latex): Introduce new buffer keyword.
(org-latex-template): Use new keyword.
* lisp/ox-beamer.el (org-beamer-template): Use new keyword.
* lisp/org.el (org-create-formula--latex-header): Use new keyword.
* contrib/lisp/ox-koma-letter.el (org-koma-letter-template): Use new
  keyword.

Previewing of LaTeX snippets takes account of LATEX_HEADER keywords.
LATEX_HEADER_EXTRA keyword allows to specify some header lines that
will not be used for building snippets.
2013-03-07 09:02:29 +01:00
Bastien Guerry 2ad8369015 org.el: Update `customize-package-emacs-version-alist' and fix :version/:package-version keywords
* org.el (customize-package-emacs-version-alist): Update
`customize-package-emacs-version-alist'.

* ox-texinfo.el (org-export-texinfo)
(org-texinfo-filename, org-texinfo-classes)
(org-texinfo-format-headline-function)
(org-texinfo-node-description-column)
(org-texinfo-active-timestamp-format)
(org-texinfo-link-with-unknown-path-format)
(org-texinfo-tables-verbatim)
(org-texinfo-table-scientific-notation)
(org-texinfo-text-markup-alist)
(org-texinfo-format-drawer-function)
(org-texinfo-format-inlinetask-function)
(org-texinfo-info-process):
* ox-odt.el (org-odt-format-drawer-function)
(org-odt-format-headline-function)
(org-odt-format-inlinetask-function):
* ox-md.el (org-export-md, org-md-headline-style): Fix :version
and :package-version keywords.
2013-03-06 17:31:28 +01:00
Nicolas Goaziou e109a37ede Export framework: Add :version and :package-version informations to defcustoms
* lisp/ox-beamer.el (org-beamer-column-view-format, org-beamer-theme,
  org-beamer-environments-extra): Add :version and :package-version.
* lisp/ox-html.el (org-html-with-latex, org-html-inline-image-rules):
  Add :version and :package-version.
* lisp/ox-latex.el (org-latex-inline-image-rules,
  org-latex-default-table-environment, org-latex-default-table-mode,
  org-latex-tables-booktabs, org-latex-table-scientific-notation,
  org-latex-known-errors): Add :version and :package-version.
* lisp/ox-md.el (org-md-headline-style): Add :version
  and :package-version.
* lisp/ox-odt.el (org-odt-with-latex): Add :version
  and :package-version.
* lisp/ox.el (org-export-with-drawers, org-export-with-latex,
  org-export-with-inlinetasks, org-export-with-planning,
  org-export-with-smart-quotes, org-export-with-statistics-cookies,
  org-export-allow-bind-keywords, org-export-async-init-file):
  Add :version and :package-version.
2013-03-06 17:14:27 +01:00
Nicolas Goaziou 5442c6b838 ox-icalendar: Fix code comment
* lisp/ox-icalendar.el (org-icalendar-export-to-ics): Change back-end
  name from `e-ascii' to `ascii'.
2013-03-06 17:10:26 +01:00
Nicolas Goaziou 352ae504ec ox: Fix `org-map-entries' with a nil scope argument usage in hooks
* lisp/ox.el (org-export--generate-copy-script): Call `org-mode' when
  duplicating a buffer.  It will properly set every variable, like
  `comment-start'.
(org-export-async-start): Do not call `org-mode' since this is done
already in the previous function.
2013-03-06 14:26:09 +01:00
Nicolas Goaziou 8c48e8b2ac ox-beamer: Remove frame arount toc when generated from a TOC keyword
* lisp/ox-beamer.el (org-beamer-keyword): Remove frame arount toc when
  generated from a TOC keyword.

Since TOC keywords are a way to add a table of contents at some
precise location, it is reasonable to think the user will also want to
control the frame surronding it.  Table of contents generated with
toc:t option item still get wrapped within a frame.
2013-03-06 13:37:13 +01:00
Bastien Guerry 10c735f18a org.el (org-time-clocksum-use-effort-durations): Use nil as the default
* org.el (org-time-clocksum-use-effort-durations): Don't set to t
by default as it will change many clocktables out there.  Let the
user decides whether she wants to turn this on.
2013-03-06 10:37:50 +01:00
Bastien Guerry c00a43e857 Revert org-agenda-dim-blocked-tasks' and org-agenda-inhibit-startup' to their previous default (t and nil)
* org.el (org-agenda-inhibit-startup): Revert to nil as the default.
* org-agenda.el (org-agenda-dim-blocked-tasks): Revert to t as the
default.

The reason for this reversion is that that users expect the agenda to
DTRT by default, and that it's better not to change the previous default
in general.  Also, users who need to speed up their agenda are probably
long time users with big and numerous agenda files, and it's easier for
them to find these variables than it is for newbies to find out why the
agenda does not DTRT.

If users want to speed up their agenda, they can now read advice here:
http://orgmode.org/worg/agenda-optimization.html
2013-03-06 10:35:19 +01:00
Aaron Ecay 42576eaac1 ox-latex: Support tikz images, :width, and :height
* ox-latex.el:
(org-latex-image-default-option): Change default value to ""
(org-latex-image-default-width)
(org-latex-image-default-height): Add variables
(org-latex-inline-image-rules): Make .tikz files as exportable with
latex
(org-latex--inline-image): Support tikz images.  Also support separate
:width and :height parameters for images.

* ob-R.el (org-babel-R-construct-graphics-device-call): Change file
extension of tikz graphics files to .tikz

Tikz graphics should be exported to LaTeX by \include, not as a link.
This commit changes the file extension used for tikz graphics from .tex
to .tikz, and inserts code for including such images.  The :options for
tikz graphics are passed as an optional argument to a tikzpicture
environment.

Also provide :width and :height ATTR_LATEX entries for images.  For tikz
graphics, these are implemented with \resizebox; for other image types
they are inserted in the optional arguments to \includegraphics.
2013-03-06 09:29:37 +01:00
Aaron Ecay 8f7b95091e * lisp/org.el (org-set-font-lock-defaults): include link targets
The org-target face is created in org-faces.el, but never used for
font-locking.  This patch fixes that.
2013-03-06 09:03:38 +01:00
Nicolas Goaziou 733697a779 Fix export back-ends status when reloading Org
* lisp/org.el (org-export-backends): Do not reset list of loaded
  back-ends to variable's value after a reload.
2013-03-06 00:27:28 +01:00
Bastien Guerry 1259dd8ff7 ox-html.el: More CSS tweaks
* ox-html.el (org-html-style-default): More cosmetic tweaks.
(org-html-head-include-default-style): Minor docstring update.

Thanks to Ken Williams who provided the patch about adding
the name of the source code block.
2013-03-05 17:06:01 +01:00
Bastien Guerry 8a2e3e2a79 Add :version and :package-version
* ox.el (org-export-snippet-translation-alist)
(org-export-coding-system, org-export-in-background)
(org-export-async-init-file, org-export-invisible-backends)
(org-export-dispatch-use-expert-ui):
* ox-texinfo.el (org-texinfo-filename, org-texinfo-classes)
(org-texinfo-format-headline-function)
(org-texinfo-node-description-column)
(org-texinfo-active-timestamp-format)
(org-texinfo-link-with-unknown-path-format)
(org-texinfo-tables-verbatim)
(org-texinfo-table-scientific-notation)
(org-texinfo-text-markup-alist)
(org-texinfo-format-drawer-function)
(org-texinfo-format-inlinetask-function)
(org-texinfo-info-process):
* ox-man.el (org-man-tables-centered)
(org-man-table-scientific-notation)
(org-man-source-highlight, org-man-source-highlight-langs)
(org-man-pdf-process, org-man-logfiles-extensions):
* ox-html.el (org-html-allow-name-attribute-in-anchors)
(org-html-coding-system, org-html-divs):
* ox-ascii.el (org-ascii-text-width)
(org-ascii-headline-spacing, org-ascii-indented-line-width)
(org-ascii-paragraph-spacing, org-ascii-charset)
(org-ascii-underline, org-ascii-bullets)
(org-ascii-links-to-notes)
(org-ascii-table-keep-all-vertical-lines)
(org-ascii-table-widen-columns)
(org-ascii-table-use-ascii-art)
(org-ascii-format-drawer-function)
(org-ascii-format-inlinetask-function):
* org.el (org-modules, org-export-backends)
(org-highlight-latex-and-related, orgstruct-setup-hook):
* org-attach.el (org-attach-git-annex-cutoff):
* org-archive.el (org-archive-file-header-format):
* org-agenda.el (org-agenda-todo-ignore-time-comparison-use-seconds):
* ob-python.el (org-babel-python-hline-to)
(org-babel-python-None-to):
* ob-ditaa.el (org-ditaa-eps-jar-path):
* ob-core.el (org-babel-results-keyword): Add :version and
:package-version.

* ox-ascii.el: Use utf-8-emacs as the file coding system.
2013-03-05 16:38:33 +01:00
Bastien Guerry 7e6c632f80 org-capture.el: Fix or add docstrings
* org-capture.el (org-capture-templates, org-capture-string)
(org-capture-steal-local-variables)
(org-capture-empty-lines-before)
(org-capture-empty-lines-after)
(org-capture-insert-template-here)
(org-capture-import-remember-templates): Fix or add docstring.
2013-03-05 16:38:33 +01:00
Bastien Guerry 085e86dd53 ox-html.el: Update the default CSS
* ox-html.el (org-html-style-default): Cosmetic changes.
(org-html-postamble, org-html-preamble)
(org-html-preamble-format): Update docstring.
2013-03-05 16:38:33 +01:00
Bastien Guerry 54ffb0beff org-agenda.el: Fix or add docstrings.
* org-agenda.el (org-agenda-format-date-aligned)
(org-agenda-time-of-day-to-ampm-maybe)
(org-scheduled-past-days)
(org-agenda-normalize-custom-commands)
(org-agenda-run-series, org-store-agenda-views): Fix or add
docstring.
2013-03-05 16:38:33 +01:00
Bastien Guerry fe23891b2a ox-latex.el: Fix some typos in docstrings
* ox-latex.el:
(org-latex-table-scientific-notation, org-latex-verse-block):
Fix typos in docstrings.
2013-03-05 16:38:33 +01:00
Bastien Guerry 83cda91a92 ox-html.el: Fix or add docstring
* ox-html.el (org-html-text-markup-alist)
(org-html-pretty-output, org-html-link-org-files-as-html)
(org-html-postamble, org-html-preamble)
(org-html-format-inline-image, org-html-splice-attributes)
(org-export-splice-style, org-html-htmlize-region-for-paste)
(org-html-fix-class-name)
(org-html-format-footnote-reference)
(org-html-format-footnotes-section)
(org-html-footnote-section, org-html--anchor)
(org-html--todo, org-html--tags, org-html-format-headline)
(org-html-toc, org-html-format-section, org-html-checkbox)
(org-html-format-list-item, org-html-format-latex)
(org-html-encode-plain-text)
(org-html-table-first-row-data-cells)
(org-html-table--table.el-table, org-html-final-function): Fix
or add docstring.
2013-03-05 16:38:33 +01:00
Nicolas Goaziou 6ab71385f8 ox-latex: Do not overwrite provided numbering options in minted and listings
* lisp/ox-latex.el (org-latex-src-block): Do not overwrite provided
  numbering options in minted and listings.

If "numbers" option (resp. "linenos" option) is provided in
`org-latex-listings-options' (resp. `org-latex-minted-options'),
export will ignore "+n" and "-n" switches from source blocks.
2013-03-05 12:13:05 +01:00
Bastien Guerry 834db79fc5 org.el (org-insert-heading): If the current item has a checkbox, insert the new item with a checkbox
* org.el (org-insert-heading): If the current item has a
checkbox, insert the new item with a checkbox.
2013-03-05 11:17:05 +01:00
Bastien Guerry b472884e5e org.el (org-insert-heading): Don't delete spaces in empty headlines
* org.el (org-insert-heading): Don't delete spaces in empty
headlines.
2013-03-05 08:28:26 +01:00
Nicolas Goaziou cd23825d62 ox-latex: Don't add optional title on unnumbered headlines
* lisp/ox-latex.el (org-latex-headline): Don't add optional title on
  unnumbered headlines.
2013-03-04 21:18:34 +01:00
Bastien Guerry e1befff7ad ox-odt.el (org-odt-keyword): Fix typo
* ox-odt.el (org-odt-keyword): Fix typo.
2013-03-04 20:31:08 +01:00
Bastien Guerry 73e4421140 Cosmetic fix in comment. 2013-03-04 20:11:15 +01:00
Bastien Guerry 44ecd80f06 ox-latex.el (org-latex-toc-command): Cosmetic docstring change
* ox-latex.el (org-latex-toc-command): Cosmetic docstring change.
2013-03-04 20:08:39 +01:00
Bastien Guerry 4956a23f8e ox-html.el: Remove two useless comments. 2013-03-04 20:08:18 +01:00
Bastien Guerry 584a782174 ox-html.el (org-html-encode-plain-text): Fix typo in docstring
* ox-html.el (org-html-encode-plain-text): Fix typo in docstring.
2013-03-04 19:41:34 +01:00
Bastien Guerry 65440264de Update contrib/README and some comments/messages
* org-faces.el (org-column): Update docstring.
* org-colview.el: Update error message.
2013-03-04 18:36:34 +01:00
Bastien Guerry 21c0289f3c Move org-mew.el, org-vm.el, org-w3m.el, org-wl.el to contrib/.
* org.el (org-modules): Do not include org-mew.el, org-vm.el,
org-w3m.el, org-wl.el as these files are now part of contrib/.

* org-w3m.el:
* org-vm.el:
* org-w3m.el:
* org-wl.el: Move to contrib/.

The purpose behind this change is to prepare a future split between
org-mode.git and org-contrib.git: org-mode.git will contain all files
that are directly relevant to GNU Emacs, while org-contrib.git will
contain files that are more peripheral and/or from authors who cannot
assign their copyright to the FSF.

This is *not* a way do downgrade those files, it is a way to prepare
org-contrib.org so that it gets more attention and more contributors,
thanks to the fact that there is no legal barrier to contribute to it.
2013-03-04 18:28:26 +01:00
Bastien Guerry adcb1b0330 Move org-colview-xemacs.el into contrib/. 2013-03-04 18:23:05 +01:00
Bastien Guerry b653e12ec2 Move `org-mks' to org-capture.el and delete org-mks.el.
* org-capture.el (org-mks): Move from org-mks.el.
* org-mks.el: Delete.
2013-03-04 18:21:47 +01:00
Bastien Guerry 516f0df844 Update HTML options names in the manual and ox-html.el.
* org.texi (CSS support): (In-buffer settings): Update HTML options
names.

* ox-html.el (html): Update HTML options names.
2013-03-04 17:56:37 +01:00
Nicolas Goaziou c7dbf2bd45 ox-html: Fix "HTML_HEAD" and "HTML_HEAD_EXTRA" keywords
* lisp/ox-html.el (html): Fix "HTML_HEAD" and "HTML_HEAD_EXTRA"
  keywords.
2013-03-04 17:27:18 +01:00
Nicolas Goaziou 0c14ad963c ox-html: Allow multiple #+LATEX_HEAD and #+LATEX_HEAD_EXTRA again
* lisp/ox-html.el (html): Allow multiple #+LATEX_HEAD and
  #+LATEX_HEAD_EXTRA again.
2013-03-04 16:23:13 +01:00
Nicolas Goaziou 4857f4c566 Small refactoring
* lisp/org.el (org-fill-paragraph): Small refactoring to
  `org-fill-paragraph'.
2013-03-04 15:58:41 +01:00
Nicolas Goaziou 8b5e59c8c4 Small fix to `org-fill-paragraph'
* lisp/org.el (org-fill-paragraph): Do not look for table cells in
  a paragraph.
2013-03-04 15:56:10 +01:00
Nicolas Goaziou 70cef89265 org-element: Simplify restrictions within secondary strings and objects
* lisp/org-element.el (org-element-object-restrictions): Simplify
  restrictions within secondary strings and objects.
2013-03-04 15:42:42 +01:00
Eric Schulte 10a67d594a update doc to reflect changed variable name
* lisp/ob-tangle.el (org-babel-tangle-collect-blocks): Update comment to
  reflect changed variable name.
2013-03-04 06:44:31 -07:00
Ryo TAKAISHI 8ef0eb467f fix bug: org-babel-tangle-file can't limit collected source code block by argument.
* lisp/ob-tangle.el (org-babel-tangle-collect-blocks): Change argument
  name collid org-babel-map-src-blocks's variable 'lang'.

TINYCHANGE
2013-03-04 06:44:11 -07:00
Nicolas Goaziou 40fc9e869f org-list: Use export back-ends to transform radio lists
* lisp/org-list.el (org-list-send-list): Do not rely on
  `org-list-parse-list'.
(org-list-to-latex, org-list-to-html, org-list-to-texinfo): Use
appropriate export back-end instead of using `org-list-to-generic'.
* testing/lisp/test-org-list.el: Add tests.
2013-03-04 12:33:04 +01:00
Nicolas Goaziou 51ab145e36 ox-html: Exclude contents div and title from body-only export
* lisp/ox-html.el (org-html-inner-template): Remove contents div and
  title.
(org-html-template): Add contents div and title.
2013-03-04 12:33:04 +01:00
Nicolas Goaziou f3ef3eb549 ox-html: Can't activate jsinfo script during a body-only export
* lisp/ox-html.el (org-html-infojs-install-script): Can't activate
  jsinfo script during a body-only export.
2013-03-04 12:33:03 +01:00
Nicolas Goaziou d3b8194069 ox: Store export options in :export-options porperty
* lisp/ox.el (org-export-as): Store export options in :export-options
  porperty within communication channel.

This patch allows export options activated to be available to export
back-ends.
2013-03-04 12:33:03 +01:00
Bastien Guerry 5c4c8afe07 Fix bug in org-schedule' and org-deadline' introduced in fc8824.
Thanks to Eric Abrahamsen for reporting this.
2013-03-04 12:22:08 +01:00
Nicolas Goaziou f00fd7800f ox-latex: Fix bug with enforced item numbering in mixed lists
* lisp/ox-latex.el (org-latex-item): Fix wrong behaviour when
  a counter is set in an ordered list while its parent is not ordered.

This fixes numbering in the following case:

  - Unordered.
    3. [@3] Ordered.

Thanks to Hiroshi Saito for reporting the problem.
2013-03-04 08:54:58 +01:00
Bastien Guerry 6ca7953db5 org.el (org-show-context): Don't try to fix ellipsis when showing a subtree in agenda
* org.el (org-show-context): Don't try to fix ellipsis when
showing a subtree in agenda.

Thanks to James Harkins for reporting this.
2013-03-04 07:38:04 +01:00
Bastien Guerry 952100a8a1 Fix typo 2013-03-04 07:36:54 +01:00
Ryo TAKAISHI c956672bb9 org-protocol: Pass optional value using query in url to capture from protocol.
* lisp/org-protocol.el: (org-protocol-convert-query-to-plist): New
function.
(org-protocol-do-capture): Use new function.
(org-protocol-data-separator): Change default separator.

When org-protocol's url has query, org-capture get query using
plist-get from store-link.  For example:
Url is "org-protocol:/capture:/URL/TITLE/BODY?key=value"
org-capture can get (:key value) with (plist-get org-store-link-plist :query).

TINYCHANGE
2013-03-04 01:16:32 +01:00
Bastien Guerry 8b637b54a9 Complete fix for 128e14b 2013-03-03 22:26:09 +01:00
Bastien Guerry f3fa14ef5d Fix commit 128e14b 2013-03-03 22:21:53 +01:00
Jambunathan K 510f5a9ba9 ox-html.el (org-html-code, org-html-verbatim): Transcode value
* lisp/ox-html.el (org-html-code, org-html-verbatim):
Transcode value.
2013-03-03 21:58:09 +01:00
Achim Gratz e541a1dd19 fix a stray "user-error" introduced in bd89d6a02f
* lisp/org-table.el (org-table-eval-formula): The condition-case to
  check for must be "error", not "user-error".

This fixes these test failures:

4 unexpected results:
   FAILED  test-org-table/references/format-specifier-E
   FAILED  test-org-table/references/format-specifier-EL
   FAILED  test-org-table/references/format-specifier-L
   FAILED  test-org-table/references/format-specifier-none

Reported in:
http://permalink.gmane.org/gmane.emacs.orgmode/67450
http://permalink.gmane.org/gmane.emacs.orgmode/67503
2013-03-03 20:29:58 +01:00
Nicolas Goaziou 8f40d7f7a1 ox: Fix export of empty src blocks
* lisp/ox.el (org-export-format-code-default): Handle empty source
  blocks more gracefully.
* lisp/ox-ascii.el (org-ascii-src-block): Handle empty blocks more
  gracefully.
* testing/lisp/test-ox.el: Add tests.
2013-03-03 19:13:43 +01:00
Bastien Guerry 128e14b7f5 ox-html.el: Reintroduce #+HTML_HEAD_EXTRA, previously known as HTML_STYLE_EXTRA
* ox-html.el (html): Reintroduce #+HTML_HEAD_EXTRA, previously
known as HTML_STYLE_EXTRA.
(org-html-head): Enhance docstring.
(org-html-head-extra): Reintroduce.  Was `org-html-style-extra'.
(org-html--build-head): Rename from `org-html--build-head'.
Add information from `org-html-head-extra'.
(org-html-template): Use `org-html--build-head'.

Having an option for adding extra stuff is useful when publishing
projects.
2013-03-03 18:58:40 +01:00
Bastien Guerry 633cfc9dac ox-html.el (org-html-display-buffer-mode): Delete
* ox-html.el (org-html-display-buffer-mode): Delete.
(org-html-export-as-html): Use `set-auto-mode' instead of
`org-html-display-buffer-mode'.

Thanks to Jambunathan for suggesting this.
2013-03-03 18:29:00 +01:00
Bastien Guerry 06ec886572 org-agenda.el (org-agenda-write): Overwrite file when called non-interactively
* org-agenda.el (org-agenda-write): Overwrite file when called
non-interactively.

Thanks to Simon Thum for reporting this.
2013-03-03 17:42:32 +01:00
Bastien Guerry f48605c878 Merge branch 'maint' 2013-03-03 13:41:20 +01:00
Bastien Guerry f6883b8e26 org-mobile.el (org-mobile-edit): Fix bug about inserting headings in invisible region
* org-mobile.el (org-mobile-edit): Workaround a
`org-insert-heading-respect-content' bug which prevents
correct insertion when point is invisible

Thanks to James Harkins for providing this fix.
2013-03-03 13:41:08 +01:00
Bastien Guerry fac8191daf Various fixes related to `org-insert-heading'.
* org.el (org-previous-line-empty-p): New parameter to allow
checking next line.  Add a docstring.
(org-insert-heading): Handle two universal prefix arguments as
advertized in the docstring.  Don't insert new lines when
creating a heading after the first heading in the current
subtree.
(org-insert-heading-respect-content): New optional argument
arg, passed to `org-insert-heading'.

* org.texi (Structure editing): Update documentation for
`org-insert-heading-or-item'.
(Plain lists, Relative timer): Update index entry.

* org-mobile.el (org-mobile-edit): Use correct parameters for
`org-insert-heading-respect-content'.
2013-03-03 13:38:26 +01:00
Bastien Guerry c187bd7cab org.el (org-mode): Remove syntax entries
* org.el (org-mode): Remove syntax entries.
2013-03-03 08:02:53 +01:00
Bastien Guerry 76fa979225 org.el (org-mode): New default value for *-of-defun-function
* org.el (org-mode): Use `org-backward-element' and
`org-forward-element' for `beginning-of-defun-function' and
`end-of-defun-function': this allows using C-M-a and C-M-e
before the first headline.
2013-03-03 07:53:11 +01:00
Bastien Guerry 0e42e7a7e3 ox-html.el: Rename a property (complete commit 2752ef1c4b)
Thanks to Sébastien Vauban for reporting this.
2013-03-03 06:34:35 +01:00
Bastien Guerry b9e1648860 ox-html.el (html): Remove :html-htmlized-css-url :options-alist
* ox-html.el (html): Remove :html-htmlized-css-url
:options-alist.
2013-03-03 06:30:43 +01:00
Achim Gratz ca125b82b3 ob-perl: implement results interpretation and improve wrapper
* lisp/ob-perl.el (org-babel-execute:perl): Pass `result-params´
  through to `org-babel-perl-evaluate´.
* lisp/ob-perl.el (org-babel-variable-assignments:perl): Add "my" to
  variable declaration so that it becomes compatible with "use
  strict;".
* lisp/ob-perl.el (org-babel-varariable-assignments:perl): Use new
  internal formatting function `org-babel-perl--var-to-perl´.
* lisp/ob-perl.el (org-babel-perl--var-to-perl): New internal function, uses Perl
  non-interpolating quoting on the string that defines the variable to
  suppress spurious interpretation of it as Perl syntax.
* lisp/ob-perl.el (org-babel-perl-wrapper-method): Use a block and
  declare all variables as "my", also use Perl quoting throughout.
  Redirect STDOUT to the temporary file so that simply "print" will
  put the results there.  Check the return value and output in table
  form if it is an ARRAY ref, otherwise print it without a final
  newline.
* lisp/ob-perl.el (org-babel-perl-preface): Content of this variable
  is prepended to body before invocation of perl.
* lisp/ob-perl.el (org-babel-perl-evaluate): Rename input parameter
  body to ibody and let-bind body to concatentation of
  org-babel-perl-preface and ibody.  Implement results interpretation
  so that tables are easier to produce.

Following suggestions by Daniel M. German in
http://thread.gmane.org/gmane.emacs.orgmode/66855.
2013-03-02 22:49:46 +01:00
Achim Gratz 94934010d7 ob-eval: make org-babel--shell-command-on-region internal and simplify
* lisp/ob-eval.el (org-babel-eval): Use simplified version of
  `org-babel--shell-command-on-region´, we are the only caller of this
  function.
* lisp/ob-eval.el (org-babel--shell-command-on-region): Replace
  `org-babel-shell-command-on-region´ with a much more simplified
  internal version, remove superfluous DOCSTRING and interactive
  clause, strip out all conditionals which were never used.  Prevent
  deletion of temporary input file to aid debugging when the symbol
  `org-babel--debug-input´ is bound and has non-nil value.
2013-03-02 22:49:46 +01:00
Nicolas Goaziou cbf2fcf60c Update `org-export-backends'
* lisp/org.el (org-export-backends): Update variable.  `infojs' was
  merged into ox-html and `freemind' was added.
2013-03-02 22:48:09 +01:00
Jambunathan K f2b2c8318f Add Freemind Mindmap Back-End for Org Export Engine
* contrib/lisp/ox-freemind.el: New file.

* lisp/ox-html.el (org-html--tags, org-html-format-headline)
(org-html--format-toc-headline, org-html-checkbox)
(org-html-table-cell, org-html-timestamp)
(org-html-verse-block, org-html-special-string-regexps):
Replace named HTML entities with their numeric counterparts.
This keeps Freemind backend happy.
2013-03-02 22:33:03 +01:00
Nicolas Goaziou 25f2ae88f5 ox-org: Silence byte-compiler 2013-03-02 19:31:12 +01:00
Bastien Guerry 71e9b321ec Merge branch 'master-wip3' 2013-03-02 18:59:55 +01:00
Bastien Guerry 0a21f82962 Merge branch 'maint'
Conflicts:
	lisp/org-clock.el
2013-03-02 18:59:47 +01:00
Bastien Guerry 4351dda5ab ox-org.el: Handle :htmlized-source in publishing projects
* ox-org.el (org-org-htmlized-css-url): Rename from
`org-html-htmlized-org-css-url' and moved here from
ox-html.el.
(org-org-publish-to-org): Handle :htmlized-source in
publishing projects.
2013-03-02 18:46:07 +01:00