Commit graph

3698 commits

Author SHA1 Message Date
Eric Schulte fbb828a107 ob: hash construction invariant to order of header arguments 2010-09-18 14:02:33 -04: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
David Maus 82b7d0bf07 Properly declare function to silence byte compiler
* org-clock.el (notifications-notify): Properly declare function to
silence byte compiler.
2010-09-07 20:03:30 +02:00
Nicolas Goaziou 0f44a66523 Don't insert item when tree is folded
* org-list.el (org-insert-item): check invisibility of point at a
  meaningful location.
2010-09-07 19:36:13 +02:00
Nicolas Goaziou 7e8aec9c09 Fix `org-list-insert-item-generic' when checkboxes are updated
* org-list.el (org-list-insert-item-generic): Updating checkboxes can
  modifiy bottom point of a list, so make it a marker before calling
  `org-update-checkbox-count-maybe'.
2010-09-07 19:36:05 +02:00
Dan Davison 569ba0eee8 Turn off code fontification by default; supply customize interface
* org.el (org-src-fontify-natively): Set to nil by default.
	Supply cutomize interface.
2010-09-07 12:42:15 -04:00
Bastien Guerry 413caacfd7 Require org-clock.el where needed.
Also declare org-notify instead of org-show-notification.

This was reported by Łukasz Stelmach <lukasz.stelmach@iem.pw.edu.pl>
See http://article.gmane.org/gmane.emacs.orgmode/29900
2010-09-07 02:28:06 +02:00
Bastien Guerry 7c73bf1f74 Remove bzg-test function. 2010-09-06 22:20:46 +02:00
Bastien Guerry 86f4ef6d19 Fix bug in ASCII export: correctly set the `type' variable.
* org-ascii.el (org-export-as-ascii): Fix bug in ASCII export:
  use `org-bracket-link-analytic-regexp++' to match the link
  type.
2010-09-06 13:14:36 +02:00