0
0
Fork 1
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-08-26 09:02:52 +00:00
Commit graph

8709 commits

Author SHA1 Message Date
Bastien Guerry 25e1e4d0eb ox-html.el (org-html-table-row-tags): Better example
* ox-html.el (org-html-table-row-tags): Better example.

Thanks to Stefan Vollmar for providing this new example.
2013-04-09 19:40:06 +02:00
Bastien Guerry 749829d591 org-clock.el (org-clock-select-task): Fix window to buffer
* org-clock.el (org-clock-select-task): Fix window to buffer.
Hide the cursor.
(org-clock-insert-selection-line): Add the clock-out time.

Thanks to Bernt Hansen for reporting the issue about the window.
2013-04-09 19:36:14 +02:00
Michael Brand 5625a6ed79 org-table.el: Fix range len bugs for empty ranges
(org-table-make-reference): A range with only empty fields should lead
to length 0.
* testing/lisp/test-org-table.el: Adapt expected for several
ert-deftest.

The range len bugs may lead to wrong calculations for range references
with empty fields when the range len is relevant.  Affects typically
Calc vmean on simple range and without format specifier EN.  Also
Lisp with e. g. `length' on simple range or with L.

It is worth a small compatibility change: For a range with only empty
fields it is now possible and necessary to choose different behaviors
of vmean by adding the format specifiers E and/or N.

This is a follow-up of commit
764315b3fc.
2013-04-09 19:05:20 +02:00
Francesco Pizzolante 01ce58b3d6 Normalize the construction of outline-container DIV ID
* ox-html.el (org-html-headline): Normalize the construction of
  outline-container DIVs by always using the inner headline ID.

TINYCHANGE
2013-04-09 19:05:15 +02:00
Eric Schulte 6c11a0664e more restrictive elisp eval of header arguments
* lisp/ob-core.el (org-babel-read): More restrictive elisp eval of
  header arguments.
2013-04-09 10:35:50 -06:00
Bastien Guerry 4b139ec4c8 ox-html.el (org-html-table-row-tags): Allow new dynamically bound value `row-number'
* ox-html.el (org-html-table-row-tags): Allow new dynamically
bound value `row-number'.
(org-html-table-row): Bind `row-number' to the number of the
row (first row is 0).
2013-04-09 17:18:32 +02:00
Nicolas Goaziou 5f48315568 ox: Add function returning row number in a table
* lisp/ox.el (org-export-table-row-number): New function.
(org-export-table-cell-address): Use new function.
* testing/lisp/test-ox.el: Add test.
2013-04-09 16:52:41 +02:00
Nicolas Goaziou 6ce2b72c9f org-element: Parse table cells with missing ending space
* lisp/org-element.el (org-element-table-cell-successor): Parse table
  cells with missing ending space.
2013-04-09 16:17:08 +02:00
Bastien Guerry 872e3736d7 org.el (org-minutes-to-clocksum-string): Round fractions of minutes
* org.el (org-minutes-to-clocksum-string): Round fractions of
minutes.

When adding efforts values in the column view, "0:20" will first be
converted as 0.333333333 hour.  When converting the final sum, we
now round the final sum of minutes (e.g. 99.999999999) to get the
correct hour displa (i.e. 1:40 instead of 1:39).
2013-04-09 16:15:17 +02:00
Nicolas Goaziou 33f800ccd2 ox-latex: Fix inline-math table mode
* lisp/ox-latex.el (org-latex--math-table): Fix inline-math table
  environment.
2013-04-09 15:46:41 +02:00
Bastien Guerry e664fc89d5 ox-html.el (org-html-table-row-tags): Fix example in docstring
* ox-html.el (org-html-table-row-tags): Fix example in docstring.

Thanks to Stefan Vollmar for providing the correct example.
2013-04-09 13:44:00 +02:00
Bastien Guerry 728c69df18 Revert "org.el (org-file-contents): Make the message more prominent"
This reverts commit 591d377e78.
2013-04-08 22:05:03 +02:00
Bastien Guerry cd481dfba8 org-agenda.el (org-agenda-goto-date): Fix bug when going to a date in month view
* org-agenda.el (org-agenda-span-to-ndays): Enhance docstring.
(org-agenda-goto-date): Fix bug when going to a date in month
view.

