Commit graph

3705 commits

Author SHA1 Message Date
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
David Maus ba741e9d2e Fix typo in customization group :tag property
* org-feed.el (org-feed): Fix typo in customization group :tag
property.
2010-09-15 11:36:17 +02:00
Nicolas Goaziou 1caba219da Small refactoring and docstrings update 2010-09-15 11:07:42 +02:00
Carsten Dominik d3db88ffe4 LaTeX export: Configurable format for tags
* lisp/org-latex.el (org-export-latex-tag-markup): New option.
(org-export-latex-keywords-maybe): Use `org-export-latex-tag-markup'.
2010-09-14 14:42:37 +02:00
Rémi Vanicat 2ad802968b Allow iCalendar to use UTC for exported date-time.
Define a new variable org-icalendar-use-UTC-date-time that when
non-nil make icalendar exporter to use UTC date-time for better
compatibility with some other software (as GCALDaemon).

* lisp/org-icalendar.el (org-icalendar-use-UTC-date-time): New option.
(org-ical-ts-to-string): Use UTC time when requested.
2010-09-14 14:05:31 +02:00
Eric Schulte 2a688e9aeb Explicitly mention when a language-mode throws an error
Hi,

The attached patch makes it clear when a language mode has thrown an
error.  This can clear up confusion whether an error is originating from
Org-mode or form the language-mode in question.

Should this be committed?

Best -- Eric
2010-09-14 14:03:15 +02:00
Achim Gratz c4644b9e00 silence byte compiler warnings about european-calendar-style
I've investigated further and defvaralias doesn't silence the warnings,
but "with-no-warnings" does.
2010-09-14 09:29:59 +02:00
Eric Schulte c19a04ec9f removing org-babel-temp-directory until some issues are resolved 2010-09-13 11:55:38 -04:00
Noorul Islam bbac53d7fe org-html.el: Fix exporting link to .org files.
On Wed, Sep 8, 2010 at 2:12 AM, Daniel Clemente <n142857@gmail.com> wrote:

>
> Commit bd1b57f92a broke the exporting
> of [[file:a.org]] links, which now appear as [[http:a.html]]. Try
> C-c C-e H on any .org with such links, even in emacs -Q.
>
> The problem is, I think, that „type“ is actually "http", not "file"
> as the code tries.
>

* lisp/org-html.el (org-html-cvt-org-as-html): Do not convert protocol
from 'file' to 'http'.

TINYCHANGE
2010-09-12 19:54:50 +02:00
David Maus 73b8674e72 Fix wrong usage of`org-adapt-indentation'
* org.el (org-store-log-note): Fix wrong usage
of`org-adapt-indentation'.
2010-09-12 18:59:24 +02:00
Nicolas Goaziou 60fcd2fa7e Replace non-interactive use of org-next-item' and org-previous-item'.
* org.el (org-skip-over-state-notes): do not compute bottom point at
  each item.
* org-mouse.el (org-mouse-for-each-item): use `org-apply-on-list'
  instead of moving to each item.
2010-09-12 18:53:18 +02:00
David Maus 59fa0d12c8 Small fix in doc string
* org-capture.el (org-capture-templates): Small fix in doc string.
2010-09-12 18:45:04 +02:00
aaa bbb fd49e69730 Use global archive location default
* lisp/org-archive.el (org-get-local-archive-location): Use
`org-carchive-location' as default.

Strange that nobody has noticed this bug before!
2010-09-11 07:38:27 +02:00
Eric Schulte 025921e94f Babel language files should not require org mode explicitly
* lisp/ob-C.el (org): no longer requires org
* lisp/ob-ledger.el (org): no longer requires org
2010-09-10 09:33:00 -06:00
David Maus ece2c578f0 Save match data before call to `read-char-exclusive'
* org.el (org-priority): Save match data before call to
`read-char-exclusive'.

Otherwise interactively calling `org-priority' with org-indent-mode
enabled fails to set a new priority cookie.

Bug reported by Joseph Buchignani.
2010-09-09 20:57:26 +02:00
Nicolas Goaziou 385c2666b1 More general regexp for descriptions items
* org-list.el (org-list-to-generic): Descriptions labels can be any
  suit of symbols, and will end at double colons.
2010-09-09 19:24:55 +02:00
Nicolas Goaziou 7c28d8d336 Fix indentation when using a [@start:num] or [@num] construct.
* org.el (org-indent-line-function): Indent past [@num] and
  [@start:num], consistently with what is already done with
  checkboxes.
