Commit Graph

3738 Commits

Author SHA1 Message Date
Dan Davison 469021c2f9 babel: clojure: Delete extra format argument
* ob-clojure.el (org-babel-clojure-evaluate-external-process):
	Delete extra format argument
2010-09-22 22:10:13 +01:00
Dan Davison 03b0360ded typos
* ob-org.el (org-babel-org-export): typo in docstring

	* ob-eval.el (org-babel-eval): typo in docstring
2010-09-22 22:10:13 +01:00
Dan Davison 757312dde3 babel: Remove unused temporary file variable
* ob-sh.el (org-babel-sh-evaluate): Remove unused temporary
	file variable
2010-09-22 22:10:13 +01:00
Dan Davison 9993463c4d babel: Make temp file names consistent
* ob-scheme.el (org-babel-execute:scheme): Alter temp file name

	* ob-ruby.el (org-babel-ruby-evaluate): Alter temp file name

	* ob-python.el (org-babel-python-evaluate-external-process):
	Alter temp file name

	* ob-perl.el (org-babel-perl-evaluate): Alter temp file name

	* ob-octave.el (org-babel-octave-evaluate-session):
	Alter temp file name
	(org-babel-octave-import-elisp-from-file): Alter temp file name

	* ob-ledger.el (org-babel-execute:ledger): Alter temp file name

	* ob-gnuplot.el (org-babel-gnuplot-process-vars): Alter temp
	file name
	(org-babel-execute:gnuplot): Alter temp file name
2010-09-22 22:10:13 +01:00
Dan Davison ec0b3892b9 babel: New function to process file names for use in external processes
* ob.el (org-babel-process-file-name): New function
	(org-babel-maybe-remote-file): Delete function

	* ob-sql.el (org-babel-execute:sql):
	Use org-babel-process-file-name

	* ob-scheme.el (org-babel-execute:scheme):
	Use org-babel-process-file-name

	* ob-sass.el (org-babel-execute:sass):
	Use org-babel-process-file-name

	* ob-ruby.el (org-babel-ruby-evaluate):
	Use org-babel-process-file-name

	* ob-python.el (org-babel-python-evaluate-external-process):
	Use org-babel-process-file-name
	(org-babel-python-evaluate-session):
	Use org-babel-process-file-name

	* ob-plantuml.el (org-babel-execute:plantuml):
	Use org-babel-process-file-name

	* ob-perl.el (org-babel-perl-evaluate):
	Use org-babel-process-file-name

	* ob-octave.el (org-babel-octave-evaluate-external-process):
	Use org-babel-process-file-name
	(org-babel-octave-evaluate-session):
	Use org-babel-process-file-name,
	don't use org-babel-maybe-remote-file

	* ob-lisp.el (org-babel-execute:lisp):
	Use org-babel-process-file-name

	* ob-ledger.el (org-babel-execute:ledger):
	Use org-babel-process-file-name

	* ob-js.el (org-babel-execute:js):
	Use org-babel-process-file-name

	* ob-haskell.el (org-babel-haskell-export-to-lhs):
	Use org-babel-process-file-name

	* ob-gnuplot.el (org-babel-execute:gnuplot):
	Use org-babel-process-file-name

	* ob-eval.el (org-babel-eval-read-file): Don't use
	org-babel-maybe-remote-file

	* ob-dot.el (org-babel-execute:dot):
	Use org-babel-process-file-name

	* ob-ditaa.el (org-babel-execute:ditaa):
	Use org-babel-process-file-name

	* ob-clojure.el (org-babel-clojure-evaluate-external-process):
	Use org-babel-process-file-name

	* ob-asymptote.el (org-babel-execute:asymptote):
	Use org-babel-process-file-name

	* ob-R.el (org-babel-R-assign-elisp): Don't use
	org-babel-maybe-remote-file, use org-babel-process-file-name
	(org-babel-R-evaluate-external-process):
	Use org-babel-process-file-name
	(org-babel-R-evaluate-session):
	Use org-babel-process-file-name

	* ob-C.el (org-babel-C-execute):
	Use org-babel-process-file-name

In addition to passing the file path through `expand-file-name',
tramp-style remote file names are converted to conventional (local)
file paths. The reason is that, if a tramp file name was in use in
emacs, then the shell command will be executing on the remote machine
in question. Further, by default the file name is passed through
`shell-quote-argument'.
2010-09-22 22:10:13 +01:00
Dan Davison 708d0e2da1 babel: Remove unused variable
* ob-C.el (org-babel-C-execute): Remove unused variable
2010-09-22 22:10:12 +01:00
David Maus cc0cc6745a Prevent superfluous colon
* org.el (org-make-link-string): Prevent superfluous colon.
2010-09-22 21:16:29 +02:00
David Maus 400a1457b3 Leave headline intact when creating link
* org.el (org-make-org-heading-search-string): Leave headline
intact.

