Commit Graph

13374 Commits

Author SHA1 Message Date
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
Rick Frankel 8ed99fad6b Don't generate links for empty theme or transition.
* ox-deck.el (org-deck--get-packages): Check for non-blank deck-theme
  and deck-transition.
2013-03-04 07:39:16 +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 a3e554f4cf ox-s5.el and ox-deck.el: Use `org-html--build-head'
* ox-s5.el (org-s5-template):
* ox-deck.el (org-deck-template): Use `org-html--build-head'.

See previous commit.
2013-03-03 18:59:39 +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
Rüdiger Sonderfeld b06735aa85 orgcontacts.el: Fix `date' being broken in `org-contacts-anniversaries'.
* contrib/lisp/org-contacts.el: Add defvar for date.  Similar to org.el.

  (org-contacts-anniversaries): Setting date to nil breaks the
  function.  Bug was introduced in e4cebbe40.

Signed-off-by: Rüdiger Sonderfeld <ruediger@c-plusplus.de>
2013-03-03 17:53:15 +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 2d3addeccf test-ob-perl: add a few perl babel tests
* testing/lisp/test-ob-perl.el: New file with a few tests of the perl
  babel integration.
2013-03-02 22:49:46 +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
Achim Gratz 6bc6a361b0 Ensure that new exporter gets tested in batch mode
* testing/org-test.el: Require ox so that these tests will be run
  during batch test.
2013-03-02 18:28:18 +01:00
Achim Gratz 3773029db9 fix 17131cbf63
* lisp/ob-tangle.el (org-babel-tangle): Do not change signature, a nil
  arg is even documented in the manual.
* lisp/org-src.el: Change declaration of `org-babel-tangle´ to "arg"
  for first argument.
2013-03-02 18:13:52 +01:00
Bastien Guerry 2752ef1c4b ox-html.el: Use HTML_HEAD instead of HTML_STYLE and fix some variable names
* ox-html.el (org-html-style-default): Update docstring.
(org-html-infojs-install-script, org-html--build-style):
Update property names.
(org-html-head-include-scripts)
(org-html-head-include-default-style, org-html-head):
Respectively rename from `org-html-style-include-scripts',
`org-html-style-include-default' and `org-html-style', now
obsolete.
(org-html-style-extra): Delete.

Thanks to those who pointed at this problem on the mailing list.
2013-03-02 18:05:16 +01:00
Nicolas Goaziou 82246f8196 ox-html: Fix infloop
* lisp/ox-html.el (org-html--format-toc-headline): Fix infloop
  introduced in c299c109bb.
2013-03-02 18:02:57 +01:00
Bastien Guerry 3b21f246d6 org-clock.el (org-clock-out): Fix bug.
* org-clock.el (org-clock-out): Fix bug: if a closing note
needs to be stored in the drawer where clocks are stored,
let's temporarily remove `org-clock-remove-empty-clock-drawer'
from `org-clock-out-hook'.

Thanks to Дядов Васил Стоянов for reporting this bug.
2013-03-02 17:39:23 +01:00
Bastien Guerry aa3091580d ob-tangle.el: A small fix and some refactoring
* ob-tangle.el (org-babel-tangle): Remove unused attempt of
prompting the user of the tangle file name since :tangle is
always set.  Don't prompt for a tangle file name when called
with two universal prefix arg outside of a src block.
Use `org-babel-tangle-single-block'.
(org-babel-tangle-single-block): New function.
(org-babel-tangle-collect-blocks): Use the new function.