2010-09-09 19:24:50 +02:00
Nicolas Goaziou 06c332cfee Fix notes indentation
* org.el (org-store-log-note): Indent new notes to the right column.
  Also take `org-list-two-spaces-after-bullet-regexp' into
  consideration when creating the note.
2010-09-09 19:24:46 +02:00
David Maus 9209139d1e Declare function to silence byte compiler
* org-gnus.el (nnimap-group-overview-filename): Declare function to
silence byte compiler.
2010-09-09 14:51:16 +02:00
David Maus 6d7b15cf9f Mitigate access to messages on slow IMAP servers.
* org-gnus.el (org-gnus-nnimap-query-article-no-from-file): New
customization variable.
(org-gnus-nnimap-cached-article-number): New function.
(org-gnus-follow-link): Try to fetch cached article number of
message-id.

Some IMAP servers (e.g. Courier) are slow when searching for a message
by its message id header field.  Because article numbers in IMAP
mailboxes are persistent UIDs, we can try to look up the UID of a IMAP
message in Gnus' cache for the mailbox in question and skip the slow
search on the server.

The problem with slow server was reported by Sébastien Vauban and the
patch is based on the work of Tassilo Horn.
2010-09-09 14:16:22 +02:00
Eric Schulte 24efe784d5 ob-org: no longer drop first line when exporting org code block
* lisp/ob-org.el (org-babel-org-default-header): used to insert a
  dummy first line into code blocks before export so that the first
  line is not interpreted as a title
  (org-babel-org-export): use new dummy code block prefix
2010-09-09 00:38:14 -06:00
Eric Schulte 8ca802166b Babel no longer throws error when inserting an empty result
Thanks to Sébastien Vauban for pointing this out

* lisp/ob.el (org-babel-insert-result): no longer throws error when
  inserting an empty result
2010-09-08 11:50:44 -06:00
Eric Schulte b238e6f2e7 Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode 2010-09-08 11:34:19 -06:00
Eric Schulte 207390dfa8 autoload org-babel-tangle-lang-exts from ob-tangle
* lisp/ob-tangle.el: autoload org-babel-tangle-lang-exts from ob-tangle
2010-09-08 11:33:24 -06:00
Dan Davison 0e1ff9ddbc `org-babel-do-in-edit-buffer': more lightweight test of context
* ob.el (org-babel-do-in-edit-buffer): Use
	`org-babel-where-is-src-block-head' to test for source block
	at point.
2010-09-08 13:26:39 -04:00
Dan Davison ad1ab9d419 Merge branch 'master' of git://repo.or.cz/org-mode 2010-09-08 09:48:02 -04:00
Eric Schulte 7dd72699a9 a new function for jumping to the head of the current code block
* lisp/ob-keys.el (org-babel-key-bindings): adding key-binding for
  `org-babel-goto-src-block-head'
* lisp/ob.el (org-babel-goto-src-block-head): jump to the head of the
  current code block
2010-09-08 00:13:12 -06:00
Eric Schulte e92a4b0813 ob: better error messages when searches for code blocks fail
* lisp/ob.el (org-babel-next-src-block): now raising more informative
  error when no further code blocks can be found
  (org-babel-previous-src-block): now raising more informative error
  when no previous code blocks can be found
2010-09-07 23:59:04 -06:00
Eric Schulte 58fe371299 org-exp-blocks now expands blocks *after* including files
* lisp/org-exp-blocks.el (org-export-preprocess-after-include-files-hook):
  now using this hook instead of `org-export-preprocess-hook'
2010-09-07 23:50:27 -06:00
Eric Schulte 5bdea686ed ob-plantuml: raises an error when the :file header argument is not set
* lisp/ob-plantuml.el (org-babel-execute:plantuml):
2010-09-07 23:23:08 -06:00
Dan Davison 7127eb44c1 babel: python: refactor `org-babel-python-evaluate'
* ob-python.el (org-babel-python-evaluate): Refactor as call
	to either `org-babel-python-evaluate-external-process' or
	`org-babel-python-evaluate-session'.
	(org-babel-python-evaluate-external-process): New function to
	handle evaluation in external process.
	(org-babel-python-evaluate-session): New function to
	handle evaluation in emacs inferior process.
2010-09-07 21:58:58 -04:00
Eric Schulte dd9d42f515 ob-org: evaluates body to latex ascii or html respecting :results header arg
* lisp/ob-org.el (org-babel-execute:org): evaluates body to latex
  ascii or html respecting :results header arg
  (org-babel-org-export): exports a string of text to an output format
2010-09-07 18:51:38 -06:00
Eric Schulte 1ebb9131ef Babel: remove existing results when nil results are returned
Thanks to Sébastien Vauban for making the case for this behavior

* lisp/ob.el (org-babel-insert-result): remove existing results when
  nil results are returned
2010-09-07 16:59:57 -06:00
David Maus 510ada442e Bind and set link path for link type specific markup function
* org-ascii.el (org-export-as-ascii): Bind and set link path for link
type specific markup function.
2010-09-07 20:04:35 +02:00