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

4150 commits

Author SHA1 Message Date
Eric Schulte c676f62361 passing header arguments through to called code blocks
* lisp/ob-lob.el (org-babel-lob-get-info): including pass-through
  header arguments in results variable header argument string

* lisp/ob.el (org-babel-execute-src-block): working with new header
  argument setup
  (org-babel-parse-header-arguments): only split header argument
  strings when []'s are balanced
2010-11-08 14:18:33 -07:00
David Maus 6c95170ca0 Limit search for in-buffer options beginning of first headline
* org-exp.el (org-export-visible): Limit search for in-buffer options
beginning of first headline.
2010-11-07 20:06:54 +01:00
David Maus 49a00abf3d Remove stale link handler for news: links
* org.el (org-open-at-point): Remove stale link handler for news:
links.

This condition case is never evaluated because the news: link is
already passed to `browse-url'.
2010-11-07 16:21:32 +01:00
Bastien Guerry 6630edbd0f Set version number to 7.3 2010-11-07 14:52:14 +01:00
Bastien Guerry dfb52eb7a7 Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode 2010-11-07 14:42:39 +01:00
Carsten Dominik d96c998019 Fix issue with narrowing and links in clocktables
* lisp/org-clock.el (org-clocktable-write-default): Better handling of
narrowing.

Liang Wang writes:

> After I upgrade orgmode to latest version, clock report shows link
> text literally.
>
> For example,
>
>   [[file:/home/liang/gtd/todo.org::Task...
>
> Unfortunately, in this way, I can not see what this task actually is.
> I have to temporarily disable link in clock report.
2010-11-06 16:16:49 -04:00
Julien Danjou 498bcc0031 org-agenda: fix org-agenda-category-icon-alist defcustom type
* list/org-agenda.el (org-agenda-category-icon-alist): Fix defcustom
  type.

Signed-off-by: Julien Danjou <julien@danjou.info>
2010-11-05 16:50:06 +01:00
Nicolas Goaziou e652a1ed85 Simplify and fix indentation code in lists
* org.el (org-indent-line-function): simplify code and remove bug that
  would insert a tab at the beginning of the line when trying to
  indent the item.
2010-11-04 19:05:10 +01:00
Carsten Dominik da0f4997fb Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode 2010-11-04 16:46:25 +01:00
Julien Danjou 3e4b139f1d org-agenda: return multiple results when sexp return a string with "; "
* lisp/org.el (org-diary-sexp-entry): Split sexp result strings at semicolon.

When evaluating my %%(org-calendar-holidays) on October 31st, I got a
line like:

"Halloween; Daylight Saving Time Ends 3:00am (CEST)"

And it displays in calendar:
3:00 .... Halloween; Daylight Saving Time Ends (CEST)

This is wrong since Halloween is all day, not only at 3:00.

Splitting results on "; " allows to have an independant entry on each
event and displays things correctly.

Signed-off-by: Julien Danjou <julien@danjou.info>
2010-11-04 13:05:50 +01:00
Julien Danjou aaffdb4732 org-agenda: add support for category icons
Signed-off-by: Julien Danjou <julien@danjou.info>

* doc/org.texi (Categories): Document category icons.
* lisp/org-agenda.el (org-agenda-prefix-format): Insert place holder for icon.
(org-agenda-category-icon-alist): New option.
(org-agenda-get-category-icon): New function.
(org-format-agenda-item): Support for icons.
(org-compile-prefix-format): Support for icons.
2010-11-04 13:01:37 +01:00
Julien Danjou 4ef83fbdc9 org-compat: defalias string-match-p and looking-at-p rather than defun
Signed-off-by: Julien Danjou <julien@danjou.info>

* lisp/org-compat.el: Create defalias for `string-match-p' and
looking-at-p.
2010-11-04 12:30:38 +01:00
Eric Schulte 3a62685df9 ob-calc: support for variables -- converts :var variables in calc variables
* lisp/ob-calc.el (org-babel-execute:calc): support for variables --
  converts :var variables in calc variables
2010-11-03 23:45:25 -06:00
Carsten Dominik 106ad6e9e5 Fix sparse tree dispatch menu
* lisp/org.el (org-sparse-tree): Mention [r] in dispatch menu
2010-11-03 23:26:23 +01:00
Carsten Dominik d5e2031bc7 XEmacs compatibility patch
* lisp/org-list.el (org-list-parse-list): Use `org-looking-at-p'.
2010-11-03 23:16:37 +01:00
Carsten Dominik 7f79007e52 Better fix for link problem, use Liam's idea 2010-11-02 23:07:47 +01:00
Carsten Dominik aeaf05238c Limit creation of ID links only in Org mode buffers
* lisp/org-id.el (org-id-store-link): Test for org-mode before checking for
IDs.

Reporte and fix suggestion by Liam Healy
2010-11-02 23:04:10 +01:00
Carsten Dominik 1197b73769 Minor fixes 2010-11-02 09:24:06 +01:00
Carsten Dominik 350b75be63 Rewrite of the clock table code
* lisp/org.el (org-shorten-string): New function.
* lisp/org-exp.el (org-export-convert-protected-spaces): New function.
(org-export-preprocess-string): Call
`org-export-convert-protected-spaces' to handle new hard spaces.

* lisp/org-clock.el (org-clocktable): New customization group.
(org-clocktable-defaults): New option.
(org-clock-clocktable-formatter): New option.
(org-clock-clocktable-default-properties): New option.
(org-dblock-write:clocktable): Rewrite to split out functionality
into separate functions.
(org-clocktable-write-default):
(org-clocktable-indent-string):
(org-clock-get-table-data): New functions.
* lisp/org-agenda.el (org-agenda-list):
(org-agenda-redo):
(org-agenda-clockreport-mode):
(org-agenda-set-mode-name): Rewrite to implement filtered clock tables.
* doc/org.texi (Clocking commands):
(The clock table): New sections.
(Agenda commands): Document filtered clock reports.
2010-11-02 08:47:23 +01:00
David Maus 7bef01a90f Check for heading that ends at end of buffer
* org.el (org-narrow-to-subtree): Check for heading that ends at end
of buffer.
2010-11-01 19:28:11 +01:00
Carsten Dominik adede9fbaf Fix export bug of a region with an ARCHIVE property set 2010-11-01 13:57:02 +01:00
Dan Davison ed5665e1e2 babel: Use copy-sequence' instead of copy-tree'
* lisp/ob.el: `copy-sequence' suffices to copy alist; no need for
`copy-tree'
2010-10-31 13:22:13 +00:00
Dan Davison d6599c5699 babel: Ensure that result is a file link when that is intended
* lisp/ob.el (org-babel-execute-src-block): If ":results file" is in
effect, then ensure that the value of :file is returned as the result;
don't rely on language files for this.

Examples of languages that were not honouring :file are sh and
emacs-lisp.
2010-10-31 12:55:35 +00:00
Dan Davison cf0cdd7785 babel: Fix data structure corruption when sorting parameters
* lisp/ob.el (org-babel-sha1-hash): Avoid corrupting `info' data
structure by side-effects of `sort'.
2010-10-31 12:51:18 +00:00
Nicolas Goaziou 0778fb8748 Fix list end with non-empty blank lines. Fix sorting.
* org-list.el (org-list-bottom-point-with-indent): do not check
  indentation of a non-empty blank line.
* org-list.el (org-sort-list): sort a list with point anywhere inside
  it.
2010-10-30 18:20:52 +02:00
Eric Schulte 598be4a4a4 ob-calc: added to org-src-lang-modes, safer evaluation, better error messages
* lisp/ob-calc.el (org-babel-execute:calc): safer evaluation and
  hopefully better error messages

* lisp/org-src.el (org-src-lang-modes): mapping calc blocks to
  fundamental mode
2010-10-29 19:18:28 -06:00
Eric Schulte 421405df19 adding ob-calc to org-babel-load-languages
* lisp/org.el (org-babel-load-languages): adding calc
2010-10-29 19:02:44 -06:00
Dan Davison 1ee54e0db7 babel: Don't resolve variable references unless requested
* lisp/ob.el (org-babel-initiate-session): Don't resolve variable
  references unless prefix arg is supplied.
2010-10-29 20:44:58 +01:00
Eric Schulte 9c833c456e ob-calc: ensure that calc stack refers to the correct stack
* lisp/ob-calc.el (org-babel-execute:calc): ensure that calc stack
  refers to the correct stack
2010-10-29 10:20:07 -06:00
Eric Schulte f7166a0a05 ob-calc: adding the beginnings of support for calc code blocks
* lisp/ob-calc.el: adding the beginnings of support for calc code blocks
2010-10-29 08:54:12 -06:00
Eric Schulte 2152f1ec28 ob-tangle: detangle changes in code files back to the original org files
* lisp/ob-tangle.el (org-babel-update-block-body): declaring function
  for updating code block bodies
  (org-babel-spec-to-string):
  (org-babel-detangle): detangle all tangled and commented code blocks
  in the current file back to org
  (org-babel-tangle-jump-to-org): jump from a tangled and commented
  file back to the originating org-mode code block
