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

6972 commits

Author SHA1 Message Date
Dan Davison d234a9973b ob-R: Delete duplicated function
* lisp/ob-R.el: Delete duplicated function
2010-12-21 14:20:14 +00:00
Eric Schulte 00dd6c3cb2 documentation of the :sep header argument for code blocks 2010-12-21 14:19:25 +00:00
Eric Schulte 44392f1a41 documentation of the :file header argument for code blocks 2010-12-21 14:19:25 +00:00
Eric Schulte 4e146a5ac2 ob: a little more refactoring
* lisp/ob.el (org-babel-execute-src-block): Removed unused flet function.
2010-12-21 14:19:25 +00:00
Dan Davison e030d95ddb ob: language-specific changes in response to :file arg changes
These languages are capable of writing results to file; for several of
them this is their only mode of operation. These changes cause the
languages to return to ob.el either the computed result, or nil, when
they have written results to file themselves. This is in place of the
previous method of returning the output file name as a string to
ob.el.

* lisp/ob-asymptote.el (org-babel-execute:asymptote): Return nil to
signal that the intended content has been written to file.
* lisp/ob-ditaa.el (org-babel-execute:ditaa): Return nil to signal
that the intended content has been written to file.
* lisp/ob-dot.el (org-babel-execute:dot): Return nil to signal that
the intended content has been written to file.
* lisp/ob-gnuplot.el (org-babel-execute:gnuplot): Return nil to signal
that the intended content has been written to file.
* lisp/ob-latex.el (org-babel-execute:latex): Return nil to signal
that the intended content has been written to file.
* lisp/ob-mscgen.el (org-babel-execute:mscgen): Return nil to
signal that the intended content has been written to file.
* lisp/ob-octave.el (org-babel-execute:octave): Return result; not
name of output file.
* lisp/ob-plantuml.el (org-babel-execute:plantuml): Return nil to
signal that the intended content has been written to file.
* lisp/ob-python.el (org-babel-execute:python): Return result; not
name of output file.
* lisp/ob-ruby.el (org-babel-execute:ruby): Return result; not
name of output file.
* lisp/ob-sass.el (org-babel-execute:sass): Return nil if result has
been written to file
2010-12-21 14:19:24 +00:00
Dan Davison 6bcbdce949 ob-R: Respond to changes in handling of :file header argument
":results graphics" is now required in addition to ":file filename" in
order for graphical output to be sent automatically to file. If :file
is supplied, but not ":results graphics", then the default behavior
obtains: i.e., either "value" or "output" results are written to file,
depending on which of those options is in effect.