Otherwise `org-link-search-must-match-exact-headline' set to a non-nil
value won't work properly.
2010-09-22 20:09:26 +02:00
David Maus e14bb168cb Don't escape characters in link type
* org.el (org-make-link-string): Don't escape characters in link type.

Bug reported by Achim Gratz.
2010-09-22 20:04:53 +02:00
Bastien Guerry d821c54aab Allow %:org-date for Gnus links.
* org-capture.el (org-capture-templates): update docstring
to advertize %:org-date.

* org-remember.el (org-remember-templates): update docstring
to advertize %:org-date.

* org-gnus.el (org-gnus-store-link): define %:org-date.

This was suggested by Sébastien Vauban.
2010-09-22 11:35:32 +02:00
Eric Schulte 90cc0c36c7 Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode 2010-09-21 22:18:55 -06:00
Dan Davison 4fd2c53523 babel: changes to some comment lines 2010-09-21 22:28:17 +01:00
Eric Schulte 6103eacdf0 ob-dot: automatically specifies "-T<ext>" based on file name extension
* lisp/ob-dot.el (org-babel-execute:dot): automatically specifies
  "-T<ext>" based on file name extension
2010-09-21 11:50:54 -06:00
Eric Schulte ca15dd6dbe ob-org: now raises an error on nested export calls
* lisp/ob-org.el (org-babel-org-export): raise error on nested export call
2010-09-21 10:10:41 -06:00
Eric Schulte 2f4db36f4b ob-plantuml: support for svg output files
* lisp/ob-plantuml.el (org-babel-execute:plantuml): support for svg
  output files
2010-09-21 09:46:01 -06:00
Eric Schulte 083f744e3c Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode 2010-09-21 09:35:04 -06:00
Eric Schulte 0ec264ddf7 org-babel-demarcate-block now works before first headline
fix suggested by Dan Davison

* lisp/ob.el (org-babel-demarcate-block): better initialization of stars
2010-09-21 09:34:50 -06:00
Dan Davison 1923c54502 Add customize interface for `org-src-tab-acts-natively'
* org-src.el (org-src-tab-acts-natively): Add customize interface
2010-09-21 15:17:01 +01:00
Dan Davison ca4391f9b5 Provide control over stripping of leading/trailing blank lines from code blocks
* org-src.el (org-src-strip-leading-and-trailing-blank-lines):
    New variable allowing prevention of automatic stripping of
    leading and trailing blank lines when exiting edit buffer.
    (org-edit-src-exit): Respect value of
    `org-src-strip-leading-and-trailing-blank-lines'
    (org-src-native-tab-command-maybe): Bind
    `org-src-strip-leading-and-trailing-blank-lines' to nil during
    this function.
2010-09-21 15:02:33 +01:00
Dan Davison 92249cffb0 Transmit active region from Org buffer to code edit buffer
* org-src.el (org-edit-src-code): If mark was inside code
    block then code edit buffer inherits mark with active region.
2010-09-21 15:02:33 +01:00
Eric Schulte 26b9263926 fixing compiler warnings in org-babel-demarcate-block
Thanks to Achim Gratz for pointing these out

* lisp/ob.el (org-babel-demarcate-block): fix compiler warnings
2010-09-21 07:03:12 -06:00
Eric Schulte 00eceedf0f Babel: better handling of empty space when demarcating code blocks
* lisp/ob.el (org-babel-demarcate-block): better handling of empty
  space around demarcated area
2010-09-21 06:44:17 -06:00
Carsten Dominik 03b178d120 Do not prefer future when jumping to a date in the agenda
* lisp/org-agenda.el (org-agenda-goto-date): Turn off prefer future
for this command.
2010-09-21 12:56:02 +02:00
David Maus 7fc897de70 New function: Open nntp: links with Gnus
* org-gnus.el (org-gnus-open-nntp): New function.
2010-09-20 21:49:08 +02:00
David Maus 8a8fbbd415 New function: Open nntp: links with Wanderlust
* org-wl.el (org-wl-open-nntp): New function.
2010-09-20 21:27:17 +02:00
David Maus 9e6b098747 Open message by numeric reference if article part is not a message id
* org-wl.el (org-wl-open): Open message by numeric reference if
article part is not a message id.
2010-09-20 21:27:16 +02:00
Carsten Dominik 44977a9efe Fix cursor position after applying filter
* lisp/org-agenda.el (org-agenda-filter-apply): Move cursor to a visible line.
2010-09-20 20:23:03 +02:00
Eric Schulte 12e58f4844 Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode 2010-09-20 08:38:09 -06:00
Eric Schulte 88b8b83951 interactive demarcation of code blocks
Thanks to Richard Riley for the initial idea and implementation