ob-tangle: detangle changes in code files back to the original org files

* lisp/ob-tangle.el (org-babel-update-block-body): declaring function
  for updating code block bodies
  (org-babel-spec-to-string):
  (org-babel-detangle): detangle all tangled and commented code blocks
  in the current file back to org
  (org-babel-tangle-jump-to-org): jump from a tangled and commented
  file back to the originating org-mode code block
2010-10-29 02:13:38 -06:00
Eric Schulte 93600e41a6 Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode 2010-10-29 02:10:18 -06:00
Eric Schulte c6565eaa43 fixed typos in tangle comment link format strings
* lisp/ob-tangle.el (org-babel-tangle-comment-format-beg): fix typo
  (org-babel-tangle-comment-format-end): fix typo
2010-10-29 01:37:28 -06:00
Carsten Dominik 82af72eef7 Push version number to 7.02trans 2010-10-29 09:11:46 +02:00
Carsten Dominik 110b4c4610 Revert "LaTeX export: use org-export-latex-hyperref-format"
This reverts commit f5918bdcc0.
2010-10-29 05:57:24 +02:00
Dan Davison 9c55868550 Alter way in which user chooses minted for latex source code export
* lisp/org-exp.el (org-export-format-source-code-or-example): Use
  minted for latex source code export if `org-export-latex-listings' has
  the value 'minted
* lisp/org-latex.el (org-export-latex-listings): Document special
  value 'minted
* lisp/org-latex.el (org-export-latex-minted): Delete variable
2010-10-28 21:55:40 +01:00
Carsten Dominik ae91c0cb0c Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode 2010-10-28 09:38:53 +02:00
Carsten Dominik fd7b3e9717 Revert "Fix bug with :maxlevel 0 in clock tables"
This reverts commit 5801fa6c63.
2010-10-28 08:09:46 +02:00
Bastien Guerry 840570c2a3 Update Changes.org and org.texi to reflect changes in org-timer.el
Update org.texi with a new section: Countdown timer.
Update ORGWEBPAGE/Changes.org with a section about timer/clock.
Also fix a small typo in a org-timer.el.
2010-10-27 18:20:27 +02:00
Dan Davison 9c1acbc667 babel: Fix regexp parsing of functional-style arguments
* lisp/ob.el (org-babel-get-src-block-info): Retrieve contents of
  parentheses, excluding parentheses themselves
2010-10-27 16:31:34 +01:00
Eric Schulte fd9e9331ee ob-gnuplot: fixed bug in data file assignment using user variables
Thanks to Nick Dokos and Nigel Beck for raising the issue.

* lisp/ob-gnuplot.el (org-babel-variable-assignments:gnuplot): fixed
  bug in gnuplot data file assignment using user variables
2010-10-26 22:49:12 -06:00
Eric Schulte c52ccaefa7 adding new :headers header argument for latex code blocks
* lisp/ob-latex.el (org-babel-execute:latex): adding new :headers
  header argument for latex code blocks
2010-10-26 17:00:28 -06:00
Carsten Dominik 7635429d44 New capture property :kill-buffer
* lisp/org-capture.el (org-capture-templates): New capture
property `:kill-buffer'. (org-capture-finalize): Kill target buffer
if that is desired.
(org-capture-target-buffer): Remember if we have to make the buffer.

Proposal by Samuel Wales.
2010-10-26 17:46:48 +02:00
Carsten Dominik 8e12716f68 Fix bug when computing clock tables.
* lisp/org-clock.el (org-dblock-write:clocktable): Fix bug
when computing clock tables.

Ouch, bad bug.  Resetting the clock file time was always
happening in the same file, not in the different files
visited by the summer.
2010-10-26 17:17:15 +02:00
Carsten Dominik 5801fa6c63 Fix bug with :maxlevel 0 in clock tables
* lisp/org-clock.el (org-dblock-write:clocktable): Pass file minutes
up to caller even if no table is generated.

Rainer Stengele writes:

> 1. Without maxlevbel I get I get
>
> #+BEGIN: clocktable :scope ("file1.org" "file2") :timestamp t :tstart "<2010-05-01 Sa 00:00>" :tend  "<2010-07-31 Sa 23:55>"
> Clock summary at [2010-07-22 Do 09:07]
>
> | File              | L | Timestamp           | Headline       |     Time |        |        |
> |-------------------+---+---------------------+----------------+----------+--------+--------|
> |                   |   | Timestamp           | *Total time*   | *327:51* |        |        |
> ...
>
>
>
> with :maxlevel 0 I get
>
>
> #+BEGIN: clocktable :maxlevel 0 :scope ("file1.org" "file2") :timestamp t :tstart "<2010-05-01 Sa 00:00>" :tend  "<2010-07-31 Sa 23:55>"
> Clock summary at [2010-07-22 Do 09:11]
>
> | File | L | Timestamp | Headline     | Time     |
> |------+---+-----------+--------------+----------|
> |      |   | Timestamp | *Total time* | *232:17* |
> |------+---+-----------+--------------+----------|
> #+END:
>
>
> I would like to get the same results!
> Is ":maxlevel 0" intended to not include the sublevel clocks?
2010-10-26 13:27:20 +02:00
Łukasz Stelmach 47107b6612 Sexp diary entries may retrurn a list
* lisp/org-agenda.el (org-agenda-get-sexps): Handle lists as return values
from diary entries
* lisp/org-bbdb.el (org-bbdb-anniversaries): Handle lists of anniversaries
* lisp/org.el (org-diary-sexp-entry): Handle lists as return values
from diary entries.

 ukasz Stelmach <lukasz.stelmach@iem.pw.edu.pl> writes:

> I've disovered, that %%(org-bbdb-anniversaries) returns (as every other
> sexp) a string. Which is OK if there is only one.
>
>   Anniversaries:  John Doe's 10th wedding anniversary
>
> Unfortunately the agenda view becomes awful if we have noted Jane's
> weeding date too
>
>   Anniversaries:  John Doe's 10th wedding anniversary; Jane Doe's 10th wedding anniversary
>
> And what if we know 3 Eves and 5 Adams and it's Christmas Eve? (Hint:
> their name day)
[...]

As Thomas Bauman pointed out, there are functions that can be used in
sexps which return cons cells like this

    (nil . "Full Moon 3:35am (CEST)")

(this one is diary-lunar-phases), these aren't properly supported by the
previous version of my patch. This one can distinguish between such a
cons cell and a "real" list.

    ("John Doe's 10th wedding anniversary"
     "Jane Doe's 10th wedding anniversary")