Thanks to Eric S Fraga for reporting this bug.
2013-04-08 21:25:10 +02:00
Bastien Guerry 15d6dd651b org-agenda.el (org-agenda-goto-date): Redo an agenda* if needed
* org-agenda.el (org-agenda-goto-date): If the agenda was
built as agenda* (scheduled/deadline items with hour spec)
then redo an agenda*.
2013-04-08 21:25:10 +02:00
Bastien Guerry c25566fec3 org-agenda.el (org-agenda-goto-date): Put the cursor on the agenda line with the selected date
* org-agenda.el (org-agenda-goto-date): Put the cursor on the
agenda line with the selected date.
2013-04-08 21:25:10 +02:00
Bastien Guerry ee422561c8 org-clock.el (org-clock-resolve): Enhance the content of the help window
* org-clock.el (org-clock-resolve): Enhance the content of the
help window.
2013-04-08 21:25:09 +02:00
Bastien Guerry 596177cd5d org-footnote.el (org-footnote-auto-label): Minor docstring fix
* org-footnote.el (org-footnote-auto-label): Minor docstring fix.
2013-04-08 21:25:09 +02:00
Bastien Guerry 1144903cfa ox-odt.el (org-odt-link): Fix bug: convert & to & in links
* ox-odt.el (org-odt-link): Fix bug: convert & to & in
links.
2013-04-08 21:25:09 +02:00
Nicolas Goaziou 1af215bb46 ox-html: Tiny fix and outdated comments removal
* lisp/ox-html.el (org-html-doctype): Make value fit on a single line
  so `org-export-insert-default-template' can handle it.
2013-04-08 00:17:10 +02:00
Bastien Guerry bf8c341f4e ox-html.el (org-html-table-row-tags): Update
* ox-html.el (org-html-table-row): Dynamically bind
`rowgroup-number', `start-rowgroup-p', `end-rowgroup-p',
`top-row-p', `bottom-row-p'.
(org-html-table-row-tags): Update docstring: tell what
variables are dynamically bound.

Thanks to Stefan Vollmar for raising this problem.
2013-04-07 23:19:07 +02:00
Bastien Guerry 8c7e46b6a9 org-src.el (org-edit-src-code): Don't set buffer-auto-save-file-name' unless auto-save-default' is non-nil
* org-src.el (org-edit-src-code): Don't set
`buffer-auto-save-file-name' unless `auto-save-default' is
non-nil.

Thanks to Charles Berry for reporting this.
2013-04-07 22:43:02 +02:00
Nicolas Goaziou d6d7bc55b8 ox/ox-html: Use a language agnostic and more neutral default creator
* lisp/ox-html.el (org-html-creator-string): Change default value.
* lisp/ox.el (org-export-creator-string): Change default value.
2013-04-07 20:21:58 +02:00
Rick Frankel b162dd43db Fix typo in doc string.
* lisp/ox-html.el (org-html-divs): Extra character in doc string.
2013-04-07 13:02:11 -04:00
Eric Schulte 3cdd81e820 Merge branch 'master' of orgmode.org:org-mode 2013-04-07 07:26:40 -06:00
Eric Schulte 58d601979c include default elisp header args in call lines
Because in actuality the call line expands to an Emacs Lisp code
  block.

* lisp/ob-lob.el (org-babel-lob-execute): Include default elisp header
  args in call lines.
2013-04-07 07:16:08 -06:00
Nicolas Goaziou bd61cb2bf0 ox-html: Allow to add last modification time in preamble/postamble
* lisp/ox-html.el (org-html-postamble-format,
  org-html-preamble-format): Allow last modification time of source in
  template.
(org-html-format-spec): Produce last modification time when the source
is a file.
2013-04-07 14:59:27 +02:00
Nicolas Goaziou c1d716f703 ox-html: Fix docstrings
* lisp/ox-html.el (org-html-postamble-format,
  org-html-preamble-format): Fix docstrings.
2013-04-07 14:53:11 +02:00
Eric Schulte 385ef25c6e don't over-evaluate result-params in macro
* lisp/ob-core.el (org-babel-result-cond): Don't over-evaluate
  result-params in macro.