* lisp/ob.el (org-babel-demarcate-block): interactive demarcation of
  code blocks
* lisp/ob-keys.el (org-babel-key-bindings): key bindings for block
  demarcation
* doc/orgcard.tex: documentation in the ref card
2010-09-20 08:27:20 -06:00
David Maus d6b730ea97 Add 'message:' link type to default link types
* org.el (org-link-types): Add 'message:' link type to default link
types.

Jules Bean wrote:
>The link-type "message" is one of the ones org handles by default, it
>is an explicit case in org-open-at-point, much like http and it is
>handled by the following code:

>((member type '("message"))
>	   (browse-url (concat type ":" path)))

>However it is not included in the default value of org-link-types:

>(defvar org-link-types '("http" "https" "ftp" "mailto" "file" "news"
>		       		   "shell" "elisp" "doi"))

>...and therefore it doesn't work when clicked/followed.

>Manually adding it to org-link-types makes it work correctly. For me,
>anyway.
2010-09-20 10:52:49 +02:00
Bastien Guerry 5546df7f3b org-gnus.el: Add the :date property.
* org-gnus.el (org-gnus-store-link): add the :date property to
gnus links, allowing the use of %:date in capture templates.
2010-09-20 00:12:41 +02:00
Bastien Guerry d22d2d0ac4 org-remember.el: fix docstring, replacing %:author by %:fromname. 2010-09-19 23:58:06 +02:00
Bastien Guerry ae4372ec87 Remove unused function org-parse-local-options. 2010-09-19 23:34:13 +02:00
Eric Schulte 7800234e04 Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode 2010-09-19 10:53:21 -06:00
Nicolas Goaziou da92f40876 Correct LaTeX export with sublists. Minor fix of bullet cycling.
* org-list.el (org-cycle-list-bullet): follow order of bullets
  indicated in doc-string.
* org-list.el (org-list-bottom-point-with-indent): list is ended when
  a line is less indented that the last item, not the less indented item.
2010-09-19 10:31:49 +02:00
Eric Schulte efdf78172d ob-exp: resolving code block parameters in the original file on export
* lisp/ob-exp.el (org-babel-exp-src-blocks): now switching back to the
  original file before resolving code block parameters to ensure
  headline and buffer wide parameters are taken into consideration
  when only a narrowed portion of the file is exported
2010-09-18 19:57:36 -06:00
Eric Schulte fbb828a107 ob: hash construction invariant to order of header arguments 2010-09-18 14:02:33 -04:00
Bastien Guerry cf5fbad49b org-publish-all: remove outdated comment. 2010-09-18 18:44:44 +02:00
Bastien Guerry 7ec0cceba4 org-export-html-postamble: fix docstring. 2010-09-18 18:10:34 +02:00
Carsten Dominik 3abcc57aa9 Document INVISIBLE-OK argument of `org-forward-same-level'
* lisp/org.el (org-forward-same-level): Fix docstring.
2010-09-18 07:23:16 +02:00
Sebastian Rose 2fcd20e6eb Bug: Inconsistency with org-publish-attachment
Aidan Gauland <aidalgol@no8wireless.co.nz> writes:
> Sebastian Rose <sebastian_rose <at> gmx.de> writes:
>> did you revert the previous patch?  The second patch was against master
>> again.
>
> I ran git reset --hard then applied the second patch.
>
>> I changed to a subdirectory of my :base-directory (here $BASE):
>>
>> $ cd ${BASE}/subdirectory
>> $ cp ~/images/first.jpg .        # a simple image
>> $ ln -s ~/images/second.jpg      # a link to an image
>> $ ln -s ~/images/screenshots/    # a link to a directory
>>
>> When exporting, I get this tree in :publishing-directory ($PUB):
>>
>> $PUB/
>>  |-- subdirectory/
>>  |   |-- first.jpg
>>  |   |-- second.jpg
>>  |   `-- screenshots/
>>  |       |-- some.png
>>  |       `-- other.png
>>
>> which is what you expected, is that right?
>
> Yes, that's what I expected.  What I'm getting is a little different.
>
> $PUB/
> `-- subdirectory/
>     |-- screenshots/
>     |	  `-- subdirectory/
>     |	      `-- screenshots/
>     |	          |-- other.png
>     |	          `-- some.png
>     `-- subdirectory/
>         |-- first.jpg
>         |-- second.jpg
>
> This is how the project is defined...
> (setq
>  org-publish-project-alist
>  '(("static"
>     :base-directory "~/org-bug/"
>     :publishing-directory "~/org-bug-pub/"
>     :publishing-function org-publish-attachment
>     :recursive t
>     :base-extension "css\\|gz\\|bz\\|lzma\\|jpg\\|gif\\|png")))
>
> And published with this sexp.
> (org-publish "static")
>
> Perhaps the discrepancy between our setups is git commit (not sure if
> I'm using the right terms there)?  git log shows
> 878d94b472 at the top of its output.
>
> Thanks for your help!
> --Aidan

Ahrrgh :)

