0
0
Fork 1
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-09-22 22:10:42 +00:00
Commit graph

3496 commits

Author SHA1 Message Date
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
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 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
John Wiegley d91ce1490d Merge branch 't/patch157' 2010-07-28 02:26:57 -04:00
Jambunathan K 86ca53fe6f Agenda view invokes custom sort routine even if not configured to do so 2010-07-28 02:25:09 -04:00
Eric Schulte 24bb01afc8 ob-R: clean up extra prompts in session output
Thanks to Charles C. Berry for pointing this issue out

* lisp/ob-R.el (org-babel-R-evaluate): clean up extra prompts in
  session output
2010-07-27 12:20:00 -06:00
Eric Schulte bb8086ffbb ob-C: more generous regular expression for matching main call
* lisp/ob-C.el (org-babel-C-ensure-main-wrap): more generous regular
  expression for matching main function
2010-07-25 12:32:48 -06:00
Eric Schulte ea0563e642 ob-ledger: Babel support for the ledger accounting system
Thanks to Eric S Fraga for contributing this support.

  For information on Ledger see
  http://wiki.github.com/jwiegley/ledger/
2010-07-23 09:23:44 -07:00
Eric Schulte ec034ba0d5 ob-lob: fixed error in lob regexp -- it wasn't matching lob lines w/o indices
* lisp/ob-lob.el (org-babel-lob-one-liner-regexp): fixed error in lob
  regexp -- it wasn't matching lob lines w/o indices
2010-07-22 16:20:08 -07:00
Eric Schulte 8bda0e276f fix compiler warning in org-exp.el
* lisp/org-exp.el (org-export-latex-listings-w-names): fix compiler
  warning in org-exp.el
2010-07-22 11:36:34 -07:00
Carsten Dominik dd484300d3 Publish: Better error messages if important information is missing
* lisp/org-publish.el (org-publish-file): Better error message if
base-directory or publishing-directory are not defined.
2010-07-22 11:45:04 +02:00
Carsten Dominik 1e48ae4259 Column view: Fix indentation problem when org-indent-mode is active
* lisp/org-colview.el (org-columns-display-here): Use overlays to
overrule line prefix properties during column view.
2010-07-22 10:43:48 +02:00
Carsten Dominik 73304c5f46 Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode 2010-07-22 09:37:35 +02:00
Carsten Dominik 22567f5ea0 Agenda: Document the limitation of the filter preset
* lisp/org-agenda.el (org-agenda-filter-preset): Document the limitation
for the filter preset - it can only be used for an entire agenda view,
not in an individual block in a block agenda.
* doc/org.texi (Agenda commands):  Document the limitation
for the filter preset - it can only be used for an entire agenda view,
not in an individual block in a block agenda.
2010-07-22 09:11:12 +02:00
Eric Schulte 6f825152d9 ob-table: babel scripts called from tables can accept ranges
* lisp/ob-table.el (sbe): now able to accept range references from tables
2010-07-21 16:11:49 -07:00
Eric Schulte 917ad74b58 babel: accept explicit lists of colnames and/or rownames
* lisp/ob.el (org-babel-pick-name): if colnames or rownames contain a
  list of names, then use those directly

example of using this new feature would be

  #+begin_src emacs-lisp :var n=10 :colnames '("n" "fn")
    (defun fib (n)
      (if (< n 2) 1 (+ (fib (- n 1)) (fib (- n 2)))))

    (mapcar (lambda (n) (list n (fib n))) (number-sequence 0 n))
  #+end_src

  #+results:
  |  n | fn |
  |----+----|
  |  0 |  1 |
  |  1 |  1 |
  |  2 |  2 |
  |  3 |  3 |
  |  4 |  5 |
  |  5 |  8 |
  |  6 | 13 |
  |  7 | 21 |
  |  8 | 34 |
  |  9 | 55 |
  | 10 | 89 |
2010-07-21 11:19:50 -07:00
Eric Schulte 717c73cc7a improve latex listings code block name export
* lisp/org-exp.el (org-export-format-source-code-or-example): escape
  underscores in code block names on latex listings export

* lisp/org-latex.el (org-export-latex-listings-w-names): make export
  of code block names to latex optional
2010-07-21 10:39:53 -07:00
Eric Schulte c31c1d627b Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode 2010-07-21 09:47:08 -07:00
Eric Schulte e3429de115 ob-tangle: inhibit unwanted buffer movement on use of post-tangle-hook
* lisp/ob-tangle.el (org-babel-with-temp-filebuffer): use
  find-file-noselect to avoid excess buffer movement
2010-07-21 09:46:55 -07:00
Carsten Dominik fe684b62c6 Autoload org-id-store-link
* lisp/org-id.el (org-id-store-link): Autoload.
* lisp/org.el ("org-id"): Autoload `org-id-store-link'.
2010-07-21 18:37:34 +02:00
Carsten Dominik 682b275615 HTML export: Fix inlining images
* lisp/org-html.el (org-html-should-inline-p): Only inline images
if they should be.
2010-07-21 16:04:33 +02:00
Eric S Fraga 2c31a3b00a iCalendar export: Implement alarms
* lisp/org-icalendar.el (org-icalendar-alarm-time): New option.
* lisp/org-icalendar.el (org-print-icalendar-entries): timed events
are exported with alarm events, a.k.a. reminders
* doc/org.texi (iCalendar export): Document alarm creation.
2010-07-21 09:47:57 +02:00
Carsten Dominik e3b93cda2e Capture: Default template when no capture templates are defined
* lisp/org-capture.el (org-capture-target-buffer): Throw an error
if we have no target file.
(org-capture-select-template): Use a default template if the user has
not specified any.
2010-07-21 08:28:20 +02:00
Carsten Dominik fff87c2c9f Install Paul Rodriguez' org-velocity.el
* contrib/lisp/org-velocity.el: New file.
* contrib/README: List org-velocity.el
* lisp/org.el (org-modules): Add entry for org-velocity
2010-07-21 07:50:29 +02:00
Carsten Dominik 294527373e Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode 2010-07-21 04:11:21 +02:00
Eric Schulte 73d8016e8b babel: matching indexes in lob one-liners
* lisp/ob-lob.el (org-babel-lob-execute): changing indentation to
  improve line length

  (org-babel-lob-get-info): now catching indexes passed through lob
  calls

  (org-babel-lob-one-liner-regexp): now matches optional indexes into
  variable results
2010-07-20 11:40:57 -07:00
Carsten Dominik 6aa469b116 Fix bug with exporting table metalines to LaTeX/PDF
* lisp/org-exp.el (org-export-handle-table-metalines): Choose a better
position for checking protectedness.
2010-07-20 17:44:54 +02:00
Eric Schulte 08a7f6a6df fix infinite loop in csv table import
* lisp/org-table.el (org-table-convert-region): don't continue csv
importation which the point catches the end, this fixes an infinite
loop which was caused by the (point) never catching up with the
"end" marker

Hi,

I've just noticed that I get an infinite loop when importing csv tables
into Org-mode tables.  For example calling

  (org-table-convert-region (point-min) (point-max) '(4))

from inside of a simple text file containing the following

--8<---------------cut here---------------start------------->8---
1,2,3
1
2
3
5
--8<---------------cut here---------------end--------------->8---

results in an infinite loop.  The attached patch fixes this issue [1],
however it seems weird that this would just surface now, given that the
code in question has been in the repo since last fall

,----
| commit 59c9c4cdd4
| Author: Carsten Dominik <carsten.dominik@gmail.com>
| Date:   Mon Oct 26 12:31:16 2009 +0100
|
|     Correctly interpret CVS tables with quoted fields
|
|     The csv parser was very primitive, ignoring quoted fields.  This is
|     now fixed.
`----

Has anyone else noticed this problem? Should I go ahead and apply this
patch?

Best -- Eric

Footnotes:
[1]

>From 3c3f4ca9a34dca23051ca2f4e4518b416338d4f4 Mon Sep 17 00:00:00 2001
From: Eric Schulte <schulte.eric@gmail.com>
Date: Mon, 19 Jul 2010 13:45:25 -0700
Subject: [PATCH] org-table: fix infinite loop in table importation

* lisp/org-table.el (org-table-convert-region): don't continue csv
  importation which the point catches the end, this fixes an infinite
  loop which was caused by the (point) never catching up with the
  "end" marker
