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

5966 commits

Author SHA1 Message Date
Carsten Dominik d593bae0ff Merge branch 'internal-link-exact-headline-match' 2010-08-06 15:04:59 +02:00
Carsten Dominik 2def714b4d Make sure dual license manual is uploaded as part of the release process 2010-08-06 14:50:56 +02:00
Carsten Dominik b7b6a72869 Do not call modification hooks when triggering indentation
* lisp/org-indent.el (org-indent-remove-properties):
(org-indent-add-properties): Make sure changing these properties does
not trigger modification hooks
2010-08-06 12:51:56 +02:00
Carsten Dominik 2b1d745c09 Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode
Conflicts:
	lisp/org.el
2010-08-06 12:49:02 +02:00
Carsten Dominik 2ed0545b99 Minor doc fix 2010-08-06 12:48:16 +02:00
Carsten Dominik a84c8a2cba Make internal links in Org files search for an exact headline match
* lisp/org.el (org-link-search-must-match-exact-headline): New option.
(org-link-search-inhibit-query): New variable.
(org-link-search): Search for exact headline match in Org files
* doc/org.texi (Internal links): Document the changes in internal links.

Internal links used to do a fuzzy text search for the link text.  This
patch changes the behavior for Org files.  Here a link [[My Target]]
now searches for an exact headline match, i.e. for a headline that
does look like "* My Target", optionally with TODO keyword, priority
cookie and tags.

The new option `org-link-search-must-match-exact-headline' is
`query-to-create' by default.  This means that a failed link search
will offer to create the headline as a top-level headline at the end
of the buffer.  This corresponds to a wiki-like behavior where missing
targets are automatically created.  If you do not like this behavior,
change the option to t.
2010-08-06 08:34:33 +02:00
Dan Davison 9330ad5b81 babel: single function to execute executable babel elements
* ob.el (org-babel-execute-src-block-maybe): remove check for
    `org-babel-no-eval-on-ctrl-c-ctrl-c'; this is done in the new
    function `org-babel-execute-safely-maybe'

    (org-babel-execute-maybe): new function to execute src blocks
    or lob/call lines.

    (org-babel-execute-safely-maybe): new function to execute src blocks
    or lob/call lines via C-c C-c

    (org-ctrl-c-ctrl-c-hook): remove
    `org-babel-execute-src-block-maybe' and add
    `org-babel-execute-safely-maybe'.

    * ob-lob.el (org-ctrl-c-ctrl-c-hook): remove
    `org-babel-lob-execute-maybe'

    * ob-keys.el (org-babel-key-bindings): New function
    `org-babel-execute-maybe' is bound to C-c C-v e and C-c C-v
    C-e
2010-08-05 13:45:13 -04:00
Dan Davison 2935464811 babel: make `org-babel-load-in-session' work for remote sessions
2010-08-05  Dan Davison  <davison@stats.ox.ac.uk>

	* ob.el (org-babel-load-in-session): set directory in case
	:dir arg is in effect
2010-08-05 00:43:26 -04:00
Bastien Guerry a4b86a8eac New :html-resolution parameter for `org-format-latex-options'.
This parameter default to 140 and controls the resolution of images
created from LaTeX fragments for HTML output.  There is no :resolution
parameter: the resolution of images produced for a buffer is computed
from the font height.)

This was suggested by Uriel (amscopub-mail@yahoo.com).
2010-08-05 00:31:32 +02:00
Eric Schulte 158f5cc726 ob-tangle: don't throw errors when we're not under of a headline
* lisp/ob-tangle.el (org-babel-tangle-collect-blocks): don't throw
  errors when we're not under of a headline
2010-08-04 09:20:58 -06:00
Dan Davison 23a11da5df Merge branch 'master' of git://repo.or.cz/org-mode 2010-08-04 00:13:58 -04:00
Dan Davison 9978dcf21f babel: octave/matlab: use dlmwrite to write delimited text
2010-08-03  Dan Davison  <davison@stats.ox.ac.uk>

	* ob-octave.el (org-babel-octave-wrapper-method): use dlmwrite
	to write delimited text instead of save -ascii
	(org-babel-octave-import-elisp-from-file): specify that data
	written to file is tab-delimited
