1
0
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-12-12 09:28:11 +00:00
Commit Graph

4526 Commits

Author SHA1 Message Date
Dan Davison
ba4d698fa1 babel: Provide notification of errors during code execution
This deals with external process :results value mode for R, ruby,
python, perl and clojure: if the shell process has a non-zero exit
code, a buffer containing stderr is displayed.
2010-03-05 11:32:18 +00:00
Dan Davison
4e9a2d4efd babel: Fix bug in shell-command-on-region
Prior to this commit,

OUTPUT-BUFFER nil
REPLACE 'replace
ERROR-BUFFER 'current-buffer

resulted in stdout going with stderr to the current buffer, contra the
docstring. With this change stdout is discarded in this case. The
docstring does stipulate that stdout always should go to *Shell
Command Output*; this change does not make that happen in this case.
2010-03-05 11:32:11 +00:00
Dan Davison
05986e95ea babel: Introduce org-babel copy of shell-command-on-region
At this commit, org-babel-shell-command-on-region is a direct copy of
shell-command-on-region. In addition to switching to use the org-babel
version, we change the argument passed so that they agree with the
docstring of s-c-o-r.

Despite the change in arguments, the same behaviour results because
s-c-o-r does not behave as documented in emacs23. Future commits will
be able to fix these bugs in the org-babel version, as necessary.
2010-03-05 11:32:04 +00:00
Dan Davison
7db7f0613a Manual: Add remote file link examples 2010-03-05 10:58:16 +00:00
Łukasz Stelmach
9d0740d0fa beamer: Add custom options to an outline frame.
With org-beamer-outline-frame-options you may specify frame
options like: allowframebreaks or fragile.
2010-03-04 21:55:18 +01:00
Łukasz Stelmach
5c980da496 beamer: Make a title of an outline frame customizable.
New custom variable org-outline-frame-title makes it possible
to give own title to an outline frame instead of the default
English "Outline".
2010-03-04 21:55:09 +01:00
Carsten Dominik
353366beb7 Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode 2010-03-04 21:11:17 +01:00
Carsten Dominik
3e7d69d335 Publishing: Run the after-export-hook 2010-03-04 21:11:08 +01:00
Carsten Dominik
48d4ebeb80 LaTeX export: Add \usepackage{latexsym} to the default packages 2010-03-04 07:36:23 +01:00
Dan Davison
ed7b8bfcca babel: clojure: read results remotely when necessary 2010-03-03 22:00:08 +00:00
Dan Davison
54c7b04734 babel: clojure: use shell-command-on-region 2010-03-03 21:59:32 +00:00
Dan Davison
a8c1a49b77 babel: Read perl results remotely when necessary. 2010-03-03 16:11:04 +00:00
Carsten Dominik
cff060f3ac HTML export: Do not allow protected lines into the TOC
Daniel Clemente writesL

> Hi, I found an HTML export bug with org-mode 6.34c-140-g44c8 and
> older. I used:
>
> --------------------------------------------------------
> * only one section
> #+BEGIN_EXAMPLE:
>
>  We need:
>  ,* pears
>  ,* lettuce
>  ,* watermelons
>
>  Very important!
> #+END_EXAMPLE:
> --------------------------------------------------------
>
>  And the outputed table of contents had this code:
>
> --------------------------------------------------------
> <div id="text-table-of-contents">
> <ul>
> <li><a href="#sec-1">1 only one section </a></li>
> <li><a href="#sec-2">2 pears</a></li>
> <li><a href="#sec-3">3 lettuce</a></li>
> <li><a href="#sec-4">4 watermelons</a></li>
> </ul>
> </div>
> --------------------------------------------------------
>
> This is wrong because the asterisks inside the example don't
> represent headers. There should be only one header.
2010-03-03 14:36:31 +01:00
Carsten Dominik
7a9a998c01 Fix spelling 2010-03-03 14:25:21 +01:00
Carsten Dominik
85df69a5c0 LaTeX export: Protect examples, even if they look like table.el tables
The recent patch to introduce table.el export in LaTeX forgot to check
protectedness.
2010-03-03 13:26:24 +01:00
Carsten Dominik
463d60c57b Improve documentation on calc accuracy in tables
Patch by Michael Brand
2010-03-03 13:19:43 +01:00
Carsten Dominik
38f1b209d4 Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode 2010-03-03 12:59:33 +01:00
Carsten Dominik
1c87de51fc LaTeX export: Fix export of &&
Lukasz Stelman writes:

I've create some presentation on programming (some more to do) and to my
surprise I've discovered that if org-mode escapes one "&" properly it
doesn't do its job in case of "&&" (and a single "^" too). I get "\&&"
in latex file which of course is wrong.
2010-03-03 12:59:26 +01:00
Dan Davison
9c36b20a25 babel: make output file links track changed directory 2010-03-02 14:51:01 +00:00
Dan Davison
486bc2fe64 babel: Use file-name-as-directory to form default-directory 2010-03-02 14:51:01 +00:00
Eric Schulte
f0f511916a babel: org-babel-oz.el now uses unix-style newline characters 2010-03-01 08:31:05 -07:00
Eric Schulte
0de593757c plot: handles option lines starting after column 0
Thanks to Thomas Holst for the patch
2010-03-01 08:22:18 -07:00
Carsten Dominik
32cd86f60d Document that `project-plist' is available throughout publishing
This is true in particular in the preparation and completion hooks.
2010-03-01 12:05:08 +01:00
Carsten Dominik
5e5c8c1348 Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode 2010-03-01 09:21:52 +01:00
Carsten Dominik
cd708f15f8 Docs: Correct the documentation for the publishing function.
Patch by David Maus
2010-03-01 08:53:32 +01:00
Carsten Dominik
8b7018269c Catch error when updating checkbox count with no headline in place 2010-03-01 08:36:26 +01:00
Eric Schulte
ff00e36aac plot: replacing sloppy fix with more reasonable way of guessing gnuplot options
This fixes an error introduced in the recent commit
  09886e4f82
2010-02-28 17:53:24 -07:00
Carsten Dominik
dd7655edc0 Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode 2010-02-28 23:21:29 +01:00
Dan Davison
44c8487e2d babel: fix bug with remote working directory
This change fixes a bug in the remote execution branch, involving the
way that org-babel-tramp-handle-call-process-region is used
to (conditionally) handle calls to call-process-region. When
org-babel-execute-src-block called itself recursively (e.g. when
resolving a reference to another src block), a circular binding of
symbols and values resulted.
2010-02-27 18:19:18 -05:00
Dan Davison
322fe431c5 babel: Write R input data remotely when necessary. 2010-02-27 18:19:09 -05:00
Eric Schulte
a705bf5925 babel: wrapped org-babel-make-remote-file-name' in conditional as org-babel-maybe-remote-file' 2010-02-27 18:18:37 -05:00
Dan Davison
24cdeea122 babel: read remote results from remote files
When using ':results value' in certain situations, results are written
to file by the foreign language process and subsequently read from
file by emacs into an elisp table structure. If the foreign language
process is running remotely, then the results are written
remotely. These changes ensure that in that case, an appropriate
remote file name is constructed to read the remote data.
2010-02-27 14:14:08 -05:00
Dan Davison
2056d7d419 babel: Allow shell-command-on-region to execute remotely
These changes solve two problems: both are discussed in the following thread

http://lists.gnu.org/archive/html/tramp-devel/2010-02/msg00025.html

of which a summary follows.

Firstly, shell-command-on-region does not work with tramp in the same
way that shell-command does. I.e. whereas

(let ((default-directory "/user@remote-host:"))
  (shell-command "hostname" t))

gives the remote hostname,

(let ((default-directory "/user@remote-host:"))
  (shell-command-on-region (point) (mark) "hostname" t))

does not.

The reason is that shell-command-on-region calls call-process-region,
which does not use a tramp handler for remote files. However, such a
file handler does exist (unused) in the tramp sources:
tramp-handle-call-process-region. There is a slight problem in that
there is a bug in that function definition in current tramp (which has
persisted because the function is not normally used).

Therefore, we define an org-babel version of
tramp-handle-call-process-region which fixes the bug, and we bind
call-process-region to org-babel-tramp-handle-call-process-region for
the duration of org-babel-execute-src-block.
2010-02-27 14:14:08 -05:00
Dan Davison
b3d5a1eb39 babel: working directories and remote execution
This introduces a new header argument :dir. For the duration of source
block execution, default-directory is set to the value of this header
argument. Consequences include:

- external interpreter processes run in that directory
- new session processes run in that directory (but existing ones are unaffected)
- relative paths for file output are relative to that directory

The name of a directory on a remote machine may be specified with
tramp syntax (/user@host:path), in which case the interpreter
executable will be sought in tramp-remote-path, and if found will
execute on the remote machine in the specified remote directory.
2010-02-27 14:14:08 -05:00
Dan Davison
5f8a57ad48 babel: change implementation of external R process evaluation
Use shell-command-on-region, bringing R into line with ruby, python,
clojure, shell. In addition to consistency (and perhaps efficiency),
this will also be preferable in the case of a remote R process because
it means that transfer of the input to the remote process is dealt
with automatically by tramp.
2010-02-27 14:14:08 -05:00
Eric Schulte
522f30bc9f babel: tiny doc tweak 2010-02-27 14:14:07 -05:00
Dan Davison
cc7052540b babel: allow point to move to end of comint buffer 2010-02-27 14:14:07 -05:00
Dan Davison
283ebcb43b babel: New const variable org-babel-header-arg-names
This is used when checking for babel header args in org properties.
2010-02-27 14:14:07 -05:00
Carsten Dominik
93c721fabf Clock: Allow to add the current clock when preparing a report
This is dependent on the new variable
`org-clock-report-include-clocking-task', default nil.