2010-07-20 09:28:22 +02:00
Carsten Dominik cee04fa632 Make org-capture use `org-default-notes-file' if the file is not specified
* lisp/org-macs.el (org-string-nw-p): New function.
* lisp/org-capture.el (org-capture-import-remember-templates): Interpret
an empty string as request to use `org-default-notes-file'.
(org-capture-target-buffer): If the FILE is not a (non-empty) string,
use `org-default-notes-file'.
2010-07-20 09:05:31 +02:00
Carsten Dominik 347c8ebe34 Fix customize type for capture template function
* lisp/org-capture.el (org-capture-templates): Fix customize type
2010-07-19 14:42:06 +02:00
Carsten Dominik 899e89518b Estimate ranges in column view
* lisp/org-colview-xemacs.el (org-columns-compile-map):
(org-columns-number-to-string):
(org-columns-string-to-number): Handle estimate ranges.
(org-estimate-mean-and-var):  New function.
(org-estimate-combine):  New function.
(org-estimate-print):  New function.
(org-string-to-estimate): New function.
2010-07-19 13:56:17 +02:00
Michael Gauland 55ea8ca071 Estimate ranges in column view
Carsten,
Here is a patch for a new 'est+' summary type, including corresponding changes for xemacs and the manual. I've done basic testing on the GNU emacs version, but not the xemacs code.

I'm not sure the change to the manual provides the right amount of information
in the right place; I'd be happy to re-write to make it find in
better. Similarly, the name of the summary type is entirely up to you.

I didn't know whether to send this directly to you, or to the list; if it should go to the list I'd be happy to send it there directly.

Thanks for the chance to contribute,
Mike
2010-07-19 13:35:49 +02:00
Carsten Dominik d1347d01a6 Remove the various ChangeLog files
We are no longer using them - when a ChangeLog is need, we generate it
from the git history.
2010-07-19 12:59:30 +02:00
Carsten Dominik 6268cceec3 Mention release 7.01 on the website, push release number to 7.01trans 2010-07-19 08:33:24 +02:00
Philip Rooke 0166d6b0d6 Fix docstrings in org.el
This is the 9th patch in this series.
2010-07-19 07:17:51 +02:00
Carsten Dominik b1d33f2bf1 Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode 2010-07-18 22:28:10 +02:00
Philip Rooke ed84fb77e4 Docstring fixes
This is the eighth patch in a series that makes some straightforward
corrections to a number of docstrings.  Each change is normally to:

- correct a typo, or
- fix up hyperlinks to function or variable names, or
- ensure slightly better conformance with the documentation guidelines
  and tips given in the Elisp manual
2010-07-18 22:26:36 +02:00
Phil Rooke c0947c8d67 Docstring fixes part 6 2010-07-18 17:04:15 +02:00
David Maus 995c4532f7 Fix problem when org-capturing text from French email
* lisp/org-gnus.el (org-gnus-store-link):  Remove text properties
of subject string to avoid Emacs bug
2010-07-18 11:46:55 +02:00
David Maus eecb03c9c6 Use correct variable when calculating `org-timer-start-time'
* org-timer.el (org-timer-start): Use correct variable when
calculating `org-timer-start-time'.
2010-07-18 07:54:48 +02:00
Carsten Dominik cdf08f347a LaTeX/pdf processing: Quote file argument for the shell
* lisp/org-latex.el (org-export-as-pdf): Quote file argument for the shell.

Patch by Gregory Grubbs.
2010-07-18 07:50:43 +02:00
Gregory J. Grubbs 7d2dc48b2a Quote path argument in ob-ditaa
* lisp/ob-ditaa.el (org-babel-execute:ditaa): Quote path to ditaa executable.
2010-07-18 07:43:18 +02:00
Carsten Dominik aaea4a8dbf Capture: Change order of escape processing
* lisp/org-capture.el (org-capture-fill-template): Do inserting file
contents and expanding sexp escapes first, so that further escape
processing can happen in the inserted text.

This was a request by Sebastian Rose.
2010-07-18 07:37:52 +02:00
Carsten Dominik c3cfb22fcc Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode 2010-07-18 07:33:53 +02:00
Philip Rooke 6e6790f685 Correct some doc strings [part 5]
This is the fifth patch in a series that makes some straightforward
corrections to a number of docstrings.  Each change is normally to:

- correct a typo, or
- fix up hyperlinks to function or variable names, or
- ensure slightly better conformance with the documentation guidelines
  and tips given in the Elisp manual

No attempt is made to provide missing docstrings or document arguments.

Cheers,

Phil
2010-07-18 07:23:51 +02:00
David Maus 4c101529a4 Don't throw an error when trying to decrypt before first headline
* lisp/org-crypt.el (org-decrypt-entry): Silently do nothing when
cursor is before first headline.
2010-07-18 07:21:47 +02:00
Eric Schulte a503e031fb ob-tangle: fixed bug, org-babel-post-tangle-hook was using an undefined macro
* lisp/ob-tangle.el (org-babel-with-temp-filebuffer): a macro for
  quickly visiting files with cleanup

  (org-babel-tangle): now using the locally defined
  with-temp-filebuffer macro
2010-07-16 15:56:17 -07:00
Eric Schulte a3dfb1c626 ob-exp: check for info before exporting code blocks -- fixes a latex export issue
Thanks for Nicolas Goaziou for pointing this out

* lisp/ob-exp.el (org-babel-exp-src-blocks): don't attempt to export
  blocks when there is no info match -- this fixes a bug in the latex
  export of code blocks located before the first headline
2010-07-16 15:34:57 -07:00
Eric Schulte bc8d3a7704 ob-ocaml: more robust handling of complex input/output values
* lisp/ob-ocaml.el (org-babel-expand-body:ocaml): now able to
  initialize complex ocaml values without error

  (org-babel-execute:ocaml): more sophisticated parsing of results,
  only grabbing the line immediately preceding the eoe indicator

  (org-babel-ocaml-elisp-to-ocaml): a new function for converting
  complex elisp values like lists to ocaml syntax

  (org-babel-ocaml-read-array): quoting arrays so that they aren't
  interpreted as function calls
2010-07-16 15:23:15 -07:00
Philip Rooke ebf808f9aa Correct some docstrings [part 4]
Same rationale as previous patches in this series.

Phil
2010-07-16 21:00:36 +02:00
Philip Rooke ef07f2afc2 Correct some docstrings [part 3]
This is the third patch in a series that makes some straightforward
corrections to a number of docstrings.  Each change is normally to:

- correct a typo, or
- fix up hyperlinks to function or variable names, or
- ensure slightly better conformance with the documentation guidelines
  and tips given in the Elisp manual

No attempt is made to provide missing docstrings or document arguments.

Cheers,

Phil
2010-07-16 20:55:38 +02:00
Eric Schulte 851611291c org-reload doesn't load language files not in org-babel-load-langs
* lisp/org.el (org-reload): ensure that org-reload doesn't load
  language files that are not part of org-babel-load-langs
2010-07-16 10:53:36 -07:00
Carsten Dominik 9c4f5725b4 Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode 2010-07-16 14:15:47 +02:00
John Wiegley 332113111c Changed two uses of setq to let, to fix compiler warnings 2010-07-16 02:50:24 -04:00
Julien Barnier 728092e083 Add the ability to remove time ranges specifications 2010-07-16 02:46:02 -04:00
Eric Schulte 46fec6b08b ob-C: removing excess newlines around expanded C code bodies
* lisp/ob-C.el (org-babel-C-expand): removing excess newlines around
  expanded C code bodies
2010-07-15 16:43:06 -07:00
Philip Rooke 07cacd881d Correct some docstrings [part 2]
This is a second patch in a series that makes some straightforward
corrections to a number of docstrings.  Each change is normally to:

- correct a typo, or
- fix up hyperlinks to function or variable names, or
- ensure slightly better conformance with the documentation guidelines
  and tips given in the Elisp manual

No attempt is made to provide missing docstrings or document arguments.

Cheers,

Phil
2010-07-15 20:27:12 +02:00
Philip Rooke 254740cb9c Correct some docstrings
This patch makes some straightforward corrections to a number of
docstrings.  Each change is normally to:

- correct a typo, or
- fix up hyperlinks to function or variable names, or
- ensure slightly better conformance with the documentation guidelines
  and tips given in the Elisp manual

No attempt is made to provide missing docstrings or document arguments.

Cheers,

Phil
2010-07-15 19:04:38 +02:00
Eric Schulte 2cd33b94d9 ob-c: no longer ignores the :results vector header argument
* lisp/ob-C.el (org-babel-C-execute): no longer ignores the :results vector
  header argument
2010-07-14 23:17:03 -07:00
Matt Lundin c45d0680af Fix inclusion of agenda-archives in search view
* org-agenda.el (org-search-view): Fixed inclusion of agenda-archives
in org-agenda-text-search-extra-files.

org-search-view lacked a local binding for
org-agenda-text-search-extra-files. Thus when pop was called on the
variable, the agenda-archives symbol was removed and subsequent
searches failed to include the archives.
2010-07-15 07:23:28 +02:00
David Maus 37ed35566b Locally bind variable `txt'
* org-list.el (org-list-send-list): Locally bind variable
`txt'.
2010-07-15 07:22:10 +02:00
Carsten Dominik 2ec171cc77 Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode 2010-07-15 07:20:52 +02:00
Carsten Dominik aa16391451 Minor change 2010-07-15 07:20:26 +02:00
Eric Schulte 2f178148f9 ob-ref: fixed error caused by missing count function, now using org-count
* lisp/ob-ref.el (org-babel-ref-resolve-reference): removed an error
  introduced while fixing compiler warnings -- required mirroring of
  the count cl-seqs function under the org-mode namespace.

* lisp/org.el (org-count): adding an org-mode version of the cl-seqs
  count function
2010-07-14 17:59:43 -07:00
Eric Schulte fb72ef7809 ob-dot: can handle arguments
* lisp/ob-dot.el (org-babel-expand-body:dot): now inserts variable
  arguments rather than ignoring them

  (org-babel-execute:dot): making use of org-babel-expand-body:dot
2010-07-14 16:39:19 -07:00
Eric Schulte aad9ce99ab org-reload: now also reloading babel files
* lisp/org.el (org-reload): now also reloading babel files
2010-07-14 13:18:02 -07:00
Carsten Dominik c0eb6cfa88 Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode 2010-07-14 22:00:16 +02:00
Carsten Dominik 0791edd54a Capture, fix template files again
Note to self: Next time, just trust David ... :-)
2010-07-14 21:59:53 +02:00
Eric Schulte 57bfa1989d ob-sh: can now handle variable strings which contain newlines
* lisp/ob-sh.el (org-babel-sh-var-to-sh): shell can now handle input
  strings which contain newlines
2010-07-14 11:42:06 -07:00
Eric Schulte f904376df4 ob-python: can now handle variable strings with newlines
* lisp/ob-python.el (org-babel-python-var-to-python): python can now
  handle input strings with newlines
2010-07-14 11:34:30 -07:00
Eric Schulte 32b7a76d41 babel: cleaned up code and improved documentation of indexing into variables
* lisp/ob-ref.el (org-babel-ref-index-list): slight code cleanup, also
  now allowing an empty index to mean the entire range

* doc/org.texi (var): updated the documentation of Babel index
  referencing to include working examples covering the full range of
  index behavior
2010-07-14 11:01:57 -07:00
Carsten Dominik bca27d9215 Capture: Fix the case of using a template file
* lisp/org-capture.el (org-capture-set-plist): Make sure txt is a string
before calling `string-match'.
(org-capture-templates): Fix customization type.

Modified from a patch proposal by Johan Friis.

