Commit Graph

3350 Commits

Author SHA1 Message Date
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