2013-04-07 06:49:54 -06:00
Nicolas Goaziou 2d6a90229d ox/ox-html: Fix defcustoms
* lisp/ox.el (org-export-with-archived-trees, org-export-with-author,
  org-export-with-clocks, org-export-with-date,
  org-export-creator-string, org-export-with-drawers,
  org-export-with-email, org-export-with-emphasize,
  org-export-exclude-tags, org-export-with-fixed-width,
  org-export-with-footnotes, org-export-with-latex,
  org-export-headline-levels, org-export-default-language,
  org-export-preserve-breaks, org-export-with-entities,
  org-export-with-inlinetasks, org-export-with-planning,
  org-export-with-priority, org-export-with-section-numbers,
  org-export-select-tags, org-export-with-smart-quotes,
  org-export-with-special-strings,
  org-export-with-statistics-cookies,
  org-export-with-sub-superscripts, org-export-with-toc,
  org-export-with-tables, org-export-with-tags,
  org-export-with-tasks, org-export-time-stamp-file,
  org-export-with-timestamps, org-export-with-todo-keywords): Fix
  docstrings.
* lisp/ox-html.el (org-html-postamble-format): Slightly change default
  value so "Generated by" string doesn't get duplicated.
(org-html-creator-string): Fix docstring.
2013-04-07 14:36:48 +02:00
Achim Gratz 8ea4967643 ob-perl: use TAB as separator for table results
* lisp/ob-perl.el (org-babel-perl-wrapper-method): Use TAB as
  separator for table results as expected by
  `org-babel-import-elisp-from-file´.
2013-04-07 11:21:14 +02:00
Achim Gratz af6f32af1a fix commit df0c8a3bc4
* lisp/ob-core.el (org-babel-number-p): String match for any number
  moved first so that the match data for the length check does not
  become corrupted.
2013-04-07 11:16:45 +02:00
Bastien Guerry 5e8f30f61e org-table.el (orgtbl-apply-fmt): Enhance docstring
* ox.el (org-export-table-row-group): Fix typo in docstring.
2013-04-07 10:05:13 +02:00
Bastien Guerry 3f4028312e ox.el: Fix typos
* org-table.el (orgtbl-apply-fmt): Enhance docstring.
2013-04-07 10:03:37 +02:00
Rémi Vanicat 1f8822101b Correctly format orgtbl line when there is a :lfmt argument.
* org-table.el (orgtbl-format-line): Fix bug when formatting
line.

TINYCHANGE
2013-04-07 09:41:00 +02:00
Bastien Guerry 0625b53a07 org-table.el (orgtbl-apply-fmt): Enhance docstring
* org-table.el (orgtbl-apply-fmt): Enhance docstring.
2013-04-07 09:36:52 +02:00
Bastien Guerry 227bc3b702 Merge branch 'master' of orgmode.org:org-mode 2013-04-06 23:17:41 +02:00
Bastien Guerry 591d377e78 org.el (org-file-contents): Make the message more prominent
* org.el (org-file-contents): Make the message more prominent.
2013-04-06 22:31:13 +02:00
Eric Schulte 09cb6d3f21 use org-babel-result-cond in Ruby code blocks
* lisp/ob-ruby.el (org-babel-execute:ruby): Use org-babel-result-cond in
  Ruby code blocks.
  (org-babel-ruby-evaluate): Delay table processing.
2013-04-06 12:59:04 -06:00
Eric Schulte fe93daa72a use org-babel-result-cond in JavaScript code blocks
* lisp/ob-js.el (org-babel-execute:js): Use org-babel-result-cond in
  JavaScript code blocks.
2013-04-06 11:39:23 -06:00
Eric Schulte 92e32755fd use org-babel-result-cond in scheme code blocks
* lisp/ob-scheme.el (org-babel-execute:scheme): Use
  org-babel-result-cond in scheme code blocks.
2013-04-06 11:39:23 -06:00
Eric Schulte f58889f0c1 use org-babel-result-cond in OCaml code blocks
* lisp/ob-ocaml.el (org-babel-execute:ocaml): Use org-babel-result-cond
  in OCaml code blocks.
2013-04-06 11:39:23 -06:00
Eric Schulte 4b51984fe7 use org-babel-result-cond in Haskell code blocks
* lisp/ob-haskell.el (org-babel-execute:haskell): Use
  org-babel-result-cond in Haskell code blocks.
2013-04-06 11:39:23 -06:00
Eric Schulte 7117ad4f92 raw org and drawer imply verbatim results
This unifies the results handling across a number of different
  languages.  It is still possible to force tabular output by adding the
  ":results table" argument.

The following example demonstrates the results in shell python and perl.

** drawer and table
#+begin_src sh :results drawer table
 echo -e "1\n2\n3"
#+end_src

#+RESULTS:
:RESULTS:
| 1 |
| 2 |
| 3 |
:END:

#+begin_src perl :results drawer table
"1\n2\n3"
#+end_src

#+RESULTS:
:RESULTS:
| 1 |
| 2 |
| 3 |
:END:

#+begin_src python :results drawer table
return "1\n2\n3"
#+end_src

#+RESULTS:
:RESULTS:
| 1\n2\n3 |
:END:

** drawer
#+begin_src sh :results drawer
 echo -e "1\n2\n3"
#+end_src

#+RESULTS:
:RESULTS:
1
2
3
:END:

#+begin_src perl :results drawer
"1\n2\n3"
#+end_src

#+RESULTS:
:RESULTS:
1
2
3
:END:

#+begin_src python :results drawer
return "1\n2\n3"
#+end_src

#+RESULTS:
:RESULTS:
1
2
3
:END:

** raw
#+begin_src sh :results raw
 echo -e "1\n2\n3"
#+end_src

#+RESULTS:
1
2
3

#+begin_src perl :results raw
"1\n2\n3"
#+end_src

#+RESULTS:
1
2
3

#+begin_src python :results raw
return "1\n2\n3"
#+end_src

#+RESULTS:
1
2
3

* lisp/ob-core.el (org-babel-result-cond): The "raw", "org" and "drawer"
  :results header argument values preclude table processing unless the
  "table" argument is given as well.
2013-04-06 11:39:23 -06:00
Bastien Guerry 52ba37b8c8 Merge branch 'master' of orgmode.org:org-mode 2013-04-06 19:11:57 +02:00
Bastien Guerry 1e496cc8f9 ox.el (org-export-replace-region-by): New function
* ox.el (org-export-replace-region-by): New function.
* ox-texinfo.el (org-texinfo-convert-region-to-texinfo):
* ox-md.el (org-md-convert-region-to-md):
* ox-latex.el (org-latex-convert-region-to-latex):
* ox-html.el (org-html-convert-region-to-html): New functions
to replace the active region by its export into various
backends.
2013-04-06 19:09:38 +02:00
Nicolas Goaziou f2fd185175 ox: Inhibit startup process when calling `org-mode'
* lisp/ox.el (org-export--get-inbuffer-options,
  org-export--list-bound-variables, org-export--generate-copy-script,
  org-export-string-as, org-export-expand-include-keyword,
  org-export--prepare-file-contents): Inhibit startup process when
  calling `org-mode'.
2013-04-06 17:31:56 +02:00
Bastien Guerry 133afe8915 Cosmetic change in messages. 2013-04-06 16:49:10 +02:00
Ippei FURUHASHI 67a55acb39 org-table.el: Fix a bug of leaving the inserted TBLFM line
* org-table.el (org-calc-current-TBLFM): Ensure to remove the
currently inserted TBLFM line, when calling `org-table-recalculate'
returns an error and the processing stops.