Patch by Bernt Hansen.
2010-02-27 13:21:31 +01:00
Carsten Dominik
6d1e30828b Re-install the support for table.el tables again.
This support was totally broken.  It works now again.  Unfortunately
it is not possible to edit the table directly in the org-mode buffer
anymore - to edit such a table, you have to use C-c '
2010-02-26 22:33:49 +01:00
Carsten Dominik
045676bcaa LaTeX export: Protect footnotes in headings 2010-02-26 21:02:25 +01:00
Carsten Dominik
721e547cd9 Fix bug when there is no hast for id locations
Report by Gerald, fix by David Maus.
2010-02-26 19:51:15 +01:00
Carsten Dominik
906bca96c6 Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode 2010-02-26 10:08:40 +01:00
Carsten Dominik
dd6043cb3a Reading dates: Fix a bug, and allow American-style dates
This patch implements reading American dates, like

2/5/3         --> 2003-02-05
2/5           --> ????-02-05

Is also fixes a bug that would force the current year when reading a
date like 2/5 (American) or 2-5 (ISO), and in this way would prevent
`org-read-date-prefer-future' to do its job.  This bug was reported by
Lukasz Stelmach.
2010-02-26 08:58:30 +01:00
Eric Schulte
826e34d55b org-beamer-fragile-re now notices lstlisting environments as well as verbatim 2010-02-25 21:18:55 -07:00
Dan Davison
82d7585810 babel: Tighten result and source line regexps
Anchored to beginning of line, with optional whitespace indenting.
2010-02-25 17:58:46 -05:00
Dan Davison
5833fbd358 babel: Make colnames header arg expect use "yes" for true. 2010-02-25 17:58:46 -05:00
Dan Davison
4064c31fa7 babel: get rid of unused variable 2010-02-25 17:58:46 -05:00
Dan Davison
fc693eb5e2 babel: treat python tuples as lists 2010-02-25 17:58:45 -05:00
Dan Davison
a95c05773e babel: Fix unquoting of strings
Before this change we have

 #+begin_src ruby :results value :session
 ["1", "3"]
 #+end_src

 #+results:
 : 1", "3

 After, we have

 #+begin_src ruby :results value :session
 ["1", "3"]
 #+end_src

 #+results:
 | 1 | 3 |
2010-02-25 17:58:45 -05:00