2010-08-03 23:54:24 -04:00
Bastien Guerry 262fbf1e48 Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode 2010-08-04 05:54:20 +02:00
Dan Davison f318bdb19b Merge branch 'ded-babel' 2010-08-03 23:23:54 -04:00
Bastien Guerry 43bb2e1293 Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode 2010-08-04 04:43:01 +02:00
Bastien Guerry 3f0d935115 Fix typo. 2010-08-03 18:34:47 +02:00
Eric Schulte a4a44ecb4e ob-lisp: initial support for lisp code blocks
Thanks to David O'Toole for getting this going
2010-08-03 09:09:11 -06:00
Dan Davison 5122aee4a7 babel: R: Specify that tables are tab-delimited
2010-08-03  Dan Davison  <davison@stats.ox.ac.uk>

	* ob-R.el (org-babel-R-evaluate): Specify that tabular data is
	tab-delimited

Prior to this we had

 #+begin_src R
  c("some words", "with spaces")
 #+end_src

 #+results:
 | some | words  |
 | with | spaces |
2010-08-03 00:14:56 -04:00
Dan Davison 34144f9a95 babel: Allow specification of field separator when reading tables
2010-08-03  Dan Davison  <davison@stats.ox.ac.uk>

	* ob.el (org-babel-import-elisp-from-file):
	Allow separator to be specified
2010-08-03 00:14:48 -04:00
Dan Davison 1239099120 babel: python: Fix recognition of lists and tuples
2010-08-03  Dan Davison  <davison@stats.ox.ac.uk>

    * ob-python.el (org-babel-python-table-or-string): Fix
    recognition of lists and tuples

Prior to this we had

 #+begin_src python
   return [1, 2]
 #+end_src

 #+results:
 : [1, 2]
2010-08-03 00:14:35 -04:00
Dan Davison 876b115259 babel: octave: allow remote files
2010-08-02  Dan Davison  <davison@stats.ox.ac.uk>

	* ob-octave.el (org-babel-octave-evaluate-external-process):
	allow remote files
2010-08-02 22:08:47 -04:00
Carsten Dominik 2072def1b9 Fix lower-case bug in pw script 2010-08-02 08:19:52 +02:00
Juan Pechiar 743a7b8293 From: Juan <Pechiar@computer.org>
Hi,

I'm starting to work with ob-octave and found several problems:

The first, for which I have a fix (see patch below) is that octave's
output was passed on as a string instead of being interpreted as a table:

[diff removed]

Now this works:

8<------------------------------------------------------------
#+source: test_output
#+begin_src octave :results value vector
[[1 2 3];[4 5 6]]
#+end_src

#+results: test_output
| 1.00000000e+00 | 2.00000000e+00 | 3.00000000e+00 |
| 4.00000000e+00 | 5.00000000e+00 | 6.00000000e+00 |
8<------------------------------------------------------------

(before the patch you'd get a single table element with something like
"1 2 3\n 4 5 6\n" inside).

The second problem is that if I use octave table output as input to
another block, it gets interpreted as a string instead of a vector:

8<------------------------------------------------------------
#+results: test_output
| 1.25000000e+00 |

#+source: check_input
#+begin_src octave :var input=test_output() :results output
ischar( input )
size( input )
#+end_src

#+results: check_input
: input = 1.25000000e+00
: ans =  1
: ans =
:     1   14
8<------------------------------------------------------------

This has to do with the EXP notation. The 'e+00' suffix makes the
whole table into a string. The problem is with "%S" in the formatting
inside org-babel-octave-var-to-octave.

The following patch seems to fix it (and makes it possible to work with
complex numbers inside the tables)::

[diff removed]

A third problem is with org-babel-octave-var-to-octave.

For example:

: (org-babel-octave-var-to-octave '( ( 1 2 3 ) ( 4 5 6 ) ))
: ->  "[[1, 2, 3], [4, 5, 6]]"

This is not a 2x3 matrix, but a 1x6 vector:

: octave-3.2.3:1> [[1,2,3],[4,5,6]]
: ans =
:    1   2   3   4   5   6

a semicolon ';' or '\n' is needed between rows instead of a comma.

To sum up:
   - 2 patches for prepare-session and importing the results back as
   org-tables (I don't know if these patches break anything).

   - 1 problem with matrix notation in org-babel-octave-var-to-octave.
   I'll try to provide a patch for this today.

2010-08-01  Juan Pechiar  <Pechiar@computer.org>

	* ob-octave.el (org-babel-octave-evaluate-external-process):
	use `org-babel-octave-import-elisp-from-file' instead of
	`org-babel-eval-read-file'.
	(org-babel-octave-var-to-octave): separate matrix rows with
	';', and use '%s' as format specifier instead of '%S'
2010-08-01 18:09:24 -04:00
Dan Davison 7b80fff974 babel: matlab/octave: only (require 'matlab) when necessary
2010-08-01  Dan Davison  <davison@stats.ox.ac.uk>

	* ob-octave.el only (require 'matlab) when necessary
	(org-babel-octave-initiate-session) (require) octave-inf or
	matlab as appropriate
	(org-babel-execute:matlab): remove (require)
	(org-babel-prep-session:matlab): remove (require)
	(org-babel-matlab-initiate-session): remove (require)
2010-08-01 14:34:28 -04:00
Dan Davison a5f0bb404f babel: octave: Fix formal argument list
2010-08-01  Dan Davison  <davison@stats.ox.ac.uk>

	* ob-octave.el (org-babel-octave-evaluate): Fix formal
	argument list
2010-08-01 12:17:47 -04:00
Bastien Guerry 0cafae6a6a Allow for multiple classes in HTML_CONTAINER_CLASS.
Based on a patch submitted by David Maus:
http://patchwork.newartisans.com/patch/178/
2010-08-01 11:32:17 +02:00
Bastien Guerry 3642e441bc Fix org-format-latex: don't throw an error if dir exists.
From: Alexandre Passos <alexandre.tp@gmail.com>

> I was editing an org document on a server earlier today, remotely
> using tramp, and continuously exporting it to html. When I added
> LaTeX, it exported once and then not anymore, failing because it
> couldn't create a directory anymore. So I found out that patching
> org-export-latex to pass a "t" parameter to org-make-directory fixes
> this, and it continues to work perfectly. This is the modified version
> of that function, if anyone else is interested in this constrained
> case. The only change I made was right under the "make sure directory
> exists" comment.
2010-08-01 10:08:35 +02:00
Bastien Guerry 8221861f72 Revert Tassilo's patch for org-gnus.el as it is not finished yet. 2010-08-01 01:46:19 +02:00
Bastien Guerry 9a81df1394 Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode 2010-08-01 01:31:46 +02:00
Eric Schulte 9a2ea65bc3 ob-python: can now handle VERY long result lines
* lisp/ob-python.el (org-babel-python-table-or-string): can now handle
  VERY long result lines
2010-07-31 14:24:25 -06:00
Nicolas Goaziou caa5da1efd bug in org-mode-export-as-latex
Hello,

>>>>> Neil Hepburn writes:
> The latest version (7.01g) seems to have a bug when exporting to PDF
> (and LaTeX) with tables with labels.  The export does not label the
> table in the LaTeX file although it is labeled in the .org file.

Curiously, it looks like \label code was removed at some time.

This quick fix should put labels back.

Regards,

-- Nicolas
>From 64855c52b20766db9898ce82316fac11d51de72d Mon Sep 17 00:00:00 2001
From: Nicolas Goaziou <n.goaziou@gmail.com>
Date: Wed, 28 Jul 2010 20:54:40 +0200
Subject: [PATCH] Add labels to tables.

* org-latex.el (org-export-latex-tables): add label if any
* org-latex.el (org-export-latex-convert-table.el-table): fix little
  mistake when inserting label
2010-07-31 18:59:18 +02:00
Nicolas Goaziou d035222ce5 Keep same column when cycling visibility
Hello,

Like what is already done with drawers, point should not move when
cycling visibility of headings and list items.

The call to `org-back-to-heading' this patch removes seems redundant
anyways.

Regards,

-- Nicolas
>From 17cd55557d747366c90fad47b44edeac2daf920b Mon Sep 17 00:00:00 2001
From: Nicolas Goaziou <n.goaziou@gmail.com>
Date: Sun, 25 Jul 2010 23:14:08 +0200
Subject: [PATCH] Cursor stays at same column when cycling visibility.

* org.el (org-cycle-internal-local): Removed an unnecessary call to
  `org-back-to-heading' that was preventing point to stay at its
  column when cycling visibility.
2010-07-31 18:53:32 +02:00
Bastien Guerry d458125974 Merge branch 'restriction-lock-speed-keys' 2010-07-31 18:43:15 +02:00
Noorul Islam 0ac2a69836 org-capture: Make messages consistent.
A very small patch that makes the message displayed consistent.

* lisp/org-capture.el (org-capture-finalize):
  Make messages consistent.
2010-07-31 18:41:52 +02:00
Noorul Islam cb769af073 org-gnus.el: Suppress compiler warning.
The attached patch suppresses a compiler warning in org-gnus.el

* lisp/org-gnus.el:
  Suppress compiler warning by declaring outside function
nnimap-retrieve-headers-from-file.
2010-07-31 18:38:57 +02:00
Bastien Guerry 09ae8a0b1d Add restriction (un)lock to `org-speed-commands-default'.
You can now use "<" and ">" as speedy key commands for
org-agenda-set-restriction-lock and org-agenda-remove-restriction-lock.
2010-07-31 18:19:11 +02:00
Noorul Islam 4cd9e71019 Bug in org-colview/org-beamer?
On Sat, Jul 31, 2010 at 12:54 PM, Simon Guest <simon.guest@tesujimath.org>wrote:

> Hi,
>
> I'm making my first real Org mode Beamer presentation, using org-mode
> 7.01g, and trying to set the ignore_heading for a multi-column slide.
>
> In column mode, when I hit 'e' in the Env column, Emacs says:
> Wrong type argument: commandp, org-beamer-set-environment-tag
> (and org-beamer-set-environment-tag does not appear to be defined
> anywhere).
>
> It's triggered from this code in org-colview.el
>     ((equal key "BEAMER_env")
>      (setq eval '(org-with-point-at pom
>                    (call-interactively 'org-beamer-set-environment-tag))))
>
> Any idea what's wrong?
>
>
This function was renamed to org-beamer-select-environment and I think it
was not changed here.

The attached patch should solve the problem.

* lisp/org-colview.el
  Use org-beamer-select-environment instead
of org-beamer-set-environment-tag

Thanks and Regards
Noorul
2010-07-31 12:48:15 +02:00
Nick Dokos e555514feb Placement=[H] not exporting to LaTeX anymore?
Nick Dokos <nicholas.dokos@hp.com> wrote:

> John Hendy <jw.hendy@gmail.com> wrote:
>
> > Just to be sure I created an blank org file with only this:
> >
> > * test
> >
> > #+CAPTION: test table
> > #+ATTR_LaTeX: placement=[H]
> > | 1    | 2    | 3    | 4    |
> > |------+------+------+------|
> > | test | test | test | test |
> > | test | test | test | test |
> >
> > It gets exported to this:
> >
> > \begin{table}[htb]
> > \caption{test table}
> > \begin{center}
> > \begin{tabular}{llll}
> >
> > Did something change between 6.35 and 7.01 or in the LaTeX table options?
> >
>
> I think that placement works fine for figures, but not for tables. In
> fact, I cannot find the code that's supposed to do this for tables: I
> suspect that it never existed. So unless I'm mistaken, it seems that
> tables never got the placement treatment that figures did.
>

Try the following patch (might be wrong in detail, and its scope might
be too limited, but I hope it's not too far off: at least it seems to
work on your simple table.) It may also be white-space damaged, so some
reformatting may be needed after applying it.

Nick

>From 4c8cdde9f3d80edc882efe83562a934fd9a6a8c8 Mon Sep 17 00:00:00 2001
From: Nick Dokos <nicholas.dokos@hp.com>
Date: Fri, 23 Jul 2010 17:54:06 -0400
Subject: [PATCH] Process latex placement attribute for tables.

Figures got placement attributes previously, but tables never did.
2010-07-31 11:16:20 +02:00
Tassilo Horn c708851b5e Fixing slowness of following Gnus links to IMAP articles
David Maus <dmaus@ictsoc.de> writes:

Hi David,

>>I'm trying to add a workaround to org-gnus.el which should save the
>>slowness of querying the IMAP server by looking up the article number
>>in the group's .overview file.  But since I don't have nnimap groups,
>>we have to play some question & answer game. ;-)
>
>>Please apply this patch and set
>>`org-gnus-nnimap-query-article-no-from-file' to t.
>
> The patch does not work: It calls `nnimap-retrieve-headers-from-file'
> without the required arguments (group server)

Argh, stupid me!  Here's a corrected patch.

--8<---------------cut here---------------start------------->8---
--8<---------------cut here---------------end--------------->8---

> and the headers are not fetched because
> `nnimap-retrieve-headers-from-file' looks for a NOV cache file, not
> .overview.

Aren't overview file and NOV file synonyms?

Hm, anyway.  In the Gnus docs I've found this paragraph:

,----[ (info "(gnus)IMAP") ]
| `nnimap-nov-is-evil'
|      Never generate or use a local NOV database. Defaults to the value
|      of `gnus-agent'.
|
|      Using a NOV database usually makes header fetching much faster,
|      but it uses the `UID SEARCH UID' command, which is very slow on
|      some servers (notably some versions of Courier). Since the Gnus
|      Agent caches the information in the NOV database without using the
|      slow command, this variable defaults to true if the Agent is in
|      use, and false otherwise.
`----

So maybe we're trying to replace one slow command with another slow
command.  Especially, the fact that Courier is explicitly mentioned is a
bit frustrating.  Well, let's try it out and see if it helps a bit.

> Alas: I couldn't figure out how to enable NOV cache for my nnimap
> group.  Setting `nnimap-nov-is-evil' to nil didn't help.

This variable defaults to the value of `gnus-agent', so I assume the
agent has to be enabled (which is default), and most probably the IMAP
server has to be agentized as well.  That can be done in the server
buffer (`^' in *Group*), and then:

,----[ (info "(gnus)Server Agent Commands") ]
| `J a'
|      Add the current server to the list of servers covered by the Gnus
|      Agent (`gnus-agent-add-server').
`----

Bye,
Tassilo
2010-07-31 10:34:35 +02:00
Matt Lundin f08a5eaa06 org-insert-time-stamp: fix value of org-last-inserted-timestamp
* lisp/org.el (org-insert-time-stamp): Fix org-insert-time-stamp so
  that the value of org-last-inserted-timestamp includes time range.

Previously, org-last-inserted-timestamp included only the
beginning of a time range (e.g., 10:00 instead of 10:00-12:00).
This caused parsing problems elsewhere, such as when rescheduling
items with repeating timestamps and a time range (the repeater
was removed during rescheduling).
2010-07-31 10:31:30 +02:00
David Maus d3c82cc757 Provide link property for message-id without angle brackets
* org-wl.el (org-wl-store-link-message): Provide link property
for message-id without angle brackets.

The message-id header field can be used to maintain the connection
between an Org entry and an internet message.  The angle brackets have
a special meaning when performing a TAGS/PROPS/TODO query (Cf. Org
mode manual 10.3.3).  To be able to use the message-id as an entry
property we have to remove the angle brackets to be able to perform a
search for the entry associated with a particular message.
2010-07-31 09:47:33 +02:00
Eric Schulte 9c1c4b3f8d org-mime: fixed major error -- was exporting entire as text/plain mime part
Thanks to Ethan Ligon for pointing this out

* contrib/lisp/org-mime.el (org-mime-org-buffer-htmlize): fixed major
  error -- was exporting entire as text/plain mime part, now when
  region is active, only that region is exported
2010-07-30 15:08:27 -06:00
Eric Schulte c32ece6e76 ob-keys: org-babel-load-in-session now using "l", org-babel-lob-ingest switched to "i"
* doc/orgcard.tex: "l" used for org-babel-load-in-session and
  org-babel-lob-ingest switched to "i"
2010-07-30 11:02:42 -06:00
John Wiegley 3ee6b99f06 Added a missing call to (goto-char (point-min)) 2010-07-28 21:05:50 -04:00
John Wiegley dfa41442af Resolve a compiler warning 2010-07-28 20:50:19 -04:00
Eric Schulte 69f15e0b73 Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode 2010-07-28 09:24:15 -06:00
Eric Schulte dc92eaa08d ob-R: improved prompt-stripping regexp thanks to Charles C. Berry
* lisp/ob-R.el (org-babel-R-evaluate): improved prompt-stripping
  regexp
2010-07-28 08:05:30 -06:00
Eric Schulte f6ccee2568 ob-tangle: org-babel-post-tangle-hook no longer kills the current buffer
* lisp/ob-tangle.el (org-babel-find-file-noselect-refresh): finds a
  file ensuing that the latest changes on disk are represented

  (org-babel-with-temp-filebuffer): now only kills the buffer of the
  tangled file, and doesn't kill said buffer if the file is already
  being visited
2010-07-28 07:41:16 -06:00
Eric Schulte 4d318e4499 ob-sqlite: now inserts string arguments w/o quotes
* lisp/ob-sqlite.el (org-babel-sqlite-expand-vars): now inserts string
  arguments w/o quotes
2010-07-28 07:31:39 -06:00
Bernt Hansen 95212c2202 Fix clocking on capture completion
* lisp/org-capture.el (org-capture-finalize): Fix clock in of interrupted
task during capture finalize

Calling org-capture-get inside the org-with-point-at macro does not
work when the current clocking task and the capture target buffer are
the same.  In this case the captured task would continue clocking
instead of switching back to the previously clocking task.
2010-07-28 02:35:38 -04:00