* testing/lisp/test-org-table.el: Add test.

When you hit =C-c C-c= at the line of "#+TBLFM: $2=$1*2::$2=$1**2" in

    | 1 |   |
    | 2 |   |
    #+TBLFM: $2=$1*1
    #+TBLFM: $2=$1*2::$2=$1**2

you got:

    | 1 |   |
    | 2 |   |
    #+TBLFM: $2=$1*2::$2=$1**2
    #+TBLFM: $2=$1*1
    #+TBLFM: $2=$1*2::$2=$1**2

with the error message of:

    user-error: Double definition `$2=' in TBLFM line, please fix by hand

In this case, you expected:

    | 1 |   |
    | 2 |   |
    #+TBLFM: $2=$1*1
    #+TBLFM: $2=$1*2::$2=$1**2
2013-04-06 15:15:44 +02:00
Nicolas Goaziou e01daa00be ox-publish: Fix "bad timestamp" error with some DATE values
* lisp/ox-publish.el (org-publish-find-date): Fix "bad timestamp"
  error with some DATE values: :date property in communication channel
  is no longer a string.
2013-04-06 14:17:26 +02:00
Nicolas Goaziou 67cf80ae9a ox: Add a command to insert a default export template
* lisp/ox.el (org-export-insert-default-template): New function.
(org-export--dispatch-ui, org-export--dispatch-action): Access to the
function through the dispatcher.

From the dispatcher, if subtree export is selected, options will be
installed as node properties in current subtree.
2013-04-06 13:34:41 +02:00
Carsten Dominik d1c940fe5c org.el (org-show-siblings): By default, also show siblings from a bookmark jump
* org.el (org-show-siblings): By default, also show siblings
from a bookmark jump.
2013-04-06 03:02:31 +02:00
Nicolas Richard 61f8870eb4 contrib/lisp/ob-maxima.el (org-babel-execute:maxima): Ignore lines with ";;; Loading #P"
* contrib/lisp/ob-maxima.el (org-babel-execute:maxima): Ignore
lines with ";;; Loading #P".

TINYCHANGE
2013-04-06 02:23:59 +02:00
Bastien Guerry bcc7a9cadf Merge branch 'master' of orgmode.org:org-mode 2013-04-06 01:52:02 +02:00
Bastien Guerry b37e27edb5 org-agenda.el (org-agenda-restriction-lock-highlight-subtree): New option
* org-faces.el (org-agenda-restriction-lock): Use less flashy
colors.

* org-agenda.el
(org-agenda-restriction-lock-highlight-subtree): New option.
2013-04-06 01:51:29 +02:00
Nicolas Goaziou 3d3465069b ox-icalendar: Fix DTSTAMP property value
* lisp/ox-icalendar.el (org-icalendar-convert-timestamp): Update
  docstring.
(org-icalendar-dtstamp): New function.
(org-icalendar--vevent, org-icalendar--vtodo): Use new function.
2013-04-05 21:28:35 +02:00
Bastien Guerry c61303ed3d org-agenda.el: Rename the "top-category" filter as "top-headline"
* org-agenda.el (org-agenda-top-headline-filter): Rename from
`org-agenda-top-headline-filter'.
(org-find-top-headline): Rename from `org-find-top-category'.
Add a docstring.
(org-agenda-filtered-by-top-headline): Rename from
`org-agenda-filtered-by-top-category'.
(org-agenda-filter-by-top-headline): Rename from
`org-agenda-filter-by-top-category'.  Fix docstring.
(org-agenda-filter-top-headline-apply): Rename from
`org-agenda-filter-top-category-apply'.  Fix docstring.
(org-agenda-mode-map): Update binding.