Thanks to Rick Frankel who provided a patch for this fix.
The patch fixes this issue (quoting Rick's email):

"When attempting to tangle a single block, `org-babel-tangle'
would use `narrow-to-region', causing any header arguments not
on the "#+BEGIN_SRC" line to be excluded from the tangled file."
2013-03-02 17:15:08 +01:00
Bastien Guerry ff97a0ee9d Revert "Add (provide ...) forms."
This reverts commit 8decdbcd23.
2013-03-02 16:20:59 +01:00
Bastien Guerry 13c481b583 Merge branch 'master' of orgmode.org:org-mode 2013-03-02 16:08:46 +01:00
Bastien Guerry bd89d6a02f org-table.el: Use `user-error' instead of `error' for user errors
* org-table.el (org-table-convert-region, org-table-export)
(org-table-align, org-table-beginning-of-field)
(org-table-copy-down, org-table-check-inside-data-field)
(org-table-insert-column, org-table-find-dataline)
(org-table-delete-column, org-table-move-column)
(org-table-insert-row, org-table-insert-hline)
(org-table-kill-row, org-table-paste-rectangle)
(org-table-wrap-region, org-table-sum, org-table-get-formula)
(org-table-get-formula, org-table-get-stored-formulas)
(org-table-fix-formulas, org-table-maybe-eval-formula)
(org-table-rotate-recalc-marks, org-table-eval-formula)
(org-table-get-range, org-table-get-descriptor-line)
(org-table-find-row-type, org-table-recalculate)
(org-table-iterate, org-table-iterate-buffer-tables)
(org-table-formula-handle-first/last-rc)
(org-table-edit-formulas, org-table-fedit-shift-reference)
(org-rematch-and-replace, org-table-shift-refpart)
(org-table-fedit-finish, org-table-fedit-lisp-indent)
(org-table-show-reference, org-table-show-reference)
(org-table-show-reference, org-table-show-reference)
(org-table-force-dataline, orgtbl-error, orgtbl-export)
(orgtbl-send-replace-tbl, org-table-to-lisp)
(orgtbl-send-table, orgtbl-send-table, orgtbl-send-table)
(orgtbl-toggle-comment, orgtbl-insert-radio-table)
(orgtbl-to-unicode, org-table-get-remote-range)
(org-table-get-remote-range, org-table-copy-dow)
(org-table-check-inside-data-field, org-table-insert-colum)
(org-table-find-dataline, org-table-delete-colum)
(org-table-move-column, org-table-insert-ro)
(org-table-insert-hline, org-table-kill-ro)
(org-table-paste-rectangle, org-table-wrap-regio)
(org-table-sum, org-table-get-formul)
(org-table-get-stored-formulas, org-table-fix-formula)
(org-table-maybe-eval-formul, org-table-rotate-recalc-marks)
(org-table-eval-formul, org-table-get-range)
(org-table-get-descriptor-lin, org-table-find-row-type)
(org-table-recalculat, org-table-iterate)
(org-table-iterate-buffer-table)
(org-table-formula-handle-first/last-r)
(org-table-edit-formulas, org-table-fedit-shift-referenc)
(org-rematch-and-replace, org-table-shift-refpar)
(org-table-fedit-finish, org-table-fedit-lisp-inden)
(org-table-show-reference, org-table-force-datalin)
(orgtbl-error, orgtbl-export, orgtbl-send-replace-tb)
(org-table-to-lisp, orgtbl-send-tabl, orgtbl-toggle-comment)
(orgtbl-insert-radio-tabl, orgtbl-to-unicode)
(org-table-get-remote-range): Use `user-error' instead of
`error' for user errors.
2013-03-02 15:40:09 +01:00
Bastien Guerry 2d2913ce4f ob-core.el (org-babel-load-in-session): Throw a useful error when there is no code block at point
* ob-core.el (org-babel-load-in-session): Throw a useful error
when there is no code block at point.
2013-03-02 15:28:51 +01:00
Bastien Guerry 17131cbf63 ob-tangle.el (org-babel-tangle): Allow two universal prefix arguments to tangle by the target file of the block at point
* ob-tangle.el (org-babel-tangle): Rename the ONLY-THIS-BLOCK
parameter to ARG.  Allow two universal prefix arguments to
tangle by the target file of the block at point.
(org-babel-tangle-collect-blocks): New parameter TANGLE-FILE
to restrict the collection of blocks to those who will be
tangled in TARGET-FILE.

Thanks to Zech for suggesting this.
2013-03-02 15:27:25 +01:00