TINYCHANGE
2010-07-14 11:03:27 +02:00
Carsten Dominik a39e5ef229 Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode 2010-07-14 10:54:51 +02:00
Carsten Dominik 065468451e LaTeX export: Make sure \nbsp{} does not create additional space
* lisp/org-latex.el (org-export-latex-preprocess): Make a special case for \nbsp.
(org-latex-entities): Remove the entry for \nbsp.
(org-latex-entities-exceptions): Variable removed.
2010-07-14 10:54:39 +02:00
Eric Schulte 39f71206c5 ob-eval: no longer throws errors on non-numeric exit codes
* lisp/ob-eval.el (org-babel-eval-error-notify): no longer throws
  errors on non-numeric exit codes
2010-07-13 21:16:39 -07:00
Tom Dye 272aefce83 Finished editing Babel docstrings 2010-07-13 16:20:08 -07:00
Tom Dye 3807787aa9 More docstring edits 2010-07-13 16:04:47 -07:00
Tom Dye c6403e0274 Fixed typo in ob-css.el 2010-07-13 15:58:11 -07:00
Tom Dye c0a5150b2c Minor change to ob-css.el 2010-07-13 15:58:00 -07:00
Tom Dye 333526b8aa Wondering if error messages ought to be standardized? 2010-07-13 15:56:17 -07:00
Carsten Dominik cb1ab577a2 Fix bookmarking the capture position
* lisp/org-capture.el (org-capture-refile): Do not try to manipulate
bookmark list.
* lisp/org.el (org-refile): Use the correct bookmark here.
2010-07-13 14:12:45 +02:00
Carsten Dominik b564a944a7 Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode 2010-07-13 13:36:37 +02:00
Carsten Dominik acf44c879a Fix radio lists
* lisp/org-list.el (org-list-send-list): Parse list from its true beginning.
* lisp/org.el (org-ctrl-c-ctrl-c): Maybe send the list when at a list item.
* doc/org.texi (Radio lists): Fix bug in description of radio lists.
2010-07-13 13:36:14 +02:00
Carsten Dominik acb8bcfba7 Fix relative path creation when making a file link
* lisp/org.el (org-insert-link): Correctly determine if we should use
a relative path.

Aidan Gauland writes:

> If I create a link with C-c C-l and give it a relative "file:" link, a
> link is created with an absolute path.  For example, C-c C-l
> file:../foo.org <RET> foo puts
> [[file:~/path/to/working-directory/foo.org][foo]] in the buffer.  I was
> expecting [[file:../foo.org][foo]].
2010-07-13 13:35:50 +02:00
Eric Schulte c53fc7d246 babel: consolidate execution messaging into ob.el
* lisp/ob.el (org-babel-execute-src-block): consolidate execution
  messaging into ob.el rather than spread out amongst all the language
  files
2010-07-12 22:26:25 -07:00
Eric Schulte e3aaaec91c babel: more informative automatically generated block names in tangled comments
* lisp/ob-tangle.el (org-babel-tangle-collect-blocks): more
  informative automatically generated block names in comments
2010-07-12 17:07:23 -07:00
Eric Schulte 5570bef368 babel: adding comments to org-babel-header-arg-names
* lisp/ob.el (org-babel-header-arg-names): adding comments to
  org-babel-header-arg-names
2010-07-12 16:32:24 -07:00
Eric Schulte 9271692869 babel: don't prematurely remove existing results when not caching
* lisp/ob.el (org-babel-where-is-src-block-result): be sure not to
  remove existing results when the there is no cache header arg
2010-07-12 14:38:35 -07:00
Eric Schulte e8033b7f04 org-exp: raise an error when trying to export code blocks w/o languages
* lisp/ob.el (org-babel-get-src-block-info): ensure that we don't
  match (and return info for) source blocks without a language

* lisp/org-exp.el (org-export-replace-src-segments-and-examples):
  updated source code block regexp so that the presence of a language
  can be explicitly checked.  Also now raising an error when a source
  block does not have a language.
2010-07-12 12:33:15 -07:00
Eric Schulte 1e50216854 babel: now always updating hash when inserting results
* lisp/ob.el (org-babel-where-is-src-block-result): now will replace
  the results line when if contains an old hash which is out of date
2010-07-12 12:28:49 -07:00
Nicolas Goaziou 3d69093339 Fix radio list templates
* lisp/org-list.el (org-list-radio-list-templates): Fix templates.
2010-07-12 19:04:48 +02:00
Nicolas Goaziou 94689a04b0 Fix regexp for `org-list-send-list'.
* lisp/org-list.el (org-list-send-list): regexp defining the start of
a radio list is now on par with the one used for radio tables.
2010-07-12 11:48:44 +02:00
Carsten Dominik eeab263cb8 Add headline for user-defined entities to `M-x org-entities-help'
* lisp/org-entities.el (org-entities-help): Add a headline for
the user-defined entities.
2010-07-12 11:37:39 +02:00
Dirk-Jan C. Binnema 18161d0310 Add capture to agenda actions
* lisp/org-agenda.el (org-agenda-action): Document capture key and add it
to the prompt.

TINYCHANGE

A trivial patch to add some documentation for 'capture' to org-agenda (against
HEAD).
2010-07-12 07:56:26 +02:00
Eric Schulte 433b374c10 babel: enhanced code block movement functions
Thanks to Austin Frank for suggesting these features and to Jonathan
  Arkell for an implementation suggestion

This commit
 - adds `org-babel-goto-named-result' for jumping to named results
 - adds TAB-completion to `org-babel-goto-named-src-block'
 - standardizes on "-src-" instead of "-source-" in all babel functions
 - adds `org-babel-[next/previous]-src-block' functions and keybindings
 - documents the above in orgcard.tex

* doc/orgcard.tex: update documentation of babel keybindings

* lisp/ob-exp.el (org-exp-res/src-name-cleanup): standardized on
  "-src-" instead of "-source-"

* lisp/ob-keys.el (org-babel-key-bindings): updating keybindings for
  new movement functions

* lisp/ob-lob.el (org-babel-lob-ingest): standardized on "-src-"
  instead of "-source-"

* lisp/ob-ref.el (org-babel-ref-resolve-reference): standardized on
  "-src-" instead of "-source-"

* lisp/ob-tangle.el (org-babel-tangle-collect-blocks): standardized on
  "-src-" instead of "-source-"

* lisp/ob.el (org-babel-src-name-regexp): standardized on "-src-"
  instead of "-source-"

  (org-babel-src-name-w-name-regexp): adding regexp for matching
  source names along with their names

  (org-babel-get-src-block-info): using new named source block regexp

  (org-babel-result-regexp): adding optional whitespace after result
  regexp

  (org-babel-result-w-name-regexp): adding regexp for matching results
  which have names

  (org-babel-named-src-block-regexp-for-name): standardized on "-src-"
  instead of "-source-"

  (org-babel-map-src-blocks): standardized on "-src-" instead of
  "-source-"

  (org-babel-where-is-src-block-head): standardized on "-src-" instead of
  "-source-"

  (org-babel-goto-named-src-block): standardized on "-src-" instead of
  "-source-", also added completing read

  (org-babel-src-block-names): collects source block names from a file
  or the current buffer

  (org-babel-goto-named-result): function for jumping to a named
  result

  (org-babel-result-names): returns results names from a file or the
  current buffer

  (org-babel-next-src-block): jump to the next source block

  (org-babel-previous-src-block): jump to the previous source block
2010-07-11 21:37:24 -07:00
Carsten Dominik f0c25d8431 Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode 2010-07-11 18:53:00 +02:00
Carsten Dominik 96e5f293f8 Fix typo 2010-07-11 18:52:47 +02:00
Eric Schulte ef839e1080 added (sqlite "SQL") to org-export-latex-listings-langs
* lisp/org-latex.el (org-export-latex-listings-langs): added (sqlite "SQL")
2010-07-09 17:40:58 -07:00
Eric Schulte 0479242349 Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode 2010-07-09 17:00:22 -07:00
Eric Schulte c4912669a6 ob-sqlite: now supports preview, tabular data and multi-line code bodies
* lisp/ob-sqlite.el (org-babel-expand-body:sqlite): now this function
  expands variables

  (org-babel-execute:sqlite): support for input of tabular data and
  multiline code bodies

  (org-babel-sqlite-expand-vars): support for tabular data
2010-07-09 17:00:03 -07:00
Carsten Dominik c76eda31ee Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode 2010-07-09 20:34:03 +02:00
Carsten Dominik d4781b9d88 Keep BABEL meta lines in tact
* lisp/org-latex.el (org-export-latex-first-lines): Do not mark
meta lines for removal. Do not remove BABEL config lines during export
2010-07-09 20:33:14 +02:00
Eric Schulte 535ea52fff ob-python: allow user choice between python.el and python-mode.el for
* lisp/ob-python.el (org-babel-python-mode): adding configuration
  option to allow users to control whether they use python.el or
  python-mode.el

  (org-babel-python-initiate-session-by-key): updated for use with new
  configuration option
2010-07-09 10:58:12 -07:00
Eric Schulte 0f5a2fb075 ob-tangle: fixed recently introduced issue with org-babel-load-file
* lisp/ob-tangle.el (org-babel-tangle): applying optional target-file
  argument through integration into the default header arguments
  (allowing overwriting through standard header-argument merging), and
  allowing a default setting of (:tangle . "no") to be overwritten
  when a target-file is specified.
2010-07-09 09:43:30 -07:00
Eric Schulte b44ecb51a4 ob-tangle: fixed `declare-function' call to point to correct file or origin
* lisp/ob-tangle.el (with-temp-filebuffer): fixed `declare-function'
  call to point to correct file or origin
2010-07-09 08:46:56 -07:00
David Maus 4c1b83e899 Check if `org-capture-link-is-already-stored' is bound before evaluating.
* org-capture.el (org-capture): Check if
`org-capture-link-is-already-stored' is bound before evaluating.

If `org-protocol-capture' is the first function that calls
`org-capture', this variable is locally bound while it is globally
unbound. I.e. org-capture.el was not loaded before, the defvar not
evaluated.  If `org-protocol-capture' exits, Emacs restores the global
value, which is void.
2010-07-09 10:06:50 +02:00
Eric Schulte 54c5039b8d removing vestigial babel directory load-path manipulation 2010-07-08 21:43:39 -07:00
Eric Schulte b4825f812b babel: marking the safe value of org-export-babel-evaluate
* lisp/ob-exp.el (org-export-babel-evaluate): marking the safe value
  of org-export-babel-evaluate