Using category here was confusing, because there is no Org
category involved, the filtering is really against a headline.
Since category filtering also exists, the confusion was bad.
2013-04-05 19:46:02 +02:00
Bastien Guerry 889b7e507c org-agenda.el (org-agenda-get-todos): Set `todo-state' earlier so that we can skip false-positives in time
* org-agenda.el (org-agenda-get-todos): Set `todo-state'
earlier so that we can skip false-positives in time.

For example, when searching for a TODO headline with "* NEXT bla"
in a buffer where (1) there is such a headline but (2) "NEXT" is
not in the list of known TODO keywords, then we skip this match.

The earlier behavior threw an error.
2013-04-05 19:46:02 +02:00
Bastien Guerry 428f12841f org.el (org-get-todo-state): Add a docstring
* org.el (org-get-todo-state): Add a docstring.
2013-04-05 19:46:02 +02:00
Carsten Dominik a5d6548a57 Highlight only headline with agenda subtree restriction
* lisp/org-agenda.el (org-agenda-set-restriction-lock): Highlight only
  the headline when agenda is restricted to a subtree.  Do not
  highlight the entire subtree.
2013-04-05 16:44:57 +02:00
Bastien Guerry 45d6d8f8a2 org.el: Let `C-o' insert a new row in tables and open a line elsewhere
* org.el (org-ctrl-o): New command to insert a new row in
tables (like `M-S-<down>' does) and open a line elsewhere.
(org-mode-map): Bind the new command to `C-o'.
2013-04-05 11:14:20 +02:00
Bastien Guerry d307657b9d org.el (org-set-regexps-and-options): Process tags from an external setup file
* org.el (org-set-regexps-and-options): Process tags from an
external setup file.

Thanks to Marcel van der Boom for reporting this bug.
2013-04-05 09:19:02 +02:00
Bastien Guerry c0589aa63a Merge branch 'master' of orgmode.org:org-mode 2013-04-05 08:38:07 +02:00
Bastien Guerry 618277cf93 org-agenda.el (org-agenda-limit-interactively): New command
* org-agenda.el (org-agenda-dim-blocked-tasks): Enhance
docstring.
(org-agenda-finalize-entries): Conditionally apply limits so
that we don't manipulate big lists uselessly.
(org-agenda-limit-entries): Limit exclusively.  E.g., when
limiting to a maximum of "2 tags", don't limit among tagged
entries only, but limit among all entries.
(org-agenda-limit-interactively): New command.
(org-agenda-mode-map): Bind the new command to "~".
(org-agenda-redo): Small fix: don't use `eval'.
2013-04-05 08:37:51 +02:00
Bastien Guerry 3ad43055bf org.el (org-ctrl-c-ctrl-c): Fix bug wrt updating checkboxes
* org.el (org-ctrl-c-ctrl-c): Fix bug wrt updating checkboxes:
the list beginning should be stored using a marker so that
updating [%0] to [%50] will not throw an error.
2013-04-05 08:37:51 +02:00
Ippei FURUHASHI 6693456dd7 org-table.el (org-calc-current-TBLFM): Add function
* org-table.el (org-calc-current-TBLFM): New function to
re-calculate the table by applying the #+TBLFM in the line
where the point is.