This is because

    (consp (cdr '(a . b))) ; => nil

so org-diary-sexp-entry can be made return (cdr result) only in case of
the former cons cell. The third condition in the `cond' block is IMHO
enough as it is now, but if you think adding

    (listp (cdr result))

may help then be it.
2010-10-26 07:27:19 +02:00
Carsten Dominik eab8ea9687 Minor fixes 2010-10-26 07:10:48 +02:00
Carsten Dominik 325daa8228 Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode 2010-10-26 06:34:27 +02:00
Carsten Dominik 2a58795e19 Fix empty line bug in capture
* lisp/org-capture.el (org-capture-empty-lines-before):
(org-capture-empty-lines-after): Make sure the n=0 does not insert any
newlines.

Marcel van der Boom writes:

> I'm in the process of migrating from org-remember to org-capture.
> Pretty easy going so far, but it seems org-capture adds newlines, which
> I think it should not do.
>
> My (test) capture-template is:
>
> (("t" "Todo" entry
>  (file "~/.outlet/GTD.org")
>  "* TODO %?" :prepend t :empty-lines 0)
>
> with the intention of inserting the captured task on the
> first line of the file ~/.outlet/GTD.org. What happens when I capture
> an task is this:
>
> <beginning of file>
>
> * TODO Captured task
>
> <original first line of file here>
> ....
>
> Both before and after the task is a newline. Also, when capturing and
> cancelling the capture with C-c C-k the newlines remain whereas the
> task is removed.
2010-10-26 06:34:16 +02:00
Eric Schulte 62dbf404f5 ob-clojure: fixed error message when clojure binary is not found
* lisp/ob-clojure.el (org-babel-clojure-babel-clojure-cmd): fixed
  error message when clojure binary is not found
2010-10-25 11:12:49 -06:00
Carsten Dominik 25d365a373 Fix table alignment for the docbook exporter
* lisp/org-html.el (org-format-table-html): New argument DOCBOOK.
(org-format-org-table-html): New argument DOCBOOK.  When set, use
align instead of class to align table fields.
* lisp/org-docbook.el (org-export-as-docbook): Specify the docbook argument
for the table converter.
2010-10-25 15:40:30 +02:00
Carsten Dominik 23812f9cf1 Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode 2010-10-25 13:27:41 +02:00
Carsten Dominik cee354c5b4 Update freemind converter
* lisp/org-macs.el (org-called-interactively-p): New macro.
* lisp/org-freemind.el: No longer require 'rx.
(org-freemind): New customization group, use it for all the variables.
(org-export-as-freemind): Add docstring.
(org-freemind-show): Improve filen naming.
(org-freemind-convert-links-helper): New function.
(org-freemind-bol-helper-base-indent): New variable.
(org-freemind-bol-helper): New function.
(org-freemind-node-css-style): New option.
(org-freemind-node-pattern): New variable.
(org-freemind-from-org-mode): Better docstring.
2010-10-25 13:27:32 +02:00
Carsten Dominik 6d44fef50a Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode 2010-10-25 10:06:01 +02:00
Carsten Dominik 8bbc3ab3ad HTML Export: Add some default classes for text alignment
Proposal by Sebastian Rose.
2010-10-25 08:41:18 +02:00
David Maus f70943cafc Don't pass more than two arguments to mapc
* ob-haskell.el (org-babel-variable-assignments:haskell): Don't pass
more than two arguments to mapc.
2010-10-24 20:51:24 +02:00
David Maus 095f9e298f Declare to silence byte compiler
* ob.el (org-babel-ref-resolve): Declare to silence byte compiler.
2010-10-24 20:45:26 +02:00
David Maus 671115426a Defvar to silence byte compiler
* org-footnote.el (message-signature-separator): Defvar to silence
byte compiler.
2010-10-24 20:43:44 +02:00
David Maus 9e8b867c77 Fix reference to wrong symbol
* org-exp.el (org-export-string): Fix reference to wrong symbol.
2010-10-24 20:41:26 +02:00
Jambunathan K c1b8f41c37 Return 'dedicated on match when search must match exact headline
* org.el (org-link-search): Return 'dedicated on successful match when
org-link-search-must-match-exact-headline is set to t.
2010-10-24 20:35:44 +02:00
Daniel Clemente c486572df0 Append fragment to file: links if present
* org-html.el (org-html-make-link): Append fragment to file: links if
present.

Patch by Daniel Clemente
2010-10-24 20:23:27 +02:00
Tassilo Horn 145109dc4a Make footnotes work correctly in message-mode
* lisp/org-footnote.el (org-footnote-create-definition)
(org-footnote-goto-local-insertion-point): Add footnotes before
signature when in message-mode.
2010-10-24 18:19:57 +02:00
Noorul Islam 6e73bcbf44 Minor docstring bug: org-footnote-goto-previous-reference 2010-10-24 18:15:08 +02:00
Carsten Dominik d0f737e9c2 Post-fix for globablvisibility patch
Patch by Michael Brandt
2010-10-24 18:09:24 +02:00
Carsten Dominik d600831eb7 Use better regexp for finding image links
* lisp/org.el (org-display-inline-images): Improve regexp
2010-10-23 14:43:00 +02:00
Carsten Dominik 987beb6277 Use classes to align table data fields 2010-10-23 08:17:29 +02:00
Carsten Dominik 94f2f59a93 Fix startup visibility bug
* lisp/org.el (org-cycle): Make sure resetting to startup visibility
works after another cycle command.

Gez writes:

> I have a query about the C-u C-u TAB command.  When I've just edited
> or used S-TAB (no matter which part of the global cycle it's on) C-u
> C-u TAB works as I would expect.  But if I've just used TAB, C-u C-u
> TAB cycles hrough -> CONTENTS -> SHOW ALL etc, even while the mini
> buffer displays "startup visibility plus VISIBILITY properties" at
> each stage of the cycle. C-u C-u TAB also cycles when it's repeated.
> I find it hard to keep track of whether it will cycle or not while I'm
> using it to view areas of the outline, so in effect, the only way I
> feel sure I can quickly return to my desired startup visibility is
> with S-TAB C-u C-u TAB, which is a lot of keystrokes! So my questions
> are - is this expected behaviour?  Can it be changed?
2010-10-22 18:14:18 +02:00
Eric Schulte e6c9936373 suggesting a new function org-export-string
The attached patch adds a new functions org-export-string.

,----
| org-export-string is a Lisp function in `org-exp.el'.
|
| (org-export-string STRING FMT &optional DIR)
|
| Export STRING to FMT using existing export facilities.
| During export STRING is saved to a temporary file whose location
| could vary.  Optional argument DIR can be used to force the
| directory in which the temporary file is created during export
| which can be useful for resolving relative paths.  Dir defaults
| to the value of `temporary-file-directory'.
`----

This function should be useful in user code, and can already reduce the
amount of code in ob-org.el and org-mime.el.

>From e51017e4d7051aad31384a470f0a695dca0d6716 Mon Sep 17 00:00:00 2001
From: Eric Schulte <schulte.eric@gmail.com>
Date: Sun, 17 Oct 2010 15:17:13 -0600
Subject: [PATCH] org-export-string -- exports a string of org-mode markup text

* lisp/org-exp.el (org-export-string): new function org-export-string
  can be used to convert a string of test in org-mode markup to a
  specified format

* contrib/lisp/org-mime.el (org-mime-htmlize): now using new
  org-export-string function for exportation

* lisp/ob-org.el (org-babel-execute:org): now using new
  org-export-string function for exportation
2010-10-22 06:48:32 -06:00
Carsten Dominik e85eee0624 Fix some issues in inline image display
* lisp/org.el (org-display-inline-images): Allow
non-ASCII characters in image file names.  Save match data.

Patch by Taichi Kawabata
2010-10-22 10:52:46 +02:00
Carsten Dominik a841867856 Update all ++ repeaters in an entry
* lisp/org.el (org-auto-repeat-maybe): Fix shifting multiple time stamps.

See http://www.mail-archive.com/emacs-orgmode@gnu.org/msg30284.html.

Patch by Andrew Korty
2010-10-22 09:57:28 +02:00
Carsten Dominik 9dc28ea0ed Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode 2010-10-22 09:20:05 +02:00
Carsten Dominik ca991d2ad4 HTML export: Improved support for field alignment, including centering
* doc/org.texi: Document the <c> cookie.
* lisp/org-exp.el (org-store-forced-table-alignment):
(org-export-remove-special-table-lines): Allow the "c" cookie for
table alignment.
* lisp/org-html.el (org-export-table-header-tags):
(org-export-table-data-tags): Add another %s format for the alignment.
(org-export-html-table-align-individual-fields): New option.
(org-format-org-table-html): Implement field-by-field alignment and
support centering.
(org-format-table-table-html): Make sure the new table tag formats
don't break this function.
* lisp/org-table.el (org-table-cookie-line-p):
(org-table-align): Allow for the <c> cookie.
* lisp/org.el (org-set-font-lock-defaults): Allow for the <c> cookie.
2010-10-22 09:19:39 +02:00
David Maus 8d85a67deb Skip normalization of plain links that are part of another link
* org-exp.el (org-export-normalize-links): Skip normalization of plain
links that are part of another link.
2010-10-22 06:22:41 +02:00
Dan Davison d8634bab85 babel: R: Fix bug in treatment of :file argument
* ob-R.el (org-babel-expand-body:R): Fix bug in let binding.

This was preventing graphical output from being captured.
2010-10-21 23:29:43 +01:00
Carsten Dominik b0fae37687 Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode 2010-10-21 19:35:09 +02:00
Carsten Dominik e40903a6b6 lisp/org-indent.el: Fix bug in org-indent that changes the selection
* lisp/org-indent.el: (org-indent-add-properties): Use
`with-silent-modificaitons'.
(org-indent-remove-properties): Use `with-silent-modificaitons'.

Julien Danjou writes:

> I'm using org 7.01h with Emacs 24 trunk. When I set org-startup-indented
> to t, I observe the following:
>
> ** TODO Some stuff
>
> I select "stuff" and press M-w. Then I go the the line under and press
> C-y (org-yank).
>
> Now I got:
>
> ** TODO Some stuff
> ** TODO Some
>
> instead of:
>
> ** TODO Some stuff
> stuff
>
> Note that after M-w, `kill-ring' has a correct first entry of "stuff":
>
>   (#("stuff" 0 5
>      (fontified t face org-level-2))
>    ...)
>
> But on C-y (org-yank) something happens, and it paste the wrong text. I
> think it's trying to be smart but it's not.
>
> I've found that setting org-startup-indented to nil fix that behaviour.
2010-10-21 18:26:31 +02:00
Carsten Dominik 5591fb2cde Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode 2010-10-21 16:28:52 +02:00
Carsten Dominik 7712d78ab4 HTML export: Use forced alignment like <l> or <r> in tables
* lisp/org-table.el (org-table-cookie-line-p): Fix indentation.
* lisp/org-exp.el (org-store-forced-table-alignment): New function.
(org-export-preprocess-string): Call `org-store-forced-table-alignment'.
* lisp/org-html.el (org-format-org-table-html): Use stored
alignment information.
2010-10-21 16:28:06 +02:00
Eric Schulte d87e33ea19 babel: ob-execute-src-block respects prefix argument (which forces re-calculation)
* lisp/ob.el (org-babel-execute-src-block): respects prefix argument
  (which forces re-calculation)
2010-10-21 07:50:32 -06:00
Eric Schulte 3fd8d906e4 babel: removed needless param sorting from ob-execute-src-block
* lisp/ob.el (org-babel-execute-src-block): removed needless param
  sorting from ob-execute-src-block, the params are sorted already by
  ob-sha1-hash
2010-10-21 07:44:34 -06:00
Eric Schulte b664510ec4 babel: ensure that info is sorted at the header argument level
* lisp/ob.el (org-babel-sha1-hash): ensure that info is sorted at the
  header argument level
2010-10-21 07:11:13 -06:00
Dan Davison 7c44c8ca7d babel: Make test for identical input more stringent when hashing
* ob.el (org-babel-sha1-hash): Consider words in different
	order as different input.
2010-10-21 07:02:50 -06:00
Dan Davison f2e547c657 babel: Fix check for zero length sequences when constructing hash key
* ob.el (org-babel-sha1-hash): Fix check for zero length
	sequences
2010-10-21 07:02:22 -06:00
Eric Schulte 65217b7fb4 tangle: ensure that full info (with expanded variables) for tangling blocks 2010-10-21 07:00:39 -06:00
Dan Davison db68b1fbf5 babel: Handle non-nested list values in shell
* ob-sh.el (org-babel-sh-var-to-sh): Ensure value has the
	structure of an Org-mode table (list of lists)

Non-nested lists can arise either by explicit assignment,
e.g. :var '(1 2), or by assigning a one-dimensional slice of a table.
2010-10-21 13:06:56 +01:00
Dan Davison 35b0d6b1d4 babel: Fix bug in `org-babel-tangle-collect-blocks'
* ob-tangle.el (org-babel-tangle-collect-blocks): Fix
    bug (reference to unassigned variable `src-lang' and avoid
    calling org-babel-get-src-block-info twice
2010-10-21 13:06:56 +01:00
Eric Schulte 91f8cfaebb ob: ob-demarcate updated to reflect the new info list contents
* lisp/ob.el (org-babel-demarcate-block): updated to reflect the new
  info list contents
2010-10-21 13:06:56 +01:00
Dan Davison 60423d2805 Avoid resolving babel references with C-c '
* org-src.el (org-edit-src-code): Supply non-nil argument to
	`org-babel-get-src-block-info' to avoid resolving variable
	references
2010-10-21 13:06:56 +01:00
Eric Schulte b50125a1ac fixed minor bug in and improved efficiency of org-babel-map-src-blocks
* lisp/ob.el (org-babel-map-src-blocks): fixed minor bug in and
  improved efficiency of org-babel-map-src-blocks
2010-10-21 13:06:56 +01:00
Eric Schulte 5bdc043919 careful not to needlessly execute blocks during tangling
* lisp/ob-tangle.el (org-babel-tangle-collect-blocks): now explicitly
  checks that a code block will actually be tangled before collecting
  it's full information (a process which could involve the execution
  of other code blocks)
2010-10-21 13:06:55 +01:00
Dan Davison 4247150094 babel: Don't resolve variable references during `org-babel-demarcate-block'
* ob.el (org-babel-demarcate-block): Use light version of
	`org-babel-get-src-block-info'
2010-10-21 13:06:55 +01:00
Eric Schulte 24cde316a1 beefing up the docs of the org-babel-tangle-comment-format-* variables 2010-10-21 13:06:55 +01:00
Eric Schulte e905dbe0f6 babel hashing now handles more complex types in params
* lisp/ob.el (org-babel-sha1-hash): now handles more complex types in
  params
* testing/examples/babel.org: whitespace
* testing/lisp/test-ob.el (test-org-babel/sha1-hash): new test for
  babel hashing
2010-10-21 13:06:55 +01:00
Eric Schulte cea9fd7421 sanding off some rough corners left by the reworking of process-params
* lisp/ob.el (org-babel-execute-src-block): generally using the new
  more informative params
  (org-babel-process-params): don't forget the :var portion of
  variable assignments
2010-10-21 13:06:55 +01:00
Eric Schulte c60e09eaa4 ob-table: simplified to reflect to var resolution
* lisp/ob-table.el (sbe): simplified to reflect to var resolution
2010-10-21 13:06:55 +01:00
Eric Schulte 8562273b27 ob-ref: don't forget arguments to referenced code blocks
* lisp/ob-ref.el (org-babel-ref-resolve): bringing the referent
  arguments back to their params before evaluation
2010-10-21 13:06:55 +01:00
Eric Schulte dc9401f95b ob-ref: cleanup of variable usage and indentation
* lisp/ob-ref.el (org-babel-ref-resolve): cleanup of variable usage
and indentation
2010-10-21 13:06:55 +01:00
Dan Davison a5ac523ec9 babel: Update sbe macro to new parameter processing
* ob-table.el (sbe): Use `org-babel-process-params params'
	instead of `org-babel-expand-variables'.
2010-10-21 13:06:54 +01:00
Dan Davison 369cf54146 babel:removing calls to ob-process-params, and updating use of results
* lisp/ob-C.el (org-babel-C-execute): removing call to
      org-babel-process-params which should no longer be called from
      within a language file
    * lisp/ob-R.el (org-babel-execute:R): removing call to
      org-babel-process-params which should no longer be called from
      within a language file
      (org-babel-R-variable-assignments): removing call to
      org-babel-process-params which should no longer be called from
      within a language file
    * lisp/ob-asymptote.el (org-babel-execute:asymptote): removing call to
      org-babel-process-params which should no longer be called from
      within a language file
    * lisp/ob-clojure.el (org-babel-execute:clojure): removing call to
      org-babel-process-params which should no longer be called from
      within a language file
    * lisp/ob-dot.el (org-babel-execute:dot): removing call to
      org-babel-process-params which should no longer be called from
      within a language file
    * lisp/ob-emacs-lisp.el (org-babel-expand-body:emacs-lisp): removing
      call to org-babel-process-params which should no longer be called
      from within a language file
      (org-babel-execute:emacs-lisp): removing call to
      org-babel-process-params which should no longer be called from
      within a language file
    * lisp/ob-haskell.el (org-babel-execute:haskell): removing call to
      org-babel-process-params which should no longer be called from
      within a language file
    * lisp/ob-js.el (org-babel-execute:js): removing call to
      org-babel-process-params which should no longer be called from
      within a language file
    * lisp/ob-lisp.el (org-babel-execute:lisp): removing call to
      org-babel-process-params which should no longer be called from
      within a language file
    * lisp/ob-ocaml.el (org-babel-execute:ocaml): removing call to
      org-babel-process-params which should no longer be called from
      within a language file
    * lisp/ob-octave.el (org-babel-execute:octave): removing call to
      org-babel-process-params which should no longer be called from
      within a language file
    * lisp/ob-perl.el (org-babel-execute:perl): removing call to
      org-babel-process-params which should no longer be called from
      within a language file
    * lisp/ob-python.el (org-babel-execute:python): removing call to
      org-babel-process-params which should no longer be called from
      within a language file
    * lisp/ob-ruby.el (org-babel-execute:ruby): removing call to
      org-babel-process-params which should no longer be called from
      within a language file
    * lisp/ob-scheme.el (org-babel-execute:scheme): removing call to
      org-babel-process-params which should no longer be called from
      within a language file
    * lisp/ob-screen.el (org-babel-execute:screen): removing call to
      org-babel-process-params which should no longer be called from
      within a language file
      (org-babel-prep-session:screen): removing call to
      org-babel-process-params which should no longer be called from
      within a language file
    * lisp/ob-sh.el (org-babel-execute:sh): removing call to
      org-babel-process-params which should no longer be called from
      within a language file
    * lisp/ob-sql.el (org-babel-execute:sql): removing call to
      org-babel-process-params which should no longer be called from
      within a language file
    * ob-haskell.el (org-babel-execute:haskell): Remove reference
      to processed params
    * ob-clojure.el (org-babel-execute:clojure): Remove reference
      to processed params
    * ob-R.el (org-babel-execute:R): Remove reference to processed
      params
2010-10-21 13:06:54 +01:00
Dan Davison 542f77d3f5 babel: sql: Use generic expansion function
* ob-sql.el (org-babel-execute:sql): Use generic expansion
	function
	(org-babel-expand-body:sql): Delete function
2010-10-21 13:06:03 +01:00
Dan Davison 07c84b293c babel: shell: New variable assignment and expansion scheme
* ob-sh.el (org-babel-execute:sh): Use generic expansion
	function
	(org-babel-expand-body:sh): Delete function
	(org-babel-prep-session:sh): Change name of called function
	(org-babel-variable-assignments:sh): Change function name
2010-10-21 13:06:03 +01:00
Dan Davison 19081f12f7 babel: screen: New variable assignment and expansion scheme
* ob-screen.el (org-babel-execute:screen): Use generic
	expansion function
	(org-babel-expand-body:screen): Delete function
	(org-babel-prep-session:screen): Remove references to
	processed params
2010-10-21 13:06:03 +01:00
Dan Davison c1ad98ae0e babel: sass: Use generic expansion function
* ob-sass.el (org-babel-execute:sass): Use generic expansion
	function
	(org-babel-expand-body:sass): Delete function
2010-10-21 13:06:03 +01:00
Dan Davison 2fc9b08a23 babel: ruby: New variable assignment and expansion scheme
* ob-ruby.el (org-babel-execute:ruby): Use generic expansion
	function
	(org-babel-prep-session:ruby): Use new variable assignment
	function
	(org-babel-variable-assignments:ruby): New function
	(org-babel-expand-body:ruby): Delete function
2010-10-21 13:06:03 +01:00
Dan Davison 2699f4e9bc babel: python: New variable assignment and expansion scheme
* ob-python.el (org-babel-execute:python): Use generic
	expansion function
	(org-babel-prep-session:python): Change name of called function
	(org-babel-variable-assignments:python): Change function name
	(org-babel-expand-body:python): Delete function
2010-10-21 13:06:03 +01:00
Dan Davison 33f836e701 babel: plantuml: Delete unnecessary language-specific expansion function
* ob-plantuml.el (org-babel-expand-body:plantuml): Delete
    function (automatically handled by generic version)
2010-10-21 13:06:02 +01:00
Dan Davison 84dd553936 babel: perl: New variable assignment and expansion scheme
* ob-perl.el (org-babel-execute:perl): Use generic expansion
	function
	(org-babel-expand-body:perl): Delete function
	(org-babel-variable-assignments:perl): New function
2010-10-21 13:06:02 +01:00
Dan Davison ee5d7af7b9 babel: org: Delete unnecessary language-specific expansion function
* ob-org.el (org-babel-expand-body:org): Delete
    function (automatically handled by generic version)
2010-10-21 13:06:02 +01:00
Dan Davison 58a24fa325 babel: octave and matlab: New variable assignment and expansion scheme
* ob-octave.el (org-babel-execute:octave): Use generic
	expansion function
	(org-babel-variable-assignments:octave): Change name of
	function
	(org-babel-variable-assignments:matlab): New defalias
	(org-babel-prep-session:octave): Change name of function
	(org-babel-expand-body:matlab): Delete function
	(org-babel-expand-body:octave): Delete function
2010-10-21 13:06:02 +01:00
Dan Davison 590fae34e1 babel: ocaml: New variable assignment and expansion scheme
* ob-ocaml.el (org-babel-execute:ocaml): Use generic expansion
	function
	(org-babel-variable-assignments:ocaml): New function
	(org-babel-expand-body:ocaml): Delete function
2010-10-21 13:06:02 +01:00
Dan Davison 42ddb16dbf babel: mscgen: Delete unnecessary language-specific expansion function
* ob-mscgen.el (org-babel-expand-body:mscgen): Delete
    function (automatically handled by generic version)
2010-10-21 13:06:02 +01:00
Dan Davison 67fd5e730e babel: javascript: New variable assignment and expansion scheme
* ob-js.el (org-babel-execute:js): Use new variable assignment
	function
	(org-babel-expand-body:js): Delete function
	(org-babel-prep-session:js): Use new variable assignment
	function
	(org-babel-variable-assignments:js): New function
2010-10-21 13:06:02 +01:00
Dan Davison 1ab30746dc babel: haskell: New variable assignment scheme
* ob-haskell.el (org-babel-execute:haskell): Use generic
	expansion function
	(org-babel-expand-body:haskell): Delete function
	(org-babel-prep-session:haskell): Use variable assignment function
	(org-babel-variable-assignments:haskell): New function
2010-10-21 13:06:02 +01:00
Dan Davison 02a10a2bdb babel: gnuplot: New variable assignment scheme
* ob-gnuplot.el (org-babel-expand-body:gnuplot): Use variable
	assignment function
	(org-babel-prep-session:gnuplot): Use variable assignment
	function
	(org-babel-variable-assignments:gnuplot): New function
2010-10-21 13:06:02 +01:00
Dan Davison b24139309d babel: ditaa: Delete unnecessary language-specific expansion function
* ob-ditaa.el (org-babel-expand-body:ditaa): Delete
    function (automatically handled by generic version)
2010-10-21 13:06:01 +01:00
Dan Davison b4cded9221 babel: css: Delete unnecessary language-specific expansion function
* ob-css.el (org-babel-expand-body:css): Delete
	function (automatically handled by generic version)
2010-10-21 13:06:01 +01:00
Dan Davison 4eee123e17 babel: asymptote: New variable assignment scheme
* ob-asymptote.el (org-babel-execute:asymptote): Use generic
	expansion function
	(org-babel-expand-body:asymptote): Delete function
	(org-babel-variable-assignments:asymptote): New function
2010-10-21 13:06:01 +01:00
Dan Davison e3d9d21802 babel: R: New variable assignment scheme
* ob-R.el (org-babel-expand-body:R): Use new function
	`org-babel-variable-assignments:R'; don't trim body.
	(org-babel-execute:R): Respond to changes in
	`org-babel-expand-body:R'
	(org-babel-prep-session:R): Called function is now named
	`org-babel-variable-assignments:R'
	(org-babel-variable-assignments:R): Receives processed-params
	as new optional argument
2010-10-21 13:06:01 +01:00
Dan Davison 86418567cd babel: C: Don't trim body when expanding
* ob-C.el (org-babel-C-expand): Don't trim body
2010-10-21 13:06:01 +01:00
Dan Davison bdbc4961c8 babel: scheme: Fix bug in obtaining variable references
* ob-scheme.el (org-babel-expand-body:scheme): Fix bug in
	obtaining variable references
2010-10-21 13:06:01 +01:00
Dan Davison a6720e38a3 babel: tangle: Respond to changes in generic expansion function
* ob-tangle.el (org-babel-tangle-collect-blocks): Supply
	variable assignment lines to generic expansion command
2010-10-21 13:06:01 +01:00
Dan Davison 83332fb69c babel: New version of generic expansion function
* ob.el (org-babel-expand-src-block): Supply variable
	assignment lines to generic expansion function
	(org-babel-expand-body:generic): Prepend body with optional
	variable assignment lines
2010-10-21 13:06:01 +01:00
Eric Schulte 43c712fccb unifying ob-process-params and ob-expand-variables
* lisp/ob-exp.el (org-babel-exp-results): replaced old function call

* lisp/ob-lob.el (org-babel-lob-execute): replaced old function call

* lisp/ob-ref.el (org-babel-ref-parse): removed obsolete optional
  params argument, also no longer chokes when handed an
  already-resolved reference

  (org-babel-ref-resolve): removed obsolete optional params argument

* lisp/ob.el (org-babel-ref-parse): updated function declaration
  (org-babel-get-src-block-info): replaced old function call
  (org-babel-header-arg-names): indentation
  (org-babel-execute-src-block): now expanding all parameters using
  the newly combined org-babel-process-params
  (org-babel-switch-to-session-with-code): indentation
  (org-mode-hook): indentation
  (org-babel-process-params): now packages all results into the
  parameter alist and does variable expansion, this should no longer
  be called from inside of language functions
  (org-babel-expand-noweb-references): updated function call for newly
  removed obsolete function parameter
2010-10-21 13:06:01 +01:00
Eric Schulte fd97cb9386 ob-lob: now working with the new variable resolution setup
* lisp/ob-lob.el (org-babel-lob-execute): now expanding variable
  references before execution

* lisp/ob.el (org-babel-merge-params): better indentation, and finally
  sorted out the proper replacement of conflicting variable
  definitions
2010-10-21 13:06:00 +01:00
Eric Schulte 71d50277b5 ob: only sort parameters if it's required for caching
* lisp/ob.el (org-babel-execute-src-block): only sort parameters if
  it's required for caching
2010-10-21 13:06:00 +01:00
Eric Schulte 1412447d61 babel evaluation once again working in tables
* lisp/ob-table.el (sbe): reworking for better indentation and to
  integrate the new variable resolution
2010-10-21 13:06:00 +01:00
Eric Schulte 9587cdc0d0 ob-ref: now expanding variables when resolving references
* lisp/ob-ref.el (org-babel-ref-resolve-reference): now expanding
  variables when resolving references
2010-10-21 13:06:00 +01:00
Eric Schulte 1aed27c104 ob-merge-params: fixed order or precedence for variables
* lisp/ob.el (org-babel-merge-params): fixed order or precedence for
  variables
2010-10-21 13:06:00 +01:00
Eric Schulte 2ddcf9e255 removing obsoleted optional third argument from org-babel-expand-body:LANG
* lisp/ob-C.el (org-babel-expand-body:c++): removing obsoleted
  optional third argument
  (org-babel-expand-body:c++): removing obsoleted optional third
  argument
  (org-babel-C-expand): removing obsoleted optional third argument
* lisp/ob-R.el:
  (org-babel-expand-body:R): removing obsoleted optional third
  argument
  (org-babel-execute:R): removing obsoleted optional third argument
  (org-babel-R-variable-assignments): removing obsoleted optional
  third argument
* lisp/ob-asymptote.el:
  (org-babel-expand-body:asymptote): removing obsoleted optional third
  argument
  (org-babel-execute:asymptote): removing obsoleted optional third
  argument
* lisp/ob-clojure.el:
  (org-babel-expand-body:clojure): removing obsoleted optional third
  argument
  (org-babel-execute:clojure): removing obsoleted optional third
  argument
* lisp/ob-css.el:
  (org-babel-expand-body:css): removing obsoleted optional third
  argument
* lisp/ob-ditaa.el:
  (org-babel-expand-body:ditaa): removing obsoleted optional third
  argument
* lisp/ob-dot.el:
  (org-babel-expand-body:dot): removing obsoleted optional third
  argument
  (org-babel-execute:dot): removing obsoleted optional third argument
* lisp/ob-emacs-lisp.el:
  (org-babel-expand-body:emacs-lisp): removing obsoleted optional
  third argument
  (org-babel-execute:emacs-lisp): removing obsoleted optional third
  argument
* lisp/ob-gnuplot.el:
  (org-babel-expand-body:gnuplot): removing obsoleted optional third
  argument
* lisp/ob-haskell.el:
  (org-babel-expand-body:haskell): removing obsoleted optional third
  argument
  (org-babel-execute:haskell): removing obsoleted optional third
  argument
  (org-babel-load-session:haskell): removing obsoleted optional third
  (org-babel-prep-session:haskell): removing obsoleted optional third
* lisp/ob-js.el:
  (org-babel-expand-body:js): removing obsoleted optional third
  argument
  (org-babel-execute:js): removing obsoleted optional third argument
* lisp/ob-latex.el:
  (org-babel-expand-body:latex): removing obsoleted optional third
  argument
* lisp/ob-lisp.el:
  (org-babel-expand-body:lisp): removing obsoleted optional third
  argument
  (org-babel-execute:lisp): removing obsoleted optional third argument
* lisp/ob-mscgen.el:
  (org-babel-expand-body:mscgen): removing obsoleted optional third
  argument
* lisp/ob-ocaml.el:
  (org-babel-expand-body:ocaml): removing obsoleted optional third
  argument
  (org-babel-execute:ocaml): removing obsoleted optional third
  argument
* lisp/ob-octave.el:
  (org-babel-expand-body:matlab): removing obsoleted optional third
  argument
  (org-babel-expand-body:octave): removing obsoleted optional third
  argument
  (org-babel-execute:octave): removing obsoleted optional third
  argument
  (org-babel-octave-variable-assignments): removing obsoleted optional
  third
* lisp/ob-org.el:
  (org-babel-expand-body:org): removing obsoleted optional third
  argument
* lisp/ob-perl.el:
  (org-babel-expand-body:perl): removing obsoleted optional third
  argument
  (org-babel-execute:perl): removing obsoleted optional third argument
* lisp/ob-plantuml.el:
  (org-babel-expand-body:plantuml): removing obsoleted optional third
  argument
* lisp/ob-python.el:
  (org-babel-expand-body:python): removing obsoleted optional third
  argument
  (org-babel-execute:python): removing obsoleted optional third
  argument
  (org-babel-python-variable-assignments): removing obsoleted optional
  third
* lisp/ob-ruby.el:
  (org-babel-expand-body:ruby): removing obsoleted optional third
  argument
  (org-babel-execute:ruby): removing obsoleted optional third argument
* lisp/ob-sass.el:
  (org-babel-expand-body:sass): removing obsoleted optional third
  argument
* lisp/ob-scheme.el:
  (org-babel-expand-body:scheme): removing obsoleted optional third
  argument
  (org-babel-execute:scheme): removing obsoleted optional third
  argument
* lisp/ob-screen.el:
  (org-babel-expand-body:screen): removing obsoleted optional third
  argument
* lisp/ob-sh.el:
  (org-babel-expand-body:sh): removing obsoleted optional third
  argument
  (org-babel-execute:sh): removing obsoleted optional third argument
  (org-babel-sh-variable-assignments): removing obsoleted optional
  third
* lisp/ob-sql.el:
  (org-babel-expand-body:sql): removing obsoleted optional third
  argument
* lisp/ob-sqlite.el:
  (org-babel-expand-body:sqlite): removing obsoleted optional third
  argument
  (org-babel-execute:sqlite): removing obsoleted optional third
  argument
* lisp/ob.el:
  (org-babel-expand-body:generic): removing obsoleted optional third
  argument
2010-10-21 13:06:00 +01:00
Eric Schulte f16c46c856 babel: purging all calls to removed org-babel-ref-variables
* lisp/ob-clojure.el (org-babel-prep-session:clojure): purging all
  calls to removed org-babel-ref-variables

* lisp/ob-gnuplot.el (org-babel-gnuplot-process-vars): purging all
  calls to removed org-babel-ref-variables

* lisp/ob-ruby.el (org-babel-prep-session:ruby): purging all calls to
  removed org-babel-ref-variables

* lisp/ob-scheme.el (org-babel-prep-session:scheme): purging all calls
  to removed org-babel-ref-variables

* lisp/ob-sqlite.el (org-babel-expand-body:sqlite): purging all calls
  to removed org-babel-ref-variables

  (org-babel-execute:sqlite): purging all calls to removed
  org-babel-ref-variables
2010-10-21 13:06:00 +01:00
Eric Schulte 832dc71f31 ob-lob: now working with the new ob-get-src-block-info
ob-get-src-block-info wasn't correctly returning the name of the
  code block

* lisp/ob-lob.el (org-babel-lob-ingest): now returns the count of
  ingested code blocks

* lisp/ob.el (org-babel-get-src-block-info): walks up possible
  additional header arg lines before checking for the code block name

  (org-babel-merge-params): can now handle empty variables gracefully
2010-10-21 13:06:00 +01:00
Eric Schulte 9931dae20a babel: exporting now working with the new ob-get-src-block-info schema
includes a simple export test

* lisp/ob-exp.el (org-babel-exp-in-export-file): wrapper for
  collecting information from within the original export file

  (org-babel-exp-src-blocks): simplified through use of the above
  macro

  (org-babel-exp-code): simplified through the use of new functions
  for parsing header arguments

  (org-babel-exp-results): simpler high-level organization, also this
  is now where the expansion of variable references takes place during
  export

* lisp/ob.el (org-babel-expand-variables): broke variable replacement
  in a parameter list into it's own function

  (org-babel-get-src-block-info): now using the above function
2010-10-21 13:05:59 +01:00
Eric Schulte 9ba9ef99a6 babel: now allows multi-line header arguments with #+headers: before code block
for example, from the test of this functionality
* multi-line header arguments
  :PROPERTIES:
  :ID:       b77c8857-6c76-4ea9-8a61-ddc2648d96c4
  :END:

  (map 'list #'list numbers letters)

| 1 | a |
| 2 | b |
| 3 | c |
| 4 | d |
| 5 | e |
| 6 | f |
| 7 | g |

* lisp/ob.el (org-babel-multi-line-header-regexp): new variable for
  matching header lines preceding code blocks

  (org-babel-src-name-w-name-regexp): now includes possible header
  lines between source name and code block

  (org-babel-get-src-block-info): now also collecting header arguments
  from preceding header lines

  (org-babel-src-block-names): updated match-string to reflect new
  value of org-babel-src-name-w-name-regexp

  (org-babel-merge-params): fixed error in variable string regexp
2010-10-21 13:05:59 +01:00
Eric Schulte 05054d5227 ensure ob-get-src-block-info returns nil if not matches
* lisp/ob.el (org-babel-get-src-block-info): small but crucial fix,
  this should return nil if not match found
2010-10-21 13:05:59 +01:00
Eric Schulte 529e7c98fd nominally working 2010-10-21 13:05:59 +01:00
Eric Schulte 9c0aae1814 more lightening -- resolving foreign functions between ob-ref and ob 2010-10-21 13:05:59 +01:00
Eric Schulte 539c804457 ob-emacs-lisp: whitespace cleanup <=80 columns
* lisp/ob-emacs-lisp.el (org-babel-expand-body:emacs-lisp): whitespace
  (org-babel-execute:emacs-lisp): whitespace
2010-10-21 13:05:58 +01:00
Eric Schulte c2dce939e8 more lightening 2010-10-21 13:05:58 +01:00
Dan Davison 07b45a64f2 Missing parenthesis 2010-10-21 13:05:58 +01:00
Dan Davison a06ea76c53 babel: Provide missing docstrings
* ob-sh.el (org-babel-sh-variable-assignments):
	Provide missing docstring
	* ob-python.el (org-babel-python-variable-assignments):
	Provide missing docstring
2010-10-21 13:05:58 +01:00
Dan Davison a59c4d7896 babel: octave: Fix variable assignments made by `org-babel-prep-session:octave'
* ob-octave.el (org-babel-expand-body:octave): Refactor: break variable
    assignment part out into a separate function
    (org-babel-octave-variable-assignments): New function constructing
    list of variable assignment statements
    (org-babel-prep-session:octave): Use new function
    `org-babel-octave-variable-assignments' instead of previous
    (incorrect) variable assignment code.
2010-10-21 13:05:58 +01:00
Dan Davison 8e151c066e babel: sh: Fix variable assignments made by `org-babel-prep-session:sh'
* ob-sh.el (org-babel-expand-body:sh): Refactor: break variable
    assignment part out into a separate function
    (org-babel-sh-variable-assignments): New function constructing
    list of variable assignment statements
    (org-babel-prep-session:sh): Use new function
    `org-babel-sh-variable-assignments' instead of previous
    (incorrect) variable assignment code.
2010-10-21 13:05:58 +01:00
Dan Davison 24a5f8b4e5 babel: python: Fix variable assignments made by `org-babel-prep-session:python'
* ob-python.el (org-babel-expand-body:python): Refactor: break variable
    assignment part out into a separate function
    (org-babel-python-variable-assignments): New function constructing
    list of variable assignment statements
    (org-babel-prep-session:python): Use new function
    `org-babel-python-variable-assignments' instead of previous
    (incorrect) variable assignment code.
2010-10-21 13:05:58 +01:00
Dan Davison 1bc914cd7a babel: R: Fix variable assignments made by `org-babel-prep-session:R'
* ob-R.el (org-babel-expand-body:R): Refactor: break variable
    assignment part out into a separate function
    (org-babel-R-variable-assignments): New function constructing
    list of variable assignment statements
    (org-babel-prep-session:R): Use new function
    `org-babel-R-variable-assignments' instead of previous
    (incorrect) variable assignment code.
2010-10-21 13:05:58 +01:00
Dan Davison 21e6738593 babel: Better variable names in `org-babel-initiate-session'
* ob.el (org-babel-initiate-session): Better variable names
2010-10-21 13:03:36 +01:00
Dan Davison 68b810dab5 Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode 2010-10-21 13:03:09 +01:00
Eric Schulte e290e9e2f4 fixed some compilation warnings
* lisp/ob.el (org-number-sequence): declared
* lisp/ob-R.el (org-number-sequence): declared
2010-10-20 14:49:41 -06:00
Christian Egli 9542f8fa98 Fix an error in org-taskjuggler-get-unique-id
Don't try to pop from an empty list and downcase the result
2010-10-20 14:07:17 +02:00
Dan Davison 92531f3049 typo in variable name: org-inlinetask-defaut-state 2010-10-20 14:06:59 +02:00
Carsten Dominik 33f947dcb5 Fix typos 2010-10-20 07:36:48 +02:00
Dan Davison ba9236054a babel: Bug fix in `org-babel-map-src-blocks'
* ob.el (org-babel-map-src-blocks): Store correct value of `end-block'
2010-10-19 13:20:35 +01:00
Dan Davison a6d30d3b9b babel: New function to mark the body of a src block.
* ob.el (org-babel-mark-block): New function to mark the body
    of a src block in the style of `mark-defun'.

    * ob-keys.el (org-babel-key-bindings): Bind
    `org-babel-mark-block' to C-c C-v C-M-h
2010-10-19 13:19:33 +01:00
Carsten Dominik c5a8bc9db4 Improve XEmacs compatibility
* lisp/org-compat.el (org-number-sequence): New function.
* lisp/ob-R.el (org-babel-expand-body:R): Use `org-number-sequence'.
* lisp/ob.el (org-babel-where-is-src-block-result): Use `org-number-sequence'.
(org-babel-current-buffer-properties): Fix variable definition.
* lisp/ob-ref.el (org-babel-ref-index-list): Use `org-number-sequence'.
* lisp/ob-latex.el (org-babel-latex-tex-to-pdf): Use the 2-argument version
of `shell-command'.
* lisp/org-latex.el (org-export-as-pdf): Use the 2-argument version
of `shell-command'.
2010-10-18 14:23:38 +02:00
Carsten Dominik c41409c530 Enhance XEmacs compatibility
* lisp/org-list.el (org-list-search-unenclosed-generic): Replace call
to booleanp.

* lisp/org-compat.el (org-decompose-region): New defsubst.
* lisp/org.el (org-toggle-pretty-entities):
(org-unfontify-region): Use `org-decompose-region'.
2010-10-17 18:39:26 +02:00
Carsten Dominik c9bb51e883 Make it configurable wether agenda jumping prefers the future
* lisp/org.el (org-agenda-jump-prefer-future): New option.
* lisp/org-agenda.el (org-agenda-goto-date): Use
`org-agenda-jump-prefer-future'.
2010-10-17 08:32:23 +02:00
Noorul Islam f5918bdcc0 LaTeX export: use org-export-latex-hyperref-format
* lisp/org-latex.el (org-export-latex-links) : Replaced hard coded
hyperref format with custom
  variable `org-export-latex-hyperref-format'

On Sat, Oct 16, 2010 at 3:32 PM, Guy Wiener <wiener.guy@gmail.com> wrote:
> I found the following weird thing in org-latex, and I think it is a bug:
> The customization option "org-export-latex-hyperref-format" is suppose to
> render links to hyperrefs in the exported tex file. However, in
> org-latex.el, lines 1889 and 1892, the string "\\hyperref[%s]{%s}" is
> hard-coded, so that the link export format is not reallycustomizable. I
> replaced this string with the custom variable and the option works as
> expected - I.e., changing the option chanced the format of exported links.

Looks like commit cae0c63c48 has introduced
new customizable variable org-export-latex-hyperref-format but left
out some places
in the code to be replaced. Attached is the patch.

Log:

Found by  Guy Wiener <wiener.guy@gmail.com>

Thanks and Regards
Noorul
2010-10-17 07:39:34 +02:00
Carsten Dominik df5894cdcb Fix docstring of `org-insert-heading'
* lisp/org.el (org-insert-heading): Fix docstring.
2010-10-16 07:30:00 +02:00
Carsten Dominik a2c342308d Fix placing capture items at beginning of buffer.
* lisp/org-capture.el (org-capture-place-entry): If the first
line is already a headline, just stay there.

Patch by THomas Fuchs.
TINYCHANGE

> I'm trying to capture and file an entry as an top-level entry as first entry

> in an org file without config at the beginning (no "#+").
> This leads to filing the entry as _second_ headline in the org file.

> The template is:
> ("z" "test" entry (file "~/Data/z.org") "* %^{Note} %t  :NOTE:\n %?"
> :prepend t)
>
> I think this is due to jumping over lines starting with "#+" at the
> beginning of the org file
> (line 715 in org-capture.el (org-capture-place-entry)).
> My file has no config header and starts with the first headline. Calling
> outline-next-heading
> in this situation leads to jumping to the second headline in the file.
2010-10-16 07:17:00 +02:00
Eric Schulte c9b017632e ob-sh: no longer fails on empty results
* lisp/ob-sh.el (org-babel-sh-evaluate): no longer assumes that
  results are non-nil
2010-10-15 09:25:33 -06:00
Carsten Dominik f66f0430d8 ASCII export: swallow {} after entity macro
* lisp/org-ascii.el (org-ascii-replace-entities): Match an optional {}
after an entity.
2010-10-15 09:39:42 +02:00
Carsten Dominik 935c310402 Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode 2010-10-15 08:46:22 +02:00
Carsten Dominik 397880bcde Fix special character bug in `orgtbl-to-html'
* lisp/org-table.el (orgtbl-to-html): Apply `org-html-expand' to the
table fields.
2010-10-15 08:22:29 +02:00
Carsten Dominik bf8d076bb5 When on the headline of an inline task, insert another inline tasks
* lisp/org.el (org-insert-heading): When on the headline of an inline
task, insert another inline tasks.
2010-10-15 07:51:54 +02:00
Eric Schulte d32c8d49e5 ob-tangle: only create links for blocks that will actually tangle
this commit includes a unit test

* lisp/ob-tangle.el (org-babel-tangle-collect-blocks): only create
  links for blocks that will actually tangle
2010-10-14 17:15:11 -06:00
Eric Schulte b04265eabc ob-sh: don't insert extra newlines in the beginning of the body
* lisp/ob-sh.el (org-babel-expand-body:sh): don't insert extra
  newlines in expanded shell bodies
2010-10-14 08:10:23 -06:00
Eric Schulte 19785d667f ob: keep max line with at <=80
* lisp/ob.el (org-babel-params-from-properties): max line with at <=80
2010-10-14 07:17:08 -06:00
Eric Schulte f7169697eb Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode 2010-10-14 07:14:14 -06:00
Eric Schulte c0018bc3a9 recognize clojure as a lisp in `org-export-latex-listings-langs'
* lisp/org-latex.el (org-export-latex-listings-langs): clojure is now
  recognized as a lisp
2010-10-14 07:13:42 -06:00
Dan Davison edaa4d7a6f babel: Allow header arguments set in properties to be lisp forms
* ob.el (org-babel-params-from-properties): Use
	`org-babel-read' to interpret property as header
	argument value
2010-10-14 13:15:39 +01:00
Dan Davison 82429ef406 babel: Simplify reading of header argument values
* ob.el (org-babel-parse-header-arguments): Simplify reading
	of header arg value
2010-10-14 13:15:29 +01:00
Carsten Dominik d5d96f612e Improve docstring for org-publish-project-alist 2010-10-14 14:12:37 +02:00
Carsten Dominik 9f5c6557f2 Add publishing functions for ASCII, Latin-1 and UTF-8
* lisp/org-publish.el (org-publish-org-to-ascii):
(org-publish-org-to-latin1):
(org-publish-org-to-utf8): New functions.

* doc/org.texi (Publishing action): Document the new publishing functions.

Thanks to Matthias Danzl for showing how to do this.
2010-10-14 13:51:23 +02:00
Carsten Dominik 19d695ef8f Fix heading insertion with C-RET when inline tasks are involved
* lisp/org.el (org-insert-heading): Skip inline tasks when trying to
insert a new heading after the end of the subtree.
2010-10-14 11:03:47 +02:00
Carsten Dominik d44f065c08 Keep byte compiler happy 2010-10-14 10:36:21 +02:00
Carsten Dominik 575e502a53 Keep byte compiler happy 2010-10-14 10:30:43 +02:00
Carsten Dominik e101ec0c8e Fix headline insertion after inline task
* lisp/org-inlinetask.el (org-inlinetask-min-level): Set customization
type to integer or nil.
* lisp/org.el (org-insert-heading): When after an inline task, do not
use level but go back to headline level before the inline task
2010-10-14 10:29:56 +02:00
Carsten Dominik f5152e03a1 Fix indentation of text in inline tasks
* lisp/org-inlinetask.el (org-inlinetask-in-task-p): New function.
* lisp/org.el (org-indent-line-function): Fix indentation of inline tasks

Patch by Nicolas Goaziou
2010-10-14 10:16:06 +02:00
Carsten Dominik 79e8552ed3 Fix typo in customize type of variable `org-activate-link'
* lisp/org.el (org-activate-links): Fix customize type.
2010-10-14 10:12:41 +02:00
Carsten Dominik 1ca680c1a8 Fix encrypting agenda 2010-10-14 08:23:34 +02:00
Carsten Dominik 2123798481 Make sure the temporary encryption file is always removed again 2010-10-13 19:13:52 +02:00
Carsten Dominik f34f056928 Minor fixes 2010-10-13 17:20:53 +02:00
Carsten Dominik 3047091bc7 Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode 2010-10-13 14:33:54 +02:00
Carsten Dominik 4011494a47 Add rubber as a way to process LaTeX to pdf
* lisp/org-latex.el (org-latex-to-pdf-process): Add rubber as another
default option.
2010-10-13 14:33:48 +02:00
Dan Davison 7e29685aa8 Improve docstring of `org-export-latex-minted'
* org-latex.el (org-export-latex-minted): Document pygments
	dependency.
2010-10-13 11:25:51 +01:00
Carsten Dominik b39f3ec692 Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode 2010-10-13 10:53:50 +02:00
Carsten Dominik 9755e09bbc Fix a number of issues with MobileOrg encryption.
* lisp/org-mobile.el (org-mobile-create-index-file): Encrypt the index file
if encryption has been turned on.
(org-mobile-copy-agenda-files): Avoid double encryption of `mobileorg.org'.
* doc/org.texi (Setting up the staging area): Document that file names remain
visible when encrypting the MobileOrg files.
2010-10-13 10:48:35 +02:00
Dan Davison eb75d6de40 Eliminate a compiler warning caused by the latex minted patch
* org-exp.el (org-export-latex-minted-with-line-numbers):
	Ensure that variable is declared
2010-10-13 08:43:17 +01:00
Eric Schulte db3798fd2b ob-python: fixed compiler warning
* lisp/ob-python.el (org-src-preserve-indentation): fixed compiler warning
2010-10-12 22:59:24 -06:00
Dan Davison 60fa8cf31a LaTeX minted package for fontified source code export
* org-exp.el (org-export-format-source-code-or-example): latex
    formatting of source code blocks using the minted package
    (org-export-plist-vars): Add :latex-minted property
    (org-export-latex-minted): Ensure variable is defined
    (org-export-latex-minted-langs): Ensure variable is defined

    * org-latex.el (org-export-latex-minted): new variable
    (org-export-latex-minted-langs): new variable
    (org-export-latex-minted-with-line-numbers): new variable
    (org-export-latex-minted):
2010-10-12 23:20:28 +01:00
Carsten Dominik 5014288b68 Fix Emacs 22 compatibility
* lisp/org-src.el (org-edit-src-code): Use `org-region-active-p'.
2010-10-12 17:51:31 +02:00
Dan Davison 4eaa52caca babel: alter whitespace to fit into 80 columns
* ob-tangle.el (org-babel-spec-to-string): whitespace changes

	* ob-python.el (org-babel-expand-body:python): whitespace changes
2010-10-12 15:50:00 +01:00
Dan Davison deb391f128 babel: Don't trim whitespace when `org-src-preserve-indentation' is non-nil
* ob-tangle.el (org-babel-spec-to-string): Don't trim
	whitespace when `org-src-preserve-indentation' is non-nil

	* ob-python.el (org-babel-expand-body:python): Don't trim
	whitespace when `org-src-preserve-indentation' is non-nil

Based on report and patches by Antti Kaihola.
2010-10-12 15:47:59 +01:00
Dan Davison 70e52ba9ac babel: `org-babel-lob-ingest': message reporting number of src blocks added
* ob-lob.el (org-babel-lob-ingest): Provide message stating
	number of blocks added to Library of Babel.
2010-10-12 11:57:29 +01:00
Dan Davison c354cb8eff babel: `org-babel-lob-ingest': Avoid error when source name is missing
* ob-lob.el (org-babel-lob-ingest): Check for nil source block
	name
2010-10-12 11:57:26 +01:00
Carsten Dominik 68037b0e1e Fix typo
* lisp/org-beamer.el (org-beamer-place-default-actions-for-lists): Fix
typo in regexp.
2010-10-12 07:26:36 +02:00
Nicolas Goaziou ce0d35a51c Fix "invalid search bound" when toggling a checkbox
* org-list.el (org-toggle-checkbox): avoid some boundary error when
  inserting a checkbox in an empty last item of a list.
2010-10-11 20:35:30 +02:00
David Maus 584adacf20 Query article number from file is nil by default
* org-gnus.el (org-gnus-nnimap-query-article-no-from-file): Query
article number from file is nil by default.

The function function `nnimap-group-overview-filename' is gone in Gnus
devel.  Subsequently enabling this feature by default will cause
org-gnus to fail on Emacs24.

Thanks for Matt Lundin for pointing this out.
2010-10-11 20:32:23 +02:00
Stephen Eglen b164a47571 Fix typo
* lisp/org-beamer.el (org-beamer-amend-header): Fix typo in docstring.
2010-10-11 09:44:41 +02:00
Carsten Dominik ed39b332fb Capture: Fix positioning error when :unnarrowed property is set
* lisp/org-capture.el (org-capture-place-entry): Move to `beg' before
searching for `%?'.
2010-10-11 08:26:26 +02:00
Carsten Dominik d0e70e8c81 Fix mathjax treatment of single letters in between dollars.
* lisp/org.el (org-format-latex): Fix mathjax treatment of single letters
in between dollars.
2010-10-10 09:18:24 +02:00