2010-07-08 15:11:38 -07:00
Eric Schulte 07b34e7a6b babel: declaring function to inhibit compiler warning
* lisp/ob-tangle.el (with-temp-filebuffer): declaring function to
  inhibit compiler warning
2010-07-08 13:40:08 -07:00
Eric Schulte 8944a309a4 adding defgroup for org-babel
* lisp/ob.el (org-babel): adding defgroup for org-babel
2010-07-08 13:38:59 -07:00
Eric Schulte abcb76891b org-babel-post-tangle-hook run in code files tangled by `org-babel-tangle'
* lisp/ob-tangle.el (org-babel-post-tangle-hook): adding hook which
  can be used to call functions from inside of code files tangled by
  org-babel-tangle

  (org-babel-tangle): added call to org-babel-post-tangle-hook
2010-07-08 11:58:20 -07:00
Eric Schulte d585521b55 Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode 2010-07-08 10:29:54 -07:00
Eric Schulte 815b724486 ob-exp: org-export-babel-evaluate can inhibit code block eval on export
* lisp/ob-exp.el (org-export-babel-evaluate): customization variable
  which can be used to inhibit the evaluation of code blocks on export

  (org-babel-exp-results): code block evaluation is now contingent on
  the value of org-export-babel-evaluate
2010-07-08 10:28:47 -07:00
Carsten Dominik e644a76dfb Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode 2010-07-08 11:43:06 +02:00
Eric Schulte ec22856978 ob-exp: now returns an empty string when the language can't be evaluated
* lisp/ob-exp.el (org-babel-exp-results): now returns an empty string
  when the language can't be evaluated
2010-07-07 23:01:43 -07:00
Eric Schulte 4b2721d428 added autoload for org-babel-do-load-languages
* lisp/org.el: added autoload for org-babel-do-load-languages
2010-07-07 22:41:14 -07:00
Philip Rooke 7add6fd51d The docstring of org-capture-templates
A few minor corrections and suggestions for the org-capture-templates
docstring
2010-07-08 06:41:53 +02:00
Eric Schulte 10600c55ee Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode 2010-07-07 15:46:35 -07:00
Eric Schulte fabf73b060 babel: Added (:tangle . "no") to the default header arguments
* lisp/ob.el (org-babel-default-header-args): Added (:tangle . "no")
  to the default header arguments.  This is already the intended
  behavior, but it's better to be more explicit about such things.
2010-07-07 15:46:24 -07:00
Carsten Dominik b9aee58af3 Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode 2010-07-07 23:43:53 +02:00
Carsten Dominik df248db7d9 Check if defvaralias is defined 2010-07-07 23:43:39 +02:00
Eric Schulte 869082e5fd added sqlite -> sql-mode mapping to org-src-lang-modes
* lisp/org-src.el (org-src-lang-modes): added sqlite to sql-mode
2010-07-07 12:40:43 -07:00
David Maus 60bbc07a11 Change indentation to match coding style guideline.
* org-feed.el: Change indentation to match coding style
guideline.

Cosmetic changes.
2010-07-07 08:47:46 +02:00
David Maus 66eadedab3 Load XML library if necessary.
* org-feed.el (org-feed-unescape, org-feed-parse-atom-feed): Load XML
library if necessary.

Function that use xml.el must require 'xml to make sure it is loaded
at runtime.
2010-07-07 08:46:44 +02:00
Eric Schulte 33b19178fc ob-sh: bug fix, return the results *not* the contents of the user's buffer
Thanks to Bernt Hansen for pointing this out

* lisp/ob-sh.el (org-babel-sh-evaluate): return the results *not* the
  contents of the user's buffer
2010-07-06 19:53:34 -07:00
Eric Schulte c32d773919 babel: code cleaning -- error' and with-current-buffer' usage for Emacs inclusion 2010-07-06 10:30:58 -07:00
Eric Schulte f34f0b9b39 ob-latex: fix compiler warnings 2010-07-06 09:47:25 -07:00
Eric Schulte 804d08b119 babel: don't ask twice for confirmation with :eval query
Thanks to Carsten for the Patch

* lisp/ob.el (org-babel-confirm-evaluate): don't ask twice for
  confirmation with :eval query
2010-07-06 09:39:07 -07:00
Carsten Dominik 2cc4c0d564 BEAMER: Standardize the header cookie for the beamer extra stuff
* lisp/org-beamer.el (org-beamer-amend-header): Standardize the
header cookie for the beamer extra stuff.
2010-07-06 15:04:00 +02:00
Carsten Dominik b7157cc666 Beamer: Put extra header last in header
* lisp/org-beamer.el (org-beamer-amend-header): Put extra header
last in header.

Tassilo Horn writes:

> I'm doing a LaTeX beamer presentation with org.  The org doc starts with
> these lines:
>
> --8<---------------cut here---------------start------------->8---
> #+STARTUP: beamer
> #+LaTeX_CLASS: beamer
> #+TITLE: Implementieren, Integrieren, Installieren
> #+AUTHOR: Tassilo Horn
> #+EMAIL: horn@uni-koblenz.de
> #+LANGUAGE: de
> #+BEAMER_FRAME_LEVEL: 2
> #+LaTeX_CLASS_OPTIONS: [presentation]
> #+BEAMER_HEADER_EXTRA: \usetheme[secheader]{Boadilla} \institute{Universitt Koblenz, IST}
> --8<---------------cut here---------------end--------------->8---
>
> In the presentation, the  in Universitt is printed as an A with a ~ on
> top, followed by a d'.  The reason is that the BEAMER_HEADER_EXTRA is
> put before the input encoding declaration.  To be clear, org produces a
> TeX file that starts with
>
> --8<---------------cut here---------------start------------->8---
> % Created 2010-07-06 Tue 08:57
> \documentclass[presentation]{beamer}
> \usetheme[secheader]{Boadilla} \institute{Universitt Koblenz, IST}
> \usepackage[utf8]{inputenc}
> \usepackage[T1]{fontenc}
> --8<---------------cut here---------------end--------------->8---
>
> but it should be at least:
>
> --8<---------------cut here---------------start------------->8---
> % Created 2010-07-06 Tue 08:57
> \documentclass[presentation]{beamer}
> \usepackage[utf8]{inputenc}
> \usetheme[secheader]{Boadilla} \institute{Universitt Koblenz, IST}
> \usepackage[T1]{fontenc}
> --8<---------------cut here---------------end--------------->8---
>
> In general, I'd say that it would be even more safe to put the extra
> headers below all default headers.
2010-07-06 14:55:47 +02:00
Daniel Clemente b324bdca5c default base-extension .org for org-publish
Org-publish: correctly find files in projects which didn't define a base-extension.
Previously, (org-publish-get-project-from-filename "~/org/file.org") would return nil because the constructed regular expression "^/home/dc/org/.+\\.\\(\\)$" required a dot at the end.

#+BEGIN_QUOTE

#+END_QUOTE
2010-07-06 12:56:47 +02:00
Carsten Dominik b6305c713c Make sure going to last capture also works after refile 2010-07-06 12:49:41 +02:00
Carsten Dominik 2235ecb422 Fix bug in getting template from file or function 2010-07-06 12:49:35 +02:00
David Maus d044ad3f1c Remove text properties of body before calculating cache hash.
* org-exp-blocks.el (org-export-blocks-format-ditaa)
(org-export-blocks-format-dot): Remove text properties of body before
calculating cache hash.

Otherwise one and the same ditta/graphviz image has a different hash
depending on the text properties of the body.
E.g. `org-export-region-as-html' with target buffer 'string passed the
body of the block without possible indentation property `wrap-prefix'
while `org-export-as-html' does.
2010-07-06 10:42:33 +02:00
Carsten Dominik e1262e57d2 LaTeX export: Allow to customize the tabular environment
* lisp/org-latex.el (org-export-latex-tabular-environment): New option.
(org-export-latex-tables): Use `org-export-latex-tabular-environment'.
2010-07-06 10:39:35 +02:00
Carsten Dominik 85c90e96fd Allow org-indent-mode only on Emacsen that do support it
* lisp/org-compat.el (org-version-check): New function.
* lisp/org-indent.el (org-indent-mode): Check for exact emacs version.
2010-07-06 10:23:41 +02:00
Carsten Dominik c80d5b9c27 Capture: Expand template file name 2010-07-06 09:44:31 +02:00
Carsten Dominik 75192f263e Allow capture template to come from a file or from a function call
* lisp/org-capture.el (org-capture-templates): Allow the template
to come from a file or function call.
(org-capture-place-entry): Get the template from file or function.
2010-07-06 09:41:01 +02:00
David Maus dfd0c7ad2e Fix typo in docstring.
* babel/ob-exp.el (org-babel-exp-inline-src-blocks): Fix typo
in docstring.
2010-07-06 09:14:01 +02:00
Carsten Dominik 0e30108330 Fix typo 2010-07-06 09:12:50 +02:00
David Maus 4273e50ab7 Don't create marker if target is entire file.
* org-agenda.el (org-agenda-bulk-action): Don't create marker for
position if target is entire file.

If the target of a bulk refile operation is the entire file,
`org-refile-get-location' returns nil for the refile position.
Creating a marker for the target file's buffer at position nil returns
a marker that points nowhere (Cf. GNU Emacs Lisp Reference Manual,
31.6).  `org-refile' adds headings to level 1 if the target position
for the target file is nil -- and hence a marker that points nowhere
is not nil, tries to jump to nowhere.
2010-07-06 08:55:02 +02:00
Carsten Dominik 6d889cc363 Escape parenthesis at bol in docstring 2010-07-06 08:51:23 +02:00
Carsten Dominik f3d72b13f4 Implement comment standards in org-ctags.el 2010-07-06 08:25:48 +02:00
Carsten Dominik 44d56dfa2d Autoload more org-table-functions
* lisp/org.el (org-autoload): Autoload a few more org-table functions.
2010-07-06 07:39:57 +02:00
Eric Schulte c87b6a90b0 ob-latex: shouldn't require org-latex as that results in a recursive require
Thanks to Juan Pechiar for pointing this out

* lisp/ob-latex.el (org-latex): don't require org-latex as that
  results in a recursive require loop
2010-07-05 20:17:40 -07:00
Eric Schulte ae44ae853d babel: adding ob-mscgen to org-babel-load-languages
* lisp/org.el (org-babel-load-languages): adding ob-mscgen
2010-07-05 19:08:50 -07:00
Eric Schulte 2538e687da babel: updating ob-dot.el and ob-mscgen.el to use ob-eval 2010-07-05 19:03:45 -07:00
Eric Schulte 07b8908903 ob-mscgen: support for mscgen code blocks by Juan Pechiar
from the comments of the new file

This software provides EMACS org-babel export support for message
sequence charts. The mscgen utility is used for processing the
sequence definition, and must therefore be installed in the system.

Mscgen is available and documented at
http://www.mcternan.me.uk/mscgen/index.html

This code is directly inspired by Eric Schulte's ob-dot.el

Example:

msc {
 A,B;
 A -> B [ label = "send message" ];
 A <- B [ label = "get answer" ];
}

Header for alternative file type:

This differs from most standard languages in that

1) there is no such thing as a "session" in mscgen
2) we are generally only going to return results of type "file"
3) we are adding the "file" and "filetype" header arguments
4) there are no variables
2010-07-05 18:48:47 -07:00
Eric Schulte e4cfd468a0 babel: :eval header argument takes arguments "never" and "query" to limit evaluation
* lisp/ob.el (org-babel-confirm-evaluate): adding a new :eval header
  argument which can be used to control evaluation

* doc/org.texi (eval): adding documentation for the new :eval header
  argument
2010-07-05 15:51:36 -07:00
Carsten Dominik 0dec8ac617 Revert "Fix agenda display for late scheduled and deadline tasks"
This reverts commit 516640aff9.
2010-07-05 23:18:34 +02:00
Eric Schulte 4406aa5a34 org-latex: fixed last remaining elisp compilation warning
* lisp/org-latex.el (org-export-latex-tables): format string now
  matches options
2010-07-05 13:29:33 -07:00
Eric Schulte 5ded079a1a Merge branch 'safety-babel' 2010-07-05 11:31:03 -07:00
Eric Schulte 0deb72c068 babel: removed `org-babel-tangle-w-comments', now just use the :comments header arg
* lisp/ob-tangle.el (org-babel-spec-to-string): removed
  `org-babel-tangle-w-comments', now just use the :comments header arg
  to control the insertion of comments on tangling
2010-07-05 11:14:51 -07:00
Eric Schulte 0a109680ee fixed list nesting error in ob-R.el 2010-07-05 11:14:51 -07:00
Eric Schulte baa6e1d3d7 babel: absolutely no babel related compiler warnings
had to nest an argument in a trivial `or' to trick the compiler in
  the large ob-comint macro.