* org.el (org-ctrl-c-ctrl-c): Call `org-calc-current-TBLFM' when
point is in the #+TBLFM line.

* testing/lisp/test-org-table.el: Add test.
2013-04-05 08:37:51 +02:00
Ippei FURUHASHI c8c17460f1 org-table.el (org-TBLFM-begin): Add function
* org-table.el (org-TBLFM-begin): New defun.
(org-TBLFM-begin-regexp): New variable.

* testing/lisp/test-org-table.el: Add test.
2013-04-05 08:37:51 +02:00
Ippei FURUHASHI a268e33ef0 org.el (org-at-TBLFM-p): Add functon
* org.el (org-at-TBLFM-p): New defun.
(org-TBLFM-regexp): New defconst.

* testing/lisp/test-org-table.el: Add test.
2013-04-05 08:37:51 +02:00
Bastien Guerry 92af40344e Include org-w3m.el back into core.
w3m is the de facto way of browsing the web in GNU Emacs
so org-w3m.el should be kept in core.  The same argument
prevails for org-bbdb.el.
2013-04-05 08:37:51 +02:00
Bastien Guerry d5fd2008e3 org.el (org-babel-load-file): Move `org-babel-load-file' here
* org.el (org-babel-load-file): Move `org-babel-load-file'
from ob-tangle.el to here so that it is correctly autoloaded
by Emacs before Org is required.

Thanks to Eric Schulte for feedback about this.
2013-04-05 08:37:51 +02:00
Bastien Guerry b38036dd66 Move org-mac-message.el to contrib/.
* org-mac-message.el: Move to contrib/.

* org.el (org-modules): org-mac-message.el is now a
contributed package.
2013-04-05 08:37:51 +02:00
Nicolas Goaziou 735bb251b1 Remove TARGET handling from export back-ends
* contrib/lisp/ox-groff.el (org-groff-link): Remove TARGET handling.
* lisp/ox-ascii.el (org-ascii-link): Remove TARGET handling.
* lisp/ox-html.el (org-html-keyword): Remove TARGET handling.
* lisp/ox-latex.el (org-latex-keyword, org-latex-link): Remove TARGET
  handling.
* lisp/ox-man.el (org-man-keyword): Remove TARGET handling.
* lisp/ox-md.el (org-md-link): Remove TARGET handling.
* lisp/ox-odt.el (org-odt-keyword): Remove TARGET handling.
2013-04-04 20:38:36 +02:00
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 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
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
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