* lisp/ob-R.el (org-babel-R-graphical-output-file): New function
returns the name of the output file iff R has been instructed to send
graphical output to file by means of the ":results graphics"
directive.
(org-babel-expand-body:R): Use `org-babel-R-graphical-output-file'
when constructing the R code to evaluate, which may be augmented with
code implementing the writing of graohical output to file.
(org-babel-execute:R): Use `org-babel-R-graphical-output-file' to
determine whether R is taking responsibility for writing output to
file; if so, this is signalled to ob.el by returning a nil result.
2010-12-21 14:19:24 +00:00
Dan Davison 366abc6175 ob: Refactoring
* lisp/ob.el (org-babel-format-result): New function to format results
of src block execution.
(org-babel-execute-src-block): Use `org-babel-format-result' when
writing to file.
(org-babel-open-src-block-result): Use `org-babel-format-result' when
displaying results in a buffer; name results buffer differently.
2010-12-21 14:19:24 +00:00
Dan Davison 70349cd0c2 ob: Bug fix in writing results to file
* lisp/ob.el (org-babel-execute-src-block): Avoid calling
`orgtbl-to-generic' on number results
2010-12-21 14:19:24 +00:00
Eric Schulte e0b7927678 ob: :sep specifies table separator when opening or writing tabular results
* lisp/ob.el (org-babel-execute-src-block): Allow specification of
  table separator with :sep header argument.
  (org-babel-open-src-block-result): Allow specification of table
  separator with :sep header argument.
2010-12-21 14:19:24 +00:00
Dan Davison 74d752b4b5 ob: Wipe error buffer before executing buffer/subtree
* lisp/ob.el (org-babel-execute-buffer): Wipe error buffer at outset
of executing buffer (note that this handles execute subtree also).
2010-12-21 11:06:35 +00:00
Dan Davison fc70272de9 Merge branch 'master' of ssh://repo.or.cz/srv/git/org-mode 2010-12-21 11:06:24 +00:00
Nicolas Goaziou d30d00023a org-inlinetask: remove case-sensitivity at end line, improve code comments
* lisp/org-inlinetask.el (org-inlinetask-in-task-p): small
  refactoring, do not modify match data either.
(org-inlinetask-goto-end): small refactoring, remove case-sensitivity.
(org-inlinetask-goto-beginning): small refactoring, remove case-sensitivity.
2010-12-21 11:06:58 +01:00
Carsten Dominik 7f8b09e67c Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode 2010-12-21 08:26:41 +01:00
Carsten Dominik ce157879de Fix typo 2010-12-21 08:26:34 +01:00
Eric Schulte 7faadf42e9 collector: replace org-read-prop' with org-babel-read'
* contrib/lisp/org-collector.el (org-propview-collect): Removed
  org-read-prop and replaced with org-babel-read.
2010-12-20 12:11:46 -07:00
Dan Davison 607efd4e30 Starting on new R graphics scheme 2010-12-20 17:35:23 +00:00
Dan Davison a871c6a77c new :results behavior 2010-12-20 16:44:24 +00:00
Carsten Dominik 5f77fd6a81 Merge branch 't/patch491' 2010-12-20 15:50:23 +01:00
Carsten Dominik f9e174b74e Merge branch 't/patch490' 2010-12-20 15:50:04 +01:00
Carsten Dominik f11b134b46 Merge branch 't/patch489' 2010-12-20 15:49:44 +01:00
Carsten Dominik 2d47a109b2 Modify activation section in manual 2010-12-20 15:38:40 +01:00
Carsten Dominik ee035ae12b Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode 2010-12-20 15:14:12 +01:00
Carsten Dominik af33cb709a Fix bug with capture to datetree
* lisp/org-capture.el (org-capture-set-target-location): Use `current-time'.
2010-12-20 15:14:00 +01:00
Carsten Dominik d737c32130 Fix bug with capture to datetree
* lisp/org-capture.el (org-capture-set-target-location): Use `current-time'.
2010-12-20 14:22:14 +01:00
Bernt Hansen de62618009 Fix before first heading check
* lisp/org.el (org-before-first-heading-p): If point is on an org-mode heading line then we are not before the first heading

If point is anywhere on the first line of the first heading then we
are not before the first heading.  This makes
org-before-first-heading-p returns t instead of nil when on the '*' or
blank of the first level 1 heading in an org file.

This was noticed when the first heading has an encryption
tag :crypt:. C-c C-r would not decrypt this entry if point is at the
beginning of the line since it was considered before the first
heading.
2010-12-20 13:22:05 +01:00
Carsten Dominik 3ceee2fefe Timer: Run a hook when relative timer is continued
* lisp/org-timer.el (org-timer-continue-hook): Define the variable
(org-timer-pause-or-continue): Run hook after relative timer is
continued

There was a hook run when the relative timer is paused (and for most
other actions), but none for continuing afterwards.

One use for this would be to pause/continue playback in a media-player
app with the same keystroke used to pause/continue the timer.

TINYCHANGE

Patch by Christian Moe
2010-12-20 13:18:27 +01:00
Julien Danjou 2be22d9aa4 org-agenda: allow %() in prefix format
* org-agenda.el (org-compile-prefix-format): Allow %() expression.

Signed-off-by: Julien Danjou <julien@danjou.info>
2010-12-20 13:13:13 +01:00
Julien Danjou f73b121549 org-capture: use org-eval
* org-capture.el (org-capture-fill-template): Use org-eval.
2010-12-20 13:12:48 +01:00
Julien Danjou 2c1925f2a5 Add org-eval
* org-agenda.el (org-eval): New function.

Signed-off-by: Julien Danjou <julien@danjou.info>
2010-12-20 13:12:25 +01:00
Carsten Dominik a43055a26f Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode 2010-12-20 13:09:58 +01:00
Eric Schulte 61470f6ae1 org-mime: hooks run in org-mode buffer when composing an email
Thanks to Ethan Ligon for suggesting this functionality.

  An example hook such as the following will record when emails have
  been composed

    (add-hook 'org-mime-send-subtree-hook
            (lambda ()
              (org-entry-put (point) "mail_composed" (current-time-string))))

* contrib/lisp/org-mime.el (org-mime-send-subtree-hook): Hooks run
  in the org-mode subtree when composing an email.
  (org-mime-send-buffer-hook): Hooks run in the org-mode buffer when
  composing an email.
2010-12-19 18:46:15 -07:00
Eric Schulte 76661a853a org-mime: adding format specific pre-export hooks
Thanks to Niels Giesen for suggesting this change.

* contrib/lisp/org-mime.el (lambda): Adding format specific pre-export
  hooks.
  (org-mime-compose): Call pre-export hooks before export.
2010-12-19 16:36:54 -07:00
Dan Davison d6fefb406e babel: Interpret string results as file links with :results file
* lisp/ob.el (org-babel-execute-src-block): With :results file, when
:file is not supplied, interpret result as a file link as long as it
is a string.
2010-12-19 14:25:18 +00:00
David Maus 2a3663b314 Don't convert link description parts that look like numeric footnote
* lisp/org-latex.el (org-export-latex-preprocess): Don't convert link
description parts that look like numeric footnote.

Fixes a problem reported by Thomas S. Dye.
2010-12-19 14:54:16 +01:00
Eric Schulte 96c70f3d7e org-mime: now exports subtrees, and can read mail headers from subtree properties
Much of this code is reworking of a very nice function shared on the
  mailing list by Matt Lundin.

* contrib/lisp/org-mime.el (org-mime-htmlize): Fixed indentation.
  (org-mime-try): Short macro for safely checking for properties.
  (org-mime-send-subtree): Drops the current subtree into a mail
  buffer possible exported and mime-encoded.
  (org-mime-send-buffer): Drops the current buffer into a mail
  buffer possible exported and mime-encoded.
  (org-mime-compose): Exports and mime-encodes a string of org-mode
  text for sending via email.
  (org-mime-org-buffer-htmlize): Create an email buffer containing the
  current org-mode file exported to html and encoded in both html and
  in org formats as mime alternatives.
  (org-mime-subtree): Create an email buffer containing the current
  org-mode subtree exported to a org format or to the format specified
  by the MAIL_FMT property of the subtree.
2010-12-17 14:20:44 -07:00
Eric Schulte 5f1850af40 documentation of new attr_latex options for tables
* doc/org.texi (Tables in LaTeX export): Documentation of new
  attr_latex options for tables.
2010-12-17 14:00:51 -07:00
Eric Schulte d37705391e allow specification of table*, tabularx and tabulary table environments
e.g.

  #+CAPTION: A wide table with tabulary
  #+LABEL: tbl:wide
  #+ATTR_LaTeX: table* tabulary width=\textwidth align=l|lp{3cm}r|l
  | 1 | 2 | 3 |
  | 4 | 5 | 6 |

  #+CAPTION: A normal table with tabularx
  #+LABEL: tbl:wide
  #+ATTR_LaTeX: table tabularx width=\textwidth align=l|lp{3cm}r|l
  | 1 | 2 | 3 |
  | 4 | 5 | 6 |

  Thanks to Tom Dye for suggestions and LaTeX background knowledge.

* lisp/org-latex.el (org-export-latex-tables): Allowing specification
  of tabular[xy] inner environments through the ATTR_LaTeX line.
2010-12-17 13:36:09 -07:00
Julien Danjou ce837d0e8f org: rework `org-set-property'
* org-capture.el (org-capture-fill-template): Use `org-set-property'
directly.

* org.el (org-set-property): Split property and values reading.
(org-read-property-name, org-read-property-value)
(org-set-property-function): New functions.
(org-property-set-functions-alist): New variable.

The goal of this patch is to introduce a special variable
`org-property-set-functions-alist'. This variable allows to read
properties values in a more intelligent way from `org-set-property' or
from `org-capture'.

