Commit Graph

13485 Commits

Author SHA1 Message Date
Nicolas Goaziou 479c21336f Remove special behaviour for TARGET keyword
* lisp/org.el (org-store-link, org-link-search, org-options-keywords):
  Remove reference to TARGET keyword.
* lisp/ox.el (org-export-resolve-fuzzy-link, org-export-get-ordinal):
  Do not use TARGET as a destination for links anymore.
* testing/lisp/test-ox.el: Update tests.
* testing/lisp/test-org.el: Update tests.

Its specifications were not useful enough to keep maintaining this
feature.
2013-04-04 20:38:27 +02:00
Nicolas Goaziou 3d65b46c0c ox-org: Add interactive functions to back-end
* lisp/ox-org.el (org): Add a menu entry for the back-end.
(org-org-export-as-org, org-org-export-to-org): New functions.
* lisp/org.el (org-export-backends): Accept `org' as a loadable
  back-end.
2013-04-04 15:09:22 +02:00
Eric Schulte cf5e96c8e1 documentation of the new :post header argument
* doc/org.texi (post): Documentation and an example of usage.
2013-04-04 06:41:56 -06:00
Eric Schulte 3932efdf8e intuitive code block post processing w/file results
* lisp/ob-core.el (org-babel-execute-src-block): Make sure we process
  file results before they are passed to the post-processing code block,
  and not afterwards.  Tangles these two header arguments in the code,
  but makes for more intuitive behavior and enables important use cases.
2013-04-04 06:41:55 -06:00
Eric Schulte bde2348c9e read code block values with earmuffs as Emacs Lisp
* lisp/ob-core.el (org-babel-read): Read code block values with earmuffs
  as Emacs Lisp.
2013-04-04 06:41:55 -06:00
Eric Schulte d35ec18ab5 post header arg post-processes code block results
* lisp/ob-core.el (org-babel-common-header-args-w-values): Add :post to
  the list of header arguments.
  (org-babel-execute-src-block): Post process results when the :post
  header argument has been supplied.
2013-04-04 06:41:55 -06:00
Bastien Guerry bc3ccdfba2 Fix reverted commit 00a227
Make `org-resolve-clocks-if-idle' check for an existing marker buffer.
2013-04-04 09:42:57 +02:00
Bastien Guerry 3b5f56f0f4 Revert "org-clock.el: Set clock markers to nil on clock out/cancel"
This reverts commit 00a227c0d2.
2013-04-04 09:40:02 +02:00
Bastien Guerry de4d520610 org-table.el (orgtbl-to-generic): Fix bug when exporting the cells of radio tables with 'hline
* org-table.el (orgtbl-to-generic): Fix bug when exporting the
cells of radio tables with 'hline.

Thanks to David Kincaid for reporting this.
2013-04-04 00:21:31 +02:00
Eric Schulte 86ce0790a1 change this failing test so that it no longer fails
I see no good way to get the code block name, not sure how we used to do
this, but it is definitely not supported by the current code.
2013-04-03 11:30:14 -06:00
Aaron Ecay 8cda3ca605 Use prefix arg in org-edit-special
* org.el (org-edit-special): Use prefix arg.

This change only makes a difference when editing source blocks.
2013-04-03 19:02:17 +02:00
Bastien Guerry b5f4bd12cb org.el (org-speed-commands-default): Use ?s for `org-narrow-to-subtree'
* org.el (org-speed-commands-default): Use ?s for
`org-narrow-to-subtree'.
2013-04-03 18:28:30 +02:00
Bastien Guerry 0066737092 org-agenda.el: Minor typo fix and docstring enhancement
* org-agenda.el (org-agenda-start-on-weekday): Fix typo.
(org-agenda-start-day): Enhance docstring.

* org.texi (Weekly/daily agenda): Add `org-agenda-start-day'
and `org-agenda-start-on-weekday' to the variable index and
document them.
2013-04-03 18:28:30 +02:00
Bastien Guerry 9c8f4a53d7 org-src.el (org-src-native-tab-command-maybe): Check that we are in a source code block
* org-src.el (org-src-native-tab-command-maybe): Check that we
are in a source code block.

Consider this content:

#+HEADERS: :var data1=1
#+BEGIN_SRC emacs-lisp :var data2=2
  (message "data1:%S, data2:%S" data1 data2)
#+END_SRC

Before the fix, hitting TAB on #+HEADERS would throw an error.
2013-04-03 18:28:29 +02:00
Bastien Guerry afe762fa9f org-mobile.el: Remove useless defvar
* org-mobile.el: Remove useless defvar.
2013-04-03 18:28:29 +02:00
Bastien Guerry 30064825b3 org.el (org-indent-line): Enhance indentation after a list item
* org.el (org-indent-line): A line just below a line with a
list item is now indented depending on the indentation of this
list item.
2013-04-03 18:28:29 +02:00
Bastien Guerry c421ef6a71 org-bbdb.el: Fix typo. 2013-04-03 18:28:29 +02:00
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
Eric Schulte 81d354b6c3 simplify the discussion of :var causing execution 2013-04-03 09:17:34 -06:00
Aaron Ecay 09e52738e9 Document how :var introduces code block dependencies.
* doc/org.texi: Document how :var introduces code block dependencies.
2013-04-03 09:17:26 -06: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
Aaron Ecay 252238a60d Fix testing/lisp/test-ob-emacs-lisp.el
* testing/lisp/test-ob-emacs-lisp.el: Move stray test inside ert-deftest
2013-04-03 09:17:17 -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
Aaron Ecay 69eb39a4a9 contrib/lisp/org-git-link.el: Small fixes
* contrib/lisp/org-git-link.el: Wrap into `eval-and-compile'
to silent warnings.
(org-git-show): Use `with-current-buffer' instead
of (save-excursion (set-buffer ...))

TINYCHANGE
2013-04-03 13:11:25 +02:00
Aaron Ecay 137fd35b64 contrib/lisp/org-bibtex-extras.el: Replace non-existent `org-babel-clean-text-properties' with `org-no-properties'
* contrib/lisp/org-bibtex-extras.el (obe-citations)
(obe-get-meta-data): Replace non-existent
`org-babel-clean-text-properties' with `org-no-properties'.

TINYCHANGE
2013-04-03 13:07:10 +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 6f78b660f8 export back-ends in contrib: Handle DATE keywords the same way
* contrib/lisp/ox-deck.el (org-deck--build-meta-info): Use
  `org-export-get-date'.
* contrib/lisp/ox-groff.el (org-groff--mt-head): Use
  `org-export-get-date'.
* contrib/lisp/ox-koma-letter.el (org-koma-letter-template): Use
  `org-export-get-date'.
2013-04-03 00:02:15 +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 82438e23f6 ox-taskjuggler: Fix dependencies resolution
* contrib/lisp/ox-taskjuggler.el (org-taskjuggler-format-dependencies):
  Fix dependencies resolution.
2013-04-01 17:17:55 +02:00
Nicolas Goaziou 989fae0c79 ox-taskjuggler: Use task_id property when specified
* contrib/lisp/ox-taskjuggler.el (org-taskjuggler--build-unique-id):
  Use specified id (TASK_ID property) when possible.
2013-04-01 16:59:26 +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