2010-07-05 11:14:51 -07:00
Eric Schulte 3416a0e323 babel: clean compile 2010-07-05 11:14:51 -07:00
Eric Schulte 9be0990ae1 babel: clojure is now using ob-eval 2010-07-05 11:14:51 -07:00
Eric Schulte 1e43fa0413 babel: updated ob-octave.el to work with the new ob-eval.el functions
Note, the session based evaluation has *not* be updated, mainly
  because I don't have a working octave install with which to test the
  changes.
2010-07-05 11:14:50 -07:00
Eric Schulte 1956026332 babel: ob-perl is now using the new ob-eval functionality 2010-07-05 11:14:50 -07:00
Eric Schulte d1ba364572 babel: cleaned up R code 2010-07-05 11:14:50 -07:00
Eric Schulte 7b3077dcd4 babel: cleaned up ruby (now using ob-eval) 2010-07-05 11:14:50 -07:00
Eric Schulte 0a6a5b4fae babel: fixed small input error related to empty tables 2010-07-05 11:14:50 -07:00
Eric Schulte fd9bf71265 babel: fixed sessions in python, extracted external eval into ob-eval 2010-07-05 11:14:50 -07:00
Eric Schulte 15b36e2380 ext: prefix on external file names 2010-07-05 11:14:50 -07:00
Eric Schulte 9de1e9c6cc babel: greatly enhanced support for sqlite 2010-07-05 11:14:50 -07:00
Eric Schulte 6c2e35003f babel: all languages compiling cleanly (but R has a small problem)
For some reason ob-R refuses to compile when it requires ob-comint.

  When (require 'ob-comint) is not included in  ob-R.el everything
  compiles without error, but warnings are thrown because the
  arguments to a macro defined in ob-comint are mis-interpreted as
  functions.

  When (require 'ob-comint) is added to ob-R.el then it throws errors
  complaining that the last argument to a function is nil and should
  be a string.  I don't understand this error at all and can't fix it.
2010-07-05 11:14:50 -07:00
Eric Schulte d7b7025eac flattening out lisp directory structure
all babel and babel/langs files now live in the base of the lisp directory.
2010-07-05 11:14:49 -07:00
Eric Schulte 6e469f4afb babel: `org-babel-load-languages' activates code blocks by language
* lisp/org.el (org-babel-load-languages): this variable controls which
  languages will be loaded by org-babel.  It is customizable through
  the customize interface.

  (org-babel-do-load-languages): load those languages in
  org-babel-load-languages and disable those with nil cdr's
2010-07-05 11:14:49 -07:00
Eric Schulte 0ea1432d31 babel: evaluation of code blocks now requires confirmation
* lisp/babel/ob.el (org-confirm-babel-evaluate): variable used to
  control evaluation of code blocks, default value it t, meaning all
  code block evaluation requires confirmation

  (org-babel-confirm-evaluate): function used to request confirmation
  of code block evaluation from the user

  (org-babel-execute-src-block): this function is the single point of
  entry for evaluation of code blocks (whether initiated through lob
  call, through direct code block evaluation, or as part of file
  exportation).  Every time this function is called it will now
  request confirmation from the user.  The newly added
  `org-confirm-babel-evaluate' variable can be used to configure this
  behavior.

  (org-babel-no-eval-on-ctrl-c-ctrl-c): This variable can be used to
  inhibit evaluation of code blocks with C-c C-c.

* lisp/org.el (org-ctrl-c-ctrl-c): added documentation of code block
  evaluation behavior

* lisp/babel/ob-keys.el (org-babel-key-bindings): adding keybindings
  for executing code blocks and for opening their results
2010-07-05 11:14:49 -07:00
Carsten Dominik 1217e02e56 Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode 2010-07-05 19:01:13 +02:00
Eric Schulte 6d4cf4db84 org-latex: org-export-latex-format-image now accepts optional shortname
* lisp/org-latex.el (org-export-latex-format-image): updated number of
  arguments to allow for an optional short-name
2010-07-05 09:56:20 -07:00
Carsten Dominik 040b2aa6b2 Indent-mode: Disable in Emacs 21 and earlier
* lisp/org-indent.el (org-indent-mode): Refuse to turn on prior to Emacs 23.2
2010-07-05 17:46:19 +02:00
Stephen Eglen 27a4e48b0a Small doc fixes to org-feed.el and org-capture.el 2010-07-05 15:07:53 +02:00
Carsten Dominik 9e9bc16476 Capture: fix the function target 2010-07-05 08:53:48 +02:00
Carsten Dominik 8b7c742750 Capture: Put final touched to file+regexp & file+function targets
* lisp/org-capture.el (org-capture-set-target-location): Store
exact positions for file+regexp and file+function targets.
(org-capture-place-entry, org-capture-place-item)
(org-capture-place-table-line, org-capture-place-plain-text): Respect
exact positions.
(org-capture-finalize): Make sure we are at the beginning of a line
when fixing the empty lines after the entry.
2010-07-05 08:25:51 +02:00
Carsten Dominik 3f259819d6 Merge branch 'change-gnus-frame-default' 2010-07-02 16:27:27 +02:00
Carsten Dominik 57a5ef69b8 Repair the working of a LOGGING property value `nil'
* lisp/org.el (org-entry-get-with-inheritance): New argument LITERAL-NIL.
(org-entry-get): Pass `literal-nil' into
`org-entry-get-with-inheritance'.
(org-todo): React to nil values of the LOGGING property.
2010-07-02 15:49:40 +02:00
Carsten Dominik 8da31057eb Update docstring or `org-default-notes-file'
* lisp/org.el (org-default-notes-file): Update docstring
2010-07-02 10:54:12 +02:00
Carsten Dominik 708266eedd New default for the gnus frame setup
* lisp/org.el (org-link-frame-setup): Use `org-gnus-no-new-news' as default.
2010-07-02 10:32:51 +02:00
Eric Schulte 5edefbba26 a better way with babel
Of course, an updated patch is attached.

Best -- Eric
Carsten Dominik <carsten.dominik@gmail.com> writes:

> Hi Eric,
>
> I tried to apply the patch, but it does not apply cleanly, maybe due
> to other changes.  Can I ask you to update and resubmit?
>
> Thanks!
>
> - Carsten
>
> On Jun 21, 2010, at 6:37 PM, Eric Schulte wrote:
>
>> Hi Robert,
>>
>> Thanks for the thoughtful message.
>>
>> I present a couple of solutions below.
>>
>> Robert Cunningham <robut@iinet.net.au> writes:
>>
>>> G'day All,
>>>
>>> I wonder if I've missed something and there is a better way.
>>>
>>> Essentially I'm trying to use org babel with R and LaTeX to create
>>> figures
>>> with both long and short captions (for contents)
>>>
>>> I'd started with:
>>>
>>> #+CAPTION: Nice data (filled points indicate less nice data)
>>> #+LABEL:   fig:nicedata
>>> #+ATTR_LaTeX: width=0.98\textwidth
>>> #+begin_src R :file ndata.pdf :width 1000 :height 617 :exports
>>> results
>>>  dotchart(data$ndata)
>>> #+end_src
>>>
>>> which pointed to the need for long/short captions...
>>>
>>> feeling hopeful I tried:
>>>
>>> #+CAPTION: Nice data [Nice data (filled points indicate less nice
>>> data)]
>>> #+LABEL:   fig:nicedata
>>> #+ATTR_LaTeX: width=0.98\textwidth
>>> #+begin_src R :file ndata.pdf :width 1000 :height 617 :exports
>>> results
>>>  dotchart(data$ndata)
>>> #+end_src
>>>
>>
>> I'm attaching a patch [1] which adds shortname support for captions.
>> Once
>> applied, the following syntax will result in a caption with a
>> shortname
>> and a longname.
>>
>> --8<---------------cut here---------------start------------->8---
>> some pre-table text
>>
>> #+source: g-nicedata
>> #+begin_src gnuplot :file graph.png :exports results
>>  plot sin(x)
>> #+end_src
>>
>> #+Caption: [nice data]{a longer description of the niceness of the
>> data}
>> #+results: g-nicedata
>> [[file:graph.png]]
>>
>> some post-table text
>> --8<---------------cut here---------------end--------------->8---
>>
>> however, while this patch is still pending there is an Org-babel
>> solution below which should work immediately.
>>
>>>
>>>
>>> but no luck there.
>>>
>>> Next effort was to try to use R and LaTex more directly with
>>> noweb. I tried
>>> this:
>>>
>>>
>>>
>>> #+srcname: r-nicedata
>>> #+begin_src R :session :file ndata.pdf :results output :exports
>>> results
>>>  dotchart(data$ndata)
>>> #+end_src
>>>
>>>
>>> #+begin_src latex :noweb yes
>>>  \begin{figure}[htb!]
>>>    \centering
>>>    \includegraphics[width=0.98\textwidth]{<<r-nicedata()>>}
>>>    \caption[Nice data]{Nice data (filled points indicate less nice
>>> data)}
>>>    \label{fig:nicedata}
>>>  \end{figure}
>>> #+end_src
>>>
>>>
>>>
>>> This does produce the figure and long/short contents BUT ALSO
>>> produces this:
>>>
>>> #+results: r-nicedata
>>> [[file:ndata.pdf]]
>>>
>>> which upon export results in a link and consequently the plot
>>> appearing both
>>> in the figure and elsewhere. This second plot is unwelcome.
>>>
>>> I've tried assorted :results and :output options but have not found
>>> how to
>>> suppress the #+results: but still obtain the figure. I've always used
>>> the :session option.
>>>
>>> I've also tried twigging an org-export option to suppress pdf
>>> export but the
>>> link is still exported so that is not a solution.
>>>
>>> The current "working" solution is to use the noweb approach and
>>> then use sed
>>> to clean out the links to the second image-ugly to say the least!
>>>
>>
>> You were very close with the noweb approach.  The following
>> combination
>> should work -- notice the ":results silent" header argument to the
>> source block.
>>
>> --8<---------------cut here---------------start------------->8---
>> some pre-table text
>>
>> #+source: g-nicedata
>> #+begin_src gnuplot :file graph.png :results silent :exports none
>>  plot sin(x)
>> #+end_src
>>
>> #+begin_src latex :noweb yes
>>  \begin{figure}[htb!]
>>    \centering
>>    \includegraphics[width=0.98\textwidth]{<<g-nicedata()>>}
>>    \caption[Nice data]{some nice data -- filled points indicate less
>> nice data}
>>    \label{fig:nicedata}
>>  \end{figure}
>> #+end_src
>>
>> some post-table text
>> --8<---------------cut here---------------end--------------->8---
>>
>> is exported to the following latex,
>>
>> --8<---------------cut here---------------start------------->8---
>> some pre-table text
>>
>>
>>
>> \begin{figure}[htb!]
>>  \centering
>>  \includegraphics[width=0.98\textwidth]{graph.png}
>>  \caption[Nice data]{some nice data -- filled points indicate less
>> nice data}
>>  \label{fig:nicedata}
>> \end{figure}
>>
>> some post-table text
>> --8<---------------cut here---------------end--------------->8---
>>
>> Hope this helps,
>>
>> Best -- Eric
>>
>>>
>>>
>>>
>>> All this with org version 6.36c
>>>
>>>
>>> What have I missed? What is the best way to do this?
>>>
>>>
>>> Cheers,
>>>
>>> Robert Cunningham
>>>
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> Emacs-orgmode mailing list
>>> Please use `Reply All' to send replies to the list.
>>> Emacs-orgmode@gnu.org
>>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>>
>> Footnotes:
>> [1]  From 6a55dcab99bbd7840117b8390ab5db347d2573ef Mon Sep 17
>> 00:00:00 2001
>> From: Eric Schulte <schulte.eric@gmail.com>
>> Date: Mon, 21 Jun 2010 09:02:37 -0700
>> Subject: [PATCH] add short-names to #+captions with support for
>> latex export
>>
>>  captions specified with the following syntax
>>    #+CAPTION: [shortname]{longname}
>>  will have their short and longnames handled appropriately.
>>
>>  Thanks to Robert Cunningham for suggesting this feature.
>>
>> * lisp/org-exp.el (org-export-attach-captions-and-attributes): adding
>>  a shortname attribute to caption strings under the symbol name
>>  org-caption-shortn.
>>
>> * lisp/org-latex.el (org-export-latex-tables): handling caption short
>>  names on table export
>>
>>  (org-export-latex-convert-table.el-table): handling caption short
>>  names on table.el type table export
>>
>>  (org-export-latex-links): handling caption short names on link/image
>>  export
>>
>>  (org-export-latex-format-image): now takes an optional argument
>>  specifying a caption short name
>> ---
>> lisp/org-exp.el   |   14 +++++++++-----
>> lisp/org-latex.el |   21 ++++++++++++++-------
>> 2 files changed, 23 insertions(+), 12 deletions(-)
>>
>> diff --git a/lisp/org-exp.el b/lisp/org-exp.el
>> index 029e4d7..466d7da 100644
>> --- a/lisp/org-exp.el
>> +++ b/lisp/org-exp.el
>> @@ -1256,7 +1256,7 @@ the current file."
>>   (goto-char (point-min))
>>   (while (re-search-forward org-bracket-link-regexp nil t)
>>     (org-if-unprotected-at (1+ (match-beginning 0))
>> -     (let* ((md (match-data))
>> +      (let* ((md (match-data))
>> 	    (desc (match-end 2))
>> 	    (link (org-link-unescape (match-string 1)))
>> 	    (slink (org-solidify-link-text link))
>> @@ -1381,8 +1381,8 @@ removed as well."
>> 					   select-tags "\\|")
>> 			 "\\):"))
>> 	 (re-excl (concat ":\\(" (mapconcat 'regexp-quote
>> -					   exclude-tags "\\|")
>> -			"\\):"))
>> +					    exclude-tags "\\|")
>> +			  "\\):"))
>> 	 beg end cont)
>>     (goto-char (point-min))
>>     (when (and select-tags
>> @@ -1593,11 +1593,14 @@ table line.  If it is a link, add it to the
>> line containing the link."
>> 		    "^[ \t]*\\(|[^-]\\)"
>> 		    "\\|"
>> 		    "^[ \t]*\\[\\[.*\\]\\][ \t]*$"))
>> -	cap attr label end)
>> +	cap shortn attr label end)
>>     (while (re-search-forward re nil t)
>>       (cond
>>        ((match-end 1)
>> -	(setq cap (concat cap (if cap " " "") (org-trim (match-string 1)))))
>> +	(setq cap (concat cap (if cap " " "") (org-trim (match-string 1))))
>> +	(when (string-match "\\[\\(.*\\)\\]{\\(.*\\)}" cap)
>> +	  (setq shortn (match-string 1 cap)
>> +		cap (match-string 2 cap))))
>>        ((match-end 2)
>> 	(setq attr (concat attr (if attr " " "") (org-trim
>> (match-string 2)))))
>>        ((match-end 3)
>> @@ -1609,6 +1612,7 @@ table line.  If it is a link, add it to the
>> line containing the link."
>> 		    (point-at-eol)))
>> 	(add-text-properties (point-at-bol) end
>> 			     (list 'org-caption cap
>> +				   'org-caption-shortn shortn
>> 				   'org-attributes attr
>> 				   'org-label label))
>> 	(if label (push (cons label label) target-alist))
>> diff --git a/lisp/org-latex.el b/lisp/org-latex.el
>> index 01a4b05..6c2aab2 100644
>> --- a/lisp/org-latex.el
>> +++ b/lisp/org-latex.el
>> @@ -1576,7 +1576,7 @@ The conversion is made depending of STRING-
>> BEFORE and STRING-AFTER."
>>              (org-table-last-column-widths (copy-sequence
>>                                             org-table-last-column-
>> widths))
>>              fnum fields line lines olines gr colgropen line-fmt align
>> -             caption label attr floatp longtblp)
>> +             caption shortn label attr floatp longtblp)
>>         (if org-export-latex-tables-verbatim
>>             (let* ((tbl (concat "\\begin{verbatim}\n" raw-table
>>                                 "\\end{verbatim}\n")))
>> @@ -1585,6 +1585,8 @@ The conversion is made depending of STRING-
>> BEFORE and STRING-AFTER."
>>           (progn
>>             (setq caption (org-find-text-property-in-string
>>                            'org-caption raw-table)
>> +		  shortn (org-find-text-property-in-string
>> +			  'org-caption-shortn raw-table)
>>                   attr (org-find-text-property-in-string
>>                         'org-attributes raw-table)
>>                   label (org-find-text-property-in-string
>> @@ -1652,7 +1654,8 @@ The conversion is made depending of STRING-
>> BEFORE and STRING-AFTER."
>>                           (if floatp "\\begin{table}[htb]\n"))
>>                         (if floatp
>>                             (format
>> -                             "\\caption{%s%s}"
>> +                             "\\caption%s{%s%s}"
>> +			     (if shortn (concat "[" shortn "]") "")
>>                              (if label (concat "\\\label{" label
>> "}") "")
>>                              (or caption "")))
>>                         (if (and longtblp caption) "\\\\\n" "\n")
>> @@ -1680,10 +1683,11 @@ The conversion is made depending of STRING-
>> BEFORE and STRING-AFTER."
>>
>> (defun org-export-latex-convert-table.el-table ()
>>   "Replace table.el table at point with LaTeX code."
>> -  (let (tbl caption label line floatp attr align rmlines)
>> +  (let (tbl caption shortn label line floatp attr align rmlines)
>>     (setq line (buffer-substring (point-at-bol) (point-at-eol))
>> 	  label (org-get-text-property-any 0 'org-label line)
>> 	  caption (org-get-text-property-any 0 'org-caption line)
>> +	  shortn (org-get-text-property-any 0 'org-caption-shortn line)
>> 	  attr (org-get-text-property-any 0 'org-attributes line)
>> 	  align (and attr (stringp attr)
>> 		     (string-match "\\<align=\\([^ \t\n\r,]+\\)" attr)
>> @@ -1721,7 +1725,8 @@ The conversion is made depending of STRING-
>> BEFORE and STRING-AFTER."
>>       (setq tbl (concat "\\begin{center}\n" tbl "\\end{center}")))
>>     (when floatp
>>       (setq tbl (concat "\\begin{table}\n"
>> -			(format "\\caption{%s%s}\n"
>> +			(format "\\caption%s{%s%s}\n"
>> +				(if shortn (format "[%s]" shortn) "")
>> 				(if label (format "\\label{%s}" label) "")
>> 				(or caption ""))
>> 			tbl
>> @@ -1822,6 +1827,7 @@ The conversion is made depending of STRING-
>> BEFORE and STRING-AFTER."
>> 			  "file")))
>> 	    (coderefp (equal type "coderef"))
>> 	    (caption (org-find-text-property-in-string 'org-caption
>> raw-
>> path))
>> +	    (shortn (org-find-text-property-in-string
>> org-caption-shortn raw-path))
>> 	    (attr (or (org-find-text-property-in-string
>> org-attributes raw-
>> path)
>> 		      (plist-get org-export-latex-options-plist
>> :latex-image-
>> options)))
>> 	    (label (org-find-text-property-in-string 'org-label raw-path))
>> @@ -1859,7 +1865,7 @@ The conversion is made depending of STRING-
>> BEFORE and STRING-AFTER."
>> 		   (plist-get org-export-latex-options-plist :inline-images))
>> 	      ;; OK, we need to inline an image
>> 	      (insert
>> -	       (org-export-latex-format-image raw-path caption label attr)))
>> +	       (org-export-latex-format-image raw-path caption label
>> attr shortn)))
>> 	     (coderefp
>> 	      (insert (format
>> 		       (org-export-get-coderef-format path desc)
>> @@ -1889,7 +1895,7 @@ The conversion is made depending of STRING-
>> BEFORE and STRING-AFTER."
>> 	     (t (insert "\\texttt{" desc "}")))))))
>>
>>
>> -(defun org-export-latex-format-image (path caption label attr)
>> +(defun org-export-latex-format-image (path caption label attr
>> &optional shortn)
>>   "Format the image element, depending on user settings."
>>   (let (ind floatp wrapp multicolumnp placement figenv)
>>     (setq floatp (or caption label))
>> @@ -1932,7 +1938,7 @@ The conversion is made depending of STRING-
>> BEFORE and STRING-AFTER."
>> 	   (floatp "\\begin{figure}%placement
>> \\centering
>> \\includegraphics[%attr]{%path}
>> -\\caption{%labelcmd%caption}
>> +\\caption%shortn{%labelcmd%caption}
>> \\end{figure}")
>> 	   (t "\\includegraphics[%attr]{%path}")))
>>
>> @@ -1953,6 +1959,7 @@ The conversion is made depending of STRING-
>> BEFORE and STRING-AFTER."
>> 			 (expand-file-name path)
>> 		       path))
>> 	       (cons "attr" attr)
>> +	       (cons "shortn" (if shortn (format "[%s]" shortn) ""))
>> 	       (cons "labelcmd" (if label (format "\\label{%s}"
>> 						  label)""))
>> 	       (cons "caption" (or caption ""))
>> --
>> 1.7.0.4
>>
>> _______________________________________________
>> Emacs-orgmode mailing list
>> Please use `Reply All' to send replies to the list.
>> Emacs-orgmode@gnu.org
>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>
> - Carsten

>From 5cbb38e25a2d2eae7c3c688d347f80619ecb8463 Mon Sep 17 00:00:00 2001
From: Eric Schulte <schulte.eric@gmail.com>
Date: Thu, 1 Jul 2010 08:07:17 -0700
Subject: [PATCH] add short-names to #+captions with support for latex export

  captions specified with the following syntax
    #+CAPTION: [shortname]{longname}
  will have their short and longnames handled appropriately.

  Thanks to Robert Cunningham for suggesting this feature.

* lisp/org-exp.el (org-export-attach-captions-and-attributes): adding
  a shortname attribute to caption strings under the symbol name
  org-caption-shortn.

* lisp/org-latex.el (org-export-latex-tables): handling caption short
  names on table export

  (org-export-latex-convert-table.el-table): handling caption short
  names on table.el type table export

  (org-export-latex-links): handling caption short names on link/image
  export

  (org-export-latex-format-image): now takes an optional argument
  specifying a caption short name
2010-07-02 10:14:12 +02:00
Carsten Dominik f693238dfe Fix naming and docstring issues in `org-iswitchb'
* lisp/org.el (org-switchb): Renamed from `org-iswitchb'.  Improve
docstring.
(org-iswitchb): New alias.
(org-ido-switchb): Make alias point to `org-switchb'.
2010-07-02 09:20:15 +02:00
Carsten Dominik d0fa608267 Capture: Respect time-of-day preference in interactive template prompt.
* lisp/org-capture.el (org-capture-fill-template): Respect
time-of-day preference in template prompt.

In an interactive time prompt in a capture template, the users
preference of getting a stamp with time was not respected.

Reported by Markus Heller
2010-07-02 09:08:29 +02:00
David Maus dc9222e066 Remove superfluous lambda.
* org-feed.el (org-feed-unescape): Remove superfluous lambda.
2010-07-02 00:48:59 -04:00
Eric Schulte 7fdfd13e96 babel: cleaner initialization of org-babel-python-buffers
* lisp/babel/langs/ob-python.el (org-babel-python-buffers):
  technically this should be initialized as an alist, although in
  practice this doesn't really make any functional difference because
  whenever this variable is used it has new values properly assigned
  to it, and it is supposed to start basically empty.
2010-07-01 15:09:34 -07:00
Carsten Dominik 0ed29448aa Keep byte compiler happy 2010-07-01 15:54:29 +02:00
David Maus 02d5f6a8b0 Provide customization variable to disable folder check when open link.
* org-wl.el (org-wl-disable-folder-check): New customization
variable.
(org-wl-open): Disable folder check depending on
`org-wl-disable-folder-check'.
2010-07-01 15:49:29 +02:00
Sebastian Rose 0a99122943 Remove obsolete function call and declaration
This patch removes an obsolete declaration and call of the function
`org-publish-initialize-files-alist'  from org-protocol.el.

This function does not exist anymore.  It was removed when we
implemented the new publishing cache.
Best wishes

  Sebastian
2010-07-01 15:46:51 +02:00
Carsten Dominik 14f05b4461 Capture: Fix bug in file+function target specification
* lisp/org-capture.el (org-capture-set-target-location): Fix
file+function interpretation.
2010-07-01 15:43:43 +02:00
Carsten Dominik e9927a6d2b Merge branch 't/patch59' 2010-07-01 15:11:54 +02:00
Carsten Dominik 2505c69796 Merge branch 't/patch58' 2010-07-01 15:11:51 +02:00
Carsten Dominik 88429d7270 Merge branch 't/patch57' 2010-07-01 15:11:46 +02:00
David Maus 6875716e76 Unescape rss element content.
* org-feed.el (org-feed-parse-rss-entry): Unescape rss element
content.
2010-07-01 15:09:43 +02:00
David Maus f15605889b Declare variable `xml-entity-alist' for byte compiler.
* org-feed.el (xml-entity-alist): Declare variable
`xml-entity-alist' for byte compiler.
2010-07-01 15:09:15 +02:00
David Maus ea47dd58ff Unescape protected entities defined in `xml-entity-alist'.
* org-feed.el (org-feed-unescape): New function.  Unescape
protected entities.
(org-feed-parse-atom-entry): Use function for atom:content
type text and html.
2010-07-01 15:08:43 +02:00
David Maus f1924d9224 Ignore case of rss element names.
* org-feed.el (org-feed-parse-rss-feed): Ignore case of rss
element names.
2010-07-01 15:07:57 +02:00
Bernt Hansen 516640aff9 Fix agenda display for late scheduled and deadline tasks
* lisp/org.el (org-time-string-to-absolute): Ignore cyclic repeater
when displaying items on todays agenda date.

Ignore the cyclic repeater when displaying items on today's agenda
date.  If you have a weekly task and miss the date the agenda view
will show more than a week late now instead of resetting on the
cyclic repeating date.  This makes it much more obvious when you
missed a repeating task after the repeater.
2010-07-01 14:56:18 +02:00
Julien Danjou 3308155e23 org-feed: Fix RSS feed parsing when <item> as attributes
I've RSS feeds with <item foo="bar"> which does not work without that change.

Signed-off-by: Julien Danjou <julien@danjou.info>
2010-07-01 14:50:08 +02:00
Carsten Dominik c74ecf4387 Fix display problem of clocked time in agenda
* lisp/org-agenda.el (org-agenda-get-progress): Avoid reusing previous
value of EXTRA.

Sebastien Vauban writes:

> Finally reporting the following bug. Has been there for as long as I can
> remember, but never did report it when seeing it. And kept forgetting.
>
> So, now...
>
> --8<---------------cut here---------------start------------->8---
> * 2010
>
> ** 2010-06 June
>
> *** Admin
>
> **** Organization
>     :LOGBOOK:
>     CLOCK: [2010-06-30 Wed 13:30]--[2010-06-30 Wed 17:50] =>  4:20
>     - DUPLICATED TeXt.
>     :END:
>
> **** Emails and News
>     :LOGBOOK:
>     CLOCK: [2010-06-28 Mon 09:10]--[2010-06-28 Mon 10:40] =>  1:30
>     CLOCK: [2010-06-30 Wed 10:30]--[2010-06-30 Wed 12:30] =>  2:00
>     :END:
>
> *** ABC
>    :LOGBOOK:
>    CLOCK: [2010-06-30 Wed 09:30]--[2010-06-30 Wed 10:30] =>  1:00
>    - Transfer of files to ABC.
>    :END:
> --8<---------------cut here---------------end--------------->8---
>
> generates the following timeline:
>
> --8<---------------cut here---------------start------------->8---
> Timeline of file /home/sva/Projects/ecm.org
>
> 2010-06-28 Mon _________________________________
>  Clocked:   (1:30) Emails and News
>
> 2010-06-29 Tue _________________________________
>
> 2010-06-30 Wed _________________________________
>  Clocked:   (1:00) ABC - Transfer of files to ABC.
>  Clocked:   (2:00) Emails and News - DUPLICATED TeXt.
>  Clocked:   (4:20) Organization - DUPLICATED TeXt.
> --8<---------------cut here---------------end--------------->8---
>
> As you can see, the fact that I never put a descriptive text for "reading
> emails" is wrongly reported: previous text is used in the timeline, instead.
2010-07-01 14:02:58 +02:00
Carsten Dominik 6c381070f9 Make timestamp directory even if the parent does not exist
* lisp/org-publish.el (org-publish-initialize-cache): Make
timestamp directory, the entire path to it.
2010-07-01 11:31:14 +02:00
Carsten Dominik a6d8eb4ea9 Fix comment protection issue
* lisp/org-exp.el (org-export-handle-comments): Make sure to check
for protection in the comment line, and not in the line after it.
2010-07-01 11:02:46 +02:00
Carsten Dominik 90afd8b797 Introduce new option for exporting LaTeX code to HTML
* lisp/org-html.el (org-export-html-preprocess): Call org-format-latex,
possibly with a protect-only argument.
* lisp/org.el (org-format-latex): New argument PROTECT-ONLY.

with the switch #+OPTIONS: LaTeX:verbatim ,
LaTeX code will be exported verbatim to HTML, so that jsmath can grab
and convert it.

Proposed by Christian Moe.
2010-07-01 10:23:33 +02:00
Carsten Dominik a5d5f4c9f3 Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode 2010-07-01 06:28:45 +02:00
Eric Schulte f44832eed0 org-exp: now removing table meta (e.g. #+TBLNAME, #+TBLFM) from export
* lisp/org-exp.el (org-export-handle-table-metalines): this function
  removes table specific meta-lines, now that we aren't wiping
  everything that looks remotely like a comment at the end of the
  export process we have to be sure to catch all of the specific lines
  in org-exp.el
2010-06-30 16:01:38 -07:00
Nicolas Goaziou 011553652e Remove unwanted #+ATTR_Backend and #+Backend during export.
* lisp/org-exp.el: (org-export-select-backend-specific-text) Properly
  get rid of #+Backend and #+ATTR_Backend specifics to backends not
  matching the one we're exporting to.
2010-06-30 14:23:01 -07:00
Eric Schulte 23b13749f6 remove newline characters from the contents of table cells
This patch changes the functionality of orgtbl-to-orgtbl so that it will
remove newline characters from the text of table cells and replace them
with "\n".  This protects the final table from such newlines.

This patch will probably only have any noticeable effect for tables
imported form external files, or from the results of code blocks.

Best -- Eric

>From 34aacc9aa037e8f17c8d32ed61a25f0a350713a0 Mon Sep 17 00:00:00 2001
From: Eric Schulte <schulte.eric@gmail.com>
Date: Fri, 18 Jun 2010 12:38:26 -0700
Subject: [PATCH] org-table: will now strip newlines from the text of table cells

* lisp/org-table.el (orgtbl-to-generic): added the :remove-newlines
  option which will strip newline characters from the text of table
  cells and replace then with "\n"

  (orgtbl-to-orgtbl): now using the new :remove-newlines option to
  orgtbl-to-generic
2010-06-30 15:34:04 +02:00
Carsten Dominik 798ebf518b Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode 2010-06-30 15:30:03 +02:00
Carsten Dominik a0962e02fd Increase security by limiting what file variables can do for evaluation query.
* lisp/org.el (org-confirm-shell-link-function):
(org-confirm-elisp-link-function): Limit the values that can be set by
file variables.
2010-06-30 15:29:55 +02:00
John Wiegley 706129c0c4 Fixed incorrect value returned from `org-habit-deadline' 2010-06-30 00:39:37 -04:00
Carsten Dominik 025a96d46f Fix bug due to new entity constant structure
* lisp/org.el (org-compute-latex-and-specials-regexp): Deal with
string elements by discarding them.
2010-06-29 11:47:42 +02:00
Carsten Dominik f255546425 Fix docstring for org-iswitchb again 2010-06-29 10:44:50 +02:00
Carsten Dominik 51d496f212 Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode 2010-06-29 09:51:38 +02:00
Carsten Dominik 566a4c7f3a Restore the proper functionality for org-iswitchb
* lisp/org.el (org-iswitchb): Make sure to use at least iswitchb.

Patch by Stephen Eglen (modified).
2010-06-29 09:26:51 +02:00
Carsten Dominik d537c10964 Capture: Better error handling and better return-to-last-stored
* lisp/org-capture.el (org-capture-position-for-last-stored):
org-capture-bookmark-last-stored-position): New functions.
(org-capture-place-table-line): Better error catching.
(org-capture-place-item):
(org-capture-place-entry):
(org-capture-place-plain-text): Call
`org-capture-position-for-last-stored'.
(org-capture-finalize): Just call
`org-capture-bookmark-last-stored-position'.
2010-06-29 09:16:04 +02:00
Eric Schulte 452b00e7e1 org-exp: fixed small bug, use match data before it's overwritten by looking-at
Patch by Carsten

* lisp/org-exp.el (org-export-mark-blockquote-verse-center): fixed
  small bug, now grabbing match data before overwritten by looking-at
  this fixes a problem with remainders of #+end_quote lines appearing
  in exported output
2010-06-28 22:06:49 -07:00
David Maus 2510d02be9 Add customization option to open WL links in other frame.
* org.el (org-link-frame-setup): Add customization option for
  Wanderlust.
2010-06-29 06:39:45 +02:00
Eric Schulte b9548e92ab org-latex: now checking org-example rather than org-protected on verbatim export
* lisp/org-latex.el (org-export-latex-fixed-width): now checking
  org-example rather than org-protected on verbatim export, because by
  default all ": " prefixed lines are marked protected
2010-06-28 14:15:23 -07:00
Eric Schulte da8fffa5a4 org-latex: check for protection before wrapping ": " lines as verbatim
* lisp/org-latex.el (org-export-latex-fixed-width): check for
  protection before wrapping ": " lines as verbatim
2010-06-28 11:40:47 -07:00
Eric Schulte a8a26f245b babel: now requires org-macs
* lisp/babel/ob.el (org-macs): now requires org-macs
2010-06-28 11:38:34 -07:00
Eric Schulte 8217e8102e babel: python is more selective about None->hline replacement
thanks to Christopher Allan Webber for catching this

* lisp/babel/langs/ob-python.el (org-babel-python-table-or-string):
  now more careful not to replace "None"s which are not isolated
  portions of lists
2010-06-28 11:17:08 -07:00
Eric Schulte f4b78ad3c8 babel-haskell: variety of bug fixes
Thanks to Christopher Witte for raising these issues

* lisp/babel/langs/ob-haskell.el (org-babel-expand-body:haskell):
  replaced missing () wrapping, and now using correct variable
  expansion

  (org-babel-execute:haskell): now using
  org-babel-haskell-initiate-session to start sessions

  (org-babel-haskell-initiate-session): only starting sessions if none
  exists, also added a .25 second wait on brand new sessions to allow
  the Haskell interpreter to fire up

  (org-babel-load-session:haskell): now optionally accepts processed
  params to avoid over-execution of variable resolution

  (org-babel-prep-session:haskell):  now optionally accepts processed
  params to avoid over-execution of variable resolution, also placing
  the variable definitions directly in the session instead of loading
  them from a separate file
2010-06-28 09:55:09 -07:00
Eric Schulte 0e636dc2ed org-exp: check for protection before removing comments
* lisp/org-exp.el (org-export-handle-comments): check for protection
  before removing comments
2010-06-28 08:00:43 -07:00
Carsten Dominik ee629299c0 Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode 2010-06-28 12:18:22 +02:00
Carsten Dominik af866a94bd Better help for entities
* lisp/org-entities.el (org-entities): Restructure the list.
(org-entities-help): Turn the help output into a buffer
in Org-mode, so that it becomes easier to find a symbol
in the structure.
(org-entities-create-table): Deal with new structure.
2010-06-28 12:17:58 +02:00
Eric Schulte 05b7ea5035 babel: ensure `declare-function' is available in all Emacsen
Thanks to Daniel Mahler for finding this problem and proposing the fix

* lisp/babel/ob.el (unless): ensure `declare-function' is available in
  all Emacsen
2010-06-27 23:13:51 -07:00