For that, it simplifies the `org-set-property' code and remove
duplication between `org-capture' and `org-set-property'.

Signed-off-by: Julien Danjou <julien@danjou.info>
2010-12-17 18:37:30 +01:00
Julien Danjou 3b9822f1a9 Fix org-agenda-prefix-format docstring
* org-agenda.el (org-agenda-prefix-format): Add missing `search' item
  in docstring.

Signed-off-by: Julien Danjou <julien@danjou.info>
2010-12-17 18:23:56 +01:00
Carsten Dominik 3324942408 Link to book edition of manual, and update news 2010-12-17 16:08:38 +01:00
Eric Schulte f68f1e6055 org-mime: set message subject from buffer title
* contrib/lisp/org-mime.el (org-mime-org-buffer-htmlize): Set message
  subject from buffer title.
2010-12-16 18:25:00 -07:00
Eric Schulte 943b6701c4 org-mime: insert contents *before* signature
Thanks to Rainer M. Krug for reporting

* contrib/lisp/org-mime.el (org-mime-org-buffer-htmlize): Insert
  contents *before* signature.
2010-12-16 18:18:24 -07:00
Eric Schulte 3c66db85f0 org-mime: Use new org-export-string function
* contrib/lisp/org-mime.el (org-mime-htmlize): Use new
  org-export-string function.
  (org-mime-org-buffer-htmlize): Use new org-export-string function.
2010-12-16 18:12:08 -07:00
Eric Schulte f8000a9bc1 org-export-string now accepts symbolic or string fmt argument
* lisp/org-exp.el (org-export-string): Use `format' to construct
  function call to allow symbolic or string arguments.