I just pulled, because I couldn't find that commit.

That commit already includes the (obviously wrong) first patch...

Here's the patch that reverts the first attempt and applies the new
one.   Hope this works :)

  Sebastian
2010-09-18 02:58:28 +02:00
Eric Schulte 59531de090 Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode 2010-09-17 13:19:45 -04:00
Harri Kiiskinen 52052e837a ob-sql: support for postgresql
It achieves this in the same way the mysql support is done, by using
  the psql client with suitable command line arguments.
2010-09-17 13:06:45 -04:00
Dan Davison 878d94b472 Some docstring typos 2010-09-16 20:55:25 +01:00
Sebastian Rose f2eec6921f Make org-publish-attachment honor directory structure
* lisp/org-publish.el (org-publish-attachment): Put the attachment
into the right directory.

Aidan Gauland <aidalgol@no8wireless.co.nz> writes:
> On Thu, Sep 16, 2010 at 12:40:34AM +0200, Sebastian Rose wrote:
>> Aidan Gauland <aidalgol@no8wireless.co.nz> writes:
>> > Sebastian Rose <sebastian_rose <at> gmx.de> writes:
>> >> It would be a bug.
>> >>
>> >> But I cannot reproduce it (current Org mode from git, emacs24).
>> >
>> > I just figured out why: I store all my images in ~/images/ and just
>> > have symbolic links to them in my Org website directory.
>> >
>> > Can you reproduce it now that you have this piece of information?
>>
>>
>> Ah, OK.  That might be because of some call to
>>
>>   (file-truename file...)
>>
>> or similar.  `file-truename' removes symbolic links in filenames.
>>
>> Functions like this are called to make sure, the file is published only
>> if needed (i.e. the file has changed since last export).
>>
>> I'm not sure currently if it's clever to remove such calls (see
>> lisp/org-publish.el and search `file-truename').
>
> What if `file-truename' was used only to get the path of the actual
> file to copy, but the (relative) path of the link is used as the
> destination?
>
> --Aidan

Hi Aidan,

`org-publish-attachment' is wrong or called with wrong arguments.

This patch fixes it.

As always, there might be a better way to fix it,
but this way the function `org-publish-attachment' will work regardless
of parameters.  Someone will always call this function with the wrong
`PUB-DIR' parameter...

Aidan, would like to apply the patch and verify it works for you?

Best wishes,

  Sebastian
2010-09-16 18:00:59 +02:00
Carsten Dominik a1dc916be6 Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode 2010-09-16 17:20:02 +02:00
Jambunathan K 6a92dd4243 Add org-goto-first-child
* lisp/org.el (org-goto-first-child): New command.

Completes existing set of org tree traversal functions.

TINYCHANGE.
2010-09-16 17:13:40 +02:00
Matt Lundin 8631f55d71 Fix bug that erases org buffer when calling agenda via org-agenda-open-link.
[My apologies, but I'm afraid my first attempt at this patch mistook a
necessary second check for redundancy. Here is an improved version.]

* lisp/org-agenda.el (org-prepare-agenda): If the agenda is called
  from within the agenda via an elisp link, such as
  [[elisp:(org-agenda-list)]], org-prepare-agenda erases the buffer of
  the file containing the link, since that buffer is current during
  org-prepare agenda (due to a with-current-buffer in
  org-agenda-open-link). An additional test now ensures that the
  agenda buffer is in fact current when the buffer is erased and local
  variables for the agenda are set.
2010-09-16 17:07:43 +02:00
David Maus d78eba7efb Add macro to insert property values into exported text
Example:

{{{property(id)}}}

Will insert the ID property of current subtree if the Org buffer is
exported.

* lisp/org-exp.el (org-infile-export-plist): Define property macro

TINYCHANGE
2010-09-16 16:59:30 +02:00
David Maus 0e24c574ac Remove possible folding white space in message header field
* org-mhe.el (org-mhe-get-header): Remove possible folding white space
in message header field.

Bug reported by Andrew J. Korty.
2010-09-15 18:59:22 +02:00