2010-12-16 18:09:51 -07:00
Carsten Dominik 8aacc708dd Capture: Better error message for invalid entry-type templates
* lisp/org-capture.el (org-capture-place-entry):
(org-capture-insert-template-here): Check tree for validity before
pasting it.
2010-12-16 16:51:04 +01:00
Julien Danjou dece850eca org-gnus: trim date
* org-gnus.el (org-gnus-store-link): Trim date.

Signed-off-by: Julien Danjou <julien@danjou.info>
2010-12-16 14:21:26 +01:00
Julien Danjou 073391f5a7 Allow to retrieve email link date
* org.el (org-email-link-description): Allow to retrieve email link date.

Signed-off-by: Julien Danjou <julien@danjou.info>
2010-12-16 14:17:54 +01:00
Lawrence Mitchell 32be74e098 Quote any special characters in org-make-target-link-regexp
* lisp/org.el (org-make-target-link-regexp): regexp-quote target
before replacing whitespace.

Previously a radio link <<<...>>> would match all three-letter words
in the buffer.  The manual indicates the radio links are meant to
match literally (modulo whitespace differences), so we should
regexp-quote all the targets to avoid over-eager matching.
2010-12-16 14:12:28 +01:00
John Wiegley c61cdced2f Undid one of the scatter-related changes 2010-12-15 23:31:19 -05:00
Eric Schulte f5f2851401 Noweb references can now be resolved from the library of babel.
* lisp/ob.el (org-babel-expand-noweb-references): Noweb references can
  now be resolved from the library of babel.
2010-12-15 10:16:58 -07:00