Commit graph

4571 commits

Author SHA1 Message Date
Bastien 08650cbb5c Allow (currentfile) for capture templates.
* org-capture.el (org-capture-templates): document currentfile
for capture template.
(org-capture-templates): Allow to use currentfile for capture
templates.
(org-capture-set-target-location): Handle currentfile as a way
to setting the capture buffer.

* org.texi (Template elements): document currentfile for
capture templates.
2011-02-12 19:07:52 +01:00
Bastien Guerry 03c33d0d38 Don't wrap org-entry-get into condition-case.
* ob.el (org-babel-params-from-properties): don't wrap
org-entry-get into condition-case.

* org-table.el (org-table-export): don't wrap org-entry-get
into condition-case.

* org.el (org-store-link): don't wrap org-entry-get into
condition-case.
2011-02-12 19:02:52 +01:00
Bastien Guerry f0c9e8d672 Whitespace and indentation cleanup. 2011-02-12 18:53:07 +01:00
Dan Davison 7dd425cc5d Allow properties to be retrieved before first heading in file.
* lisp/org.el (org-entry-get): Don't look for a property drawer if we
are before the first heading in the file.
(org-entry-get-with-inheritance): Don't attempt to move up the tree if
we are before the first heading in the file. Also, enclose less of the
function in the save-excursion.
2011-02-12 18:51:40 +01:00
Bastien Guerry 2df6f65e23 Merge branch 'master' of orgmode.org:org-mode 2011-02-12 16:53:21 +01:00
Bastien Guerry 8ec508b128 Add org-notmuch.el by Matthieu Lemerre to contrib/lisp/. 2011-02-12 16:53:10 +01:00
Dan Davison 775d962788 ob: Fix bug in using #+babel properties in fresh buffer
* lisp/ob.el (org-babel-params-from-buffer): Return desired value
rather than nil from failed re search.
2011-02-12 15:29:07 +00:00
Bastien Guerry 3b77c7ed57 org-latex.el: fix bug when using #+INCLUDE before the first heading.
The LaTeX looks for strings to export before the first headline.  Such
strings are defined as "before the first heading", so they normally never
match a heading regexp.  However, #+INCLUDE can insert lines before the
first heading matching a heading regexp, causing these lines to appear
twice: as first lines and as normal headings.

The fix is to never include first lines when they match a heading regexp.

This was reported by Rasmus <rasmus.pank@gmail.com>.
2011-02-12 16:01:40 +01:00
Bastien Guerry 6132405d05 org-agenda.el: small stylish fix: always use equal. 2011-02-12 14:03:08 +01:00
Bastien Guerry 905d2f7489 Fix small docstring typo. 2011-02-12 14:00:26 +01:00
Bastien Guerry 6d6d24581d Put multiline diary entries on a single line.
* org-agenda.el (org-get-entries-from-diary): Put multiline
diary entries on a single line when lines don't start with a
diary time.

This was requested by Suvayu Ali.
2011-02-12 13:08:14 +01:00
Bastien Guerry 3a04522ef1 New variable org-export-html-protect-char-alist.
* org-html.el (org-export-html-protect-char-alist): New custom
variable to define characters to be HTML protected.
(org-html-protect): Use the new variable.
2011-02-12 12:49:50 +01:00
Manuel Giraud dbb46ae6b1 Better sitemap formating
Hi,

Here's a patch that make the sitemap entry formating coherent with the
new html-pre/postamble one.

While here I was trying to add some documentation about this feature in
org.texi but I end up copy/pasting or paraphrasing the docstring of
correspondant customs. Is it acceptable for the documentation or plain
useless?

>From 766b0db7d0189d2edb0d8799c3424d62f9ac4e47 Mon Sep 17 00:00:00 2001
From: Manuel Giraud <manuel.giraud@univ-nantes.fr>
Date: Fri, 11 Feb 2011 15:32:58 +0100
Subject: [PATCH] org-publish.el: sitemap formating coherent with new preamble

Adopt downcase for format directive to be coherent with the new
pre/postamble formating.

Use `format-spec' function instead of `org-replace-escapes'.
2011-02-11 17:35:52 +01:00
Bastien Guerry 99d507dfc4 org-print-icalendar-entries: use org-export-exclude-tags. 2011-02-11 14:00:10 +01:00
Bastien Guerry e318bacdbf Use # to separate the info file and the node in Org links.
* org-info.el (org-info-store-link): use "#" to separate the
info file and the node.
(org-info-follow-link): use both "#" to separate the info file
and the node.  Continue to use ":" for backward compatibility.
2011-02-11 13:38:39 +01:00
Bastien Guerry 6f29af3440 New custom variable `org-icalendar-honor-noexport-tag'.
* org-icalendar.el (org-icalendar-honor-noexport-tag): New
custom variable.
(org-print-icalendar-entries): Use this new variable to
prevent export of entries with a :noexport: tag.

This was requested by Juraj Kubelka.
2011-02-11 12:03:26 +01:00
Bastien Guerry 3411a9d759 New variable to set the initial export scope.
* org-exp.el (org-export-initial-scope): new custom variable.
(org-export): Use this new variable.  If there is an active
region, tell it when prompting the user for an export command.
Also change the way the function handles selection of buffer
and subtree export.

----
Now `1' switches between subtree/buffer export until the user
select an export command.  Also, when there is an active region,
modify the message so that the user is aware he will only export
the surrounding subtree.
2011-02-11 10:44:35 +01:00
Bastien Guerry da8dc7bba7 Rewrite the handling of HTML preamble/postamble.
* org-html.el (org-export-html-auto-preamble)
(org-export-html-auto-postamble): Remove.
(org-export-html-preamble, org-export-html-postamble): Turn
into custom variables.  Update the docstrings.
(org-export-html-preamble-format)
(org-export-html-postamble-format): New custom variables.
(org-export-as-html): Use org-export-html-postamble-format and
org-export-html-preamble-format.
(org-export-html-title-format): delete.

* org-exp.el (org-export-plist-vars): Remove
:auto-preamble and :auto-postamble.  Rename :preamble and
:postamble to :html-preamble and :html-postamble.

* org-publish.el (org-publish-project-alist): Remove
:auto-preamble and :auto-postamble.  Rename :preamble and
:postamble to :html-preamble and :html-postamble.

* org.texi (Publishing options): replace :preamble and
:auto-preamble by :html-preamble (same for postamble.)
2011-02-11 01:27:15 +01:00
Eric Schulte f9c833dad0 org-exp-blocks: deprecating begin_dot and begin_ditaa blocks, will be removed soon
* lisp/org-exp-blocks.el (org-export-blocks-format-ditaa): This
  function is begin deprecated in favor of begin_src blocks.
  (org-export-blocks-format-dot): This function is begin deprecated in
  favor of begin_src blocks.
2011-02-10 10:00:06 -07:00
Eric Schulte 840052b910 Merge branch 'master' of orgmode.org:org-mode 2011-02-10 09:35:05 -07:00
Eric Schulte 7b720d28a6 ob: adding no-expand to list of header argument names
* lisp/ob.el (org-babel-header-arg-names): no-expand is now part of
  the default header argument names list.
2011-02-10 09:34:46 -07:00
Valentin Wüstholz 39d5acd33c org-latex.el: match horizontal rules with HTML regexp
Also a slight update of the manual about horizontal rules.
2011-02-10 17:03:31 +01:00
Bastien Guerry a6554b2fdf Fix bug when creating datetree heading.
When a heading like

* 2011 Do this

existed, the creation of a datetree for the year 2011 didn't work,
as the "2011 Do this" heading was mistaken for such a datetree.

This has been reported by Charles Cave.
2011-02-10 15:54:48 +01:00
Bastien Guerry e4b762af34 org-agenda.el: fix bug about wrong current span.
Locally kill org-agenda-current-span as a variable, otherwise
the current value of org-agenda-current-span is taken as the
default value when redoing the buffer or calling org-agenda
with a different view.

This might be a temporary fix, as Julien is looking for a
more general solution.  See his message here:

http://article.gmane.org/gmane.emacs.orgmode/37359
2011-02-10 15:30:09 +01:00
Bastien Guerry 7473e3cc78 Revert "Bug: Jumping to a date in the agenda changes view back to 'day' [7.4 (release_7.4.80.g0e5e5)]"
This reverts commit ca7aeada15.
2011-02-09 17:30:20 +01:00
Manuel Giraud 641144ef26 org-publish.el: allow formatting of sitemap entries.
* org-publish.el (org-publish-sitemap-date-format)
(org-publish-sitemap-file-entry-format): new custom variables.
(org-publish-projects): use these variables to format the
sitemap entries.
2011-02-09 17:12:18 +01:00
Ulf Stegemann c56d295b9b org-gnus.el: Allow org-link creation from message-mode.
* org-gnus.el (org-gnus-store-link): Allow org-link creation from
message-mode.
2011-02-09 16:54:36 +01:00
Carsten Dominik ce217d153a Merge branch 'agenda-refresh-clocktable-on-filter-change' 2011-02-09 10:10:04 +01:00
Carsten Dominik 09c5ff8359 Refresh agenda when updating the filter while the clock report is following
* lisp/org-agenda.el (org-agenda-filter-by-tag): Refresh agenda when
updating the filter while the clock report is following the filter.

When the clock table in the agenda has been set up to respect the
current agenda tags filter, modifying the filter will now
automatically rebuild the agenda to make sure that also the clock
report is updated along with it.  Updating the entire agenda is not
strictly necessary - updating the table would be enough.  However,
right now we do not really have a function that will update only the
clock table, as inserting the table is currently part of building the
agenda itself.  Maybe someone can optimize this in the future.

This feature was requested by Sebastien Vauban.
2011-02-09 09:04:04 +01:00
Julien Danjou ca7aeada15 Bug: Jumping to a date in the agenda changes view back to 'day' [7.4 (release_7.4.80.g0e5e5)]
On Sat, Feb 05 2011, Matt Lundin wrote:

> This results in only a day view because org-agenda-current-span is still
> 'day.

Here's a proposal fix.

I could have setq org-agenda-current-span to nil as a work around, but
it seems more logical to just kill all the local variables. That is, a
custom agenda view would not keep any of the local variable of the
previous agenda, which seems logical to me.

>From b48fc7c395dffea60df20c23b26e362ac0354b01 Mon Sep 17 00:00:00 2001
From: Julien Danjou <julien@danjou.info>
Date: Mon, 7 Feb 2011 12:36:42 +0100
Subject: [PATCH] org-agenda: kill local variables in agenda view

* org-agenda.el (org-agenda): Kill all local variables. This
assures we are not keeping buffer variable from an old agenda view
when switching to a new custom agenda.

Signed-off-by: Julien Danjou <julien@danjou.info>
2011-02-08 18:05:31 +01:00
Manuel Giraud 334cf2038d Adds sort options when publishing the sitemap
This patch adds sort options to the sitemap.  In addition to
alphabetical order, one can choose chronological or anti-chronological
ordering of sitemap entries.  To retrieve file date, it tries to parse
the "#+date" keyword and if not present defaults to file modification
time.
2011-02-08 17:51:17 +01:00
Christoph Groth 2214788528 org-bbdb: allow anniversaries with unknown years
Anniversaries in BBDB can be now also specified in the format MM-DD
next to YYYY-MM-DD.
2011-02-08 16:57:53 +01:00
Julien Danjou 4ec289e1c4 org-crypt: cache encrypted text
* lisp/org-crypt.el (org-encrypt-string): New function.
(org-encrypt-entry): Use org-encrypt-string to encrypt, so we use cached
crypted values.
(org-decrypt-entry): Store crypted text in decrypted text.

Signed-off-by: Julien Danjou <julien@danjou.info>
2011-02-08 16:55:45 +01:00
Stephen Eglen a598bd5a02 org-mhe-store-link alters window layout
If I run M-x org-store-link when my current emacs frame is just showing
one MH-E window (and nothing else in the frame), e.g. the "show-+inbox"
buffer, then the link to that email is created okay, but the window
frames are altered so that the +inbox summary window is also shown.
In general, the previous window contents are forgotten.  I suggest
adding a 'save-window-excursion' into org-mhe-store-link so that the
window arrangement is preserved on exit from the function.

Patch below is long just because of the extra indentation.

Stephen
2011-02-08 16:54:53 +01:00
Dan Davison 88b793946b ob: Fix bug in export of lob one-liners
* lisp/ob-exp.el (org-babel-exp-lob-one-liners): Only replace the
match if a non-nil result is returned
2011-02-07 22:27:14 +00:00
Bastien Guerry 9e8f1ddcd8 Fix typo. 2011-02-07 16:35:59 +01:00
Carsten Dominik ca220e9c40 Merge branch 'fix-todo-list-with-extended-today' 2011-02-06 08:14:58 +01:00
Bastien Guerry 68cf793ba9 Merge branch 'master' of orgmode.org:org-mode 2011-02-04 23:22:40 +01:00
Eric Schulte 27d98d8793 adding faces for block backgrounds and begin/end lines
Patch by Sébastien Vauban
  Committed by Eric Schulte with one tiny change
2011-02-04 13:47:58 -07:00
Eric Schulte 496ea6c527 ob: changing the default header args for inline code blocks 2011-02-04 13:28:51 -07:00
Dan Davison 123f3b774c make export dispatcher go away promptly
Following on from Stephen's recent post, a
thing-that-slightly-bothers-me is the way the export dispatcher window
doesn't go away until export is complete. I've briefly looked at the
code twice now and it wasn't obvious to me why the save-window-excursion
(line 941 org-exp.el) wasn't already doing what I wanted. However, the
change below seems to have the effect I wanted. While this particular
solution may be a hack, I wonder whether people would prefer its
behaviour? E.g. try exporting this:

#+title: title

#+begin_src sh :exports results
sleep 5 && echo hello
#+end_src

export can often take several seconds and it's nice to be able to zone
out looking at your org document rather than the dispatcher window.

	Modified lisp/org-exp.el

(I see that (sit-for .0001) is used in a couple of places in Org for
this effect, so maybe that should be used instead.)

Dan
2011-02-04 20:02:26 +01:00
Carsten Dominik 73be48bdf9 Fix bug that would show empty todo list on extended todays
* lisp/org-agenda.el (org-agenda-get-day-entries): Compare DATE with
modified today.

When a user sets org-extend-today-until, the agenda TODO list would
come up empty when requested in the extension period between midnight
and org-extend-today-until.  This problem is new, it was caused by a
patch that introduced the function org-today and used it also
in org-todo-list.

The reason why this caused a problem is a bit difficult.  The agenda
need a date to be defined, and getting todo entries is subject to the
current date being today.  This is a leftover condition from the times
when the TODO list was often part of the daily agenda listing, and the
test is there to avoid that the TODO list comes also up when looking
at the agenda for tomorrow.  Much of this is irrelevant now, because
people use either block agendas, or separate views - but the old
functionality is retained for backward compatibility.

This patch fixes the problem by making `org-agenda-get-day-entries'
check for the date computed by `org-today'.
2011-02-04 17:47:03 +01:00
Bastien Guerry a9d2e4240a Merge branch 'refine-org-agenda-repeating-timestamp-show-all' 2011-02-04 10:56:59 +01:00
Bastien Guerry 28b88bbb11 Fix bug in org-update-parent-todo-statistics.
* org.el (org-update-parent-todo-statistics): fix bug when
updating statistics from the column view.

This was reported by James Deaton and confirmed by Bernt Hansen.
2011-02-04 10:44:29 +01:00
Bastien Guerry 809b505ef0 Add a new command: org-agenda-bulk-mark-regexp
* org-agenda.el (org-agenda-bulk-mark-regexp): New command.
(org-agenda-menu): Add the new command to the menu.
(org-agenda-mode-map): Add % as the keybinding for the new
command.
2011-02-03 20:03:51 +01:00
Bastien Guerry 814871c42b Fix docstring typo in org-link-search-must-match-exact-headline. 2011-02-03 18:00:16 +01:00
Bastien Guerry b93aa70551 Fix bug in org-export-target-internal-links.
* org-exp.el (org-export-target-internal-links): Locally turn
on `org-link-search-must-match-exact-headline' to match exact
internal links.

Thanks to Jambunathan K for spotting this.
2011-02-03 17:59:56 +01:00
Bastien Guerry dfbdc547d5 Revert "(org-scan-tags): Optimize a bit the regexp search."
This reverts commit 0b7ce5f47d.
2011-02-03 17:35:51 +01:00
Julien Danjou d840de551c face: make org-special-keyword inherit
* org-faces.el (org-special-keyword): Make it inherited from font-lock-keyword-face.

Signed-off-by: Julien Danjou <julien@danjou.info>
2011-02-02 19:46:58 +01:00
Julien Danjou 44e68033ee face: make org-link inherit from link
* org-faces.el (org-link): Make org-link inherits from link face.

Signed-off-by: Julien Danjou <julien@danjou.info>
2011-02-02 19:46:29 +01:00
Bastien Guerry 0b7ce5f47d (org-scan-tags): Optimize a bit the regexp search. 2011-02-02 19:27:51 +01:00
Bastien Guerry 7b72c57e15 (org-hidden-keywords): Fix docstring. 2011-02-02 16:29:56 +01:00
Bastien Guerry 16b408bd06 (org-block-regexp): Now also match dynamic blocks. 2011-02-02 16:12:27 +01:00
Bastien Guerry b3c3746d92 New function org-narrow-to-block.
* org.el (org-narrow-to-block): New function to narrow to block.
Bound this function to `C-x n b'.
* org.texi (Dynamic blocks, Structure editing): Mention
the function `org-narrow-to-block'.

This is inspired by a request by Leonidas Tsampros.
2011-02-02 11:47:41 +01:00
Bastien Guerry 4828e3c2d0 Fix bug when using org-schedule/org-deadline on timestamps with complex repeaters.
* org.el (org-schedule, org-deadline): Fix bug: take care of
repeating timestamps like ".+1d/3d" or "+1d 10d".
2011-02-02 11:04:50 +01:00
Puneeth Chaganti b6efc82dd0 org-html.el: Fix bug about remaining "@" when exporting timestamps. 2011-02-02 10:45:55 +01:00
Bastien Guerry f121bc5e72 Make org-agenda-repeating-timestamp-show-all aware of TODO keywords.
* org-agenda.el (org-agenda-repeating-timestamp-show-all):
Allow to use a list of TODO keywords as the value of this
variable.  The agenda will show repeating stamps for entries
matching these TODO keywords.
(org-agenda-get-timestamps, org-agenda-get-deadlines)
(org-agenda-get-scheduled): Allow the use of a list of
keywords in `org-agenda-repeating-timestamp-show-all'.

---
This was suggested by Jeff Horn and supported by Detlef Steuer.
2011-02-02 10:35:56 +01:00
Bastien Guerry 8158131e7a Remove org-export-latex-use-verb.
* org-latex.el (org-export-latex-emph-format): Don't use
`org-export-latex-use-verb'.  Remove this variable.

This variable was introduced by Carsten for testing purpose,
it was not meant to be a user variable.
2011-02-01 18:03:57 +01:00
Bastien Guerry b2838f40ff Delete useless ChangeLog file. 2011-02-01 18:00:56 +01:00
Jason Dunsmore ca69b55624 Fix bug when exporing inactive timestamps.
* org-html.el (org-html-handle-time-stamps): fix bug when
exporing inactive timestamps.
2011-02-01 17:46:57 +01:00
Bastien Guerry 4cc1063dd2 Define and use org-archive-subtree-add-inherited-tags.
* org-archive.el (org-archive-save-context-info): Fix
docstring typo.
(org-archive-subtree-add-inherited-tags): New variable to
control whether inherited tags should be appended to local
tags when archiving subtrees.
(org-archive-subtree): Use the new variable.

This feature was suggested by Carsten, after a request by Osamu OKANO.
2011-02-01 16:09:04 +01:00
Bastien Guerry 5af82bac46 * org-archive.el (org-archive-save-context-info): Fix docstring typo. 2011-02-01 15:29:46 +01:00
Bastien Guerry e236d54acc Merge branch 'master' of orgmode.org:org-mode 2011-02-01 13:09:28 +01:00
Osamu Okano a017fca37f Various docstrings typo fixes by Osamu OKANO. 2011-02-01 13:05:13 +01:00
Julien Danjou 86bb47fcac org-crypt: fix decrypt outline display bug
* org-crypt.el (org-decrypt-entry): Delete \n on top level heading.
This avoids a display bug showing the heading outlined where the text
is not since it does not have the outline property.
Restore subtree visibility state after decryption.

Cc: John Wiegley <johnw@gnu.org>
Cc: Peter Jones <pjones@pmade.com>
Signed-off-by: Julien Danjou <julien@danjou.info>
2011-02-01 12:53:59 +01:00
Julien Danjou bf46c32aad Bug: Jumping to a date in the agenda changes view back to 'day' [7.4 (release_7.4.80.g0e5e5)]
On Mon, Jan 17 2011, Carsten Dominik wrote:

> have you been following this thread?  I think this has to do with your
> rewrite of the dagenda span stuff.  Maybe you can find out better and
> faster that I why this goes wrong?  Please read the entire thread.

I've followed but not sure I understood what the bug is. But from my
various tries, I found a bug: when pressing 'j', the current span is
discarded.

Attached is a patch that should fix that, even for future use of
`org-agenda-list' with the span unspecified. :)

>From 9dd2fe6650b858a4083ebc083bb8d10a0d6ac7f2 Mon Sep 17 00:00:00 2001
From: Julien Danjou <julien@danjou.info>
Date: Mon, 17 Jan 2011 16:05:28 +0100
Subject: [PATCH] Fix agenda span on date jump

* org-agenda.el (org-agenda-list): Use org-agenda-current-span as a
possible default span if it is set.

Signed-off-by: Julien Danjou <julien@danjou.info>
2011-02-01 12:52:00 +01:00
Dan Davison bbb28d5bf8 Get rid of extra help message when editing src code
* lisp/org-src.el (org-edit-src-persistent-message): Change docstring.
(org-edit-src-code): Get rid of help message in echo area.
* lisp/ob.el (org-babel-do-in-edit-buffer): Do not pass 'quietly
argument to org-edit-src-code as this has been removed
2011-02-01 11:44:32 +00:00
Bastien Guerry 3b2bb9760e * org-latex.el (org-export-latex-emphasis-alist): use
\protectedtexttt for the =...= emphasis and \verb for the
~...~ emphasis.
(org-export-latex-use-verb): now defaults to t.
(org-export-latex-emph-format): distinguish between =...= and
~...~ emphasis.

---
This patch was submitted by Carsten as a variation on Thomas Dye's
original patch.
2011-02-01 11:21:34 +01:00
Bastien Guerry e6f51d2485 Merge branch 't/patch568' 2011-01-31 21:36:55 +01:00
Julien Danjou f1bfcc6f8a Bug: UTF-8 characters in #+LINK does not work [7.4]
On Sat, Jan 29 2011, Matt Lundin wrote:

> The regexp in org-link-expand-abbrev does not allow for accented
> characters in the link abbreviation. I am not sure whether this is an
> intended limitation or a bug. :)

I don't see any reason. Patch attached.

>From 1ec1e178aaa6a9935819a873ae492be7a2ddb2f6 Mon Sep 17 00:00:00 2001
From: Julien Danjou <julien@danjou.info>
Date: Mon, 31 Jan 2011 21:19:07 +0100
Subject: [PATCH] Allow more char type in link abbrev

* org.el (org-link-expand-abbrev): Allow any type of character
in link expand.

Signed-off-by: Julien Danjou <julien@danjou.info>
2011-01-31 21:36:05 +01:00
Bastien Guerry 29c106f5e8 Merge branch 'master' of orgmode.org:org-mode 2011-01-31 20:43:26 +01:00
Bastien Guerry e4bbefeef6 Another small docstring typo. 2011-01-31 20:42:50 +01:00
Dan Davison c59c8346af ob: Add prefix to minibuffer prompt
* lisp/ob-lob.el (org-babel-lob-ingest): Add prefix to file prompt.
2011-01-31 19:36:43 +00:00
Dan Davison 978b34bc08 ob: don't disturb windows when resolving references in external files
* lisp/ob-ref.el (org-babel-ref-resolve): save-window-excursion when
resolving references.
2011-01-31 19:36:43 +00:00
Bastien Guerry 3c5dc21985 Fix typo in docstring. 2011-01-31 20:32:18 +01:00
Bastien Guerry 13c894d0bb Use <hr/> instead of <hr> to keep w3c validator happy.
* org-html.el (org-export-html-html-helper-timestamp): use
<hr/> instead of <hr> to keep w3c validator happy.
2011-01-31 19:38:38 +01:00
David Maus 6575b252dc org-faq: Invalid XHTML
At Tue, 11 Jan 2011 03:31:11 +0530,
Jambunathan K wrote:
>
>
> There are 16 errors while validating org-faq page.
>
> http://validator.w3.org/check?uri=http%3A%2F%2Forgmode.org%2Fworg%2Forg-faq.html&charset=%28detect+automatically%29&doctype=Inline&group=0
>
> Can such errors be not caught as soon as it happens?

Attached patch fixes a glitch in Org's HTML export and mitigates the
problem of invalid id and name attributes.

Best,
  -- David
2011-01-31 19:32:19 +01:00
David Maus 24e664df07 Export issue of URL when the text begins with a date‏
At Mon, 17 Jan 2011 18:55:54 +0100,
Bastien wrote:
>
> David Maus <dmaus@ictsoc.de> writes:
>
> >> It seems that such a non-regression test base and script do not
> >> exist. However that would be good to have in order to check that any
> >> correction does not break anything.
> >
> > That's exactly what the testing framework[1] could and should do.
> > I've just not figured out how to best write tests for entire export
> > operations.  Thinking of it: We could create an input file dedicated
> > to test link exporting, put in different kinds of links, export and
> > then use regexps to check if the links have been exported fine.
>
> I've just added testing/links.org to the testing framework.
>
> Vincent, feel free to suggest any addition to testing/ so that we can
> enrich our test-base with various examples!  Being able to reproduce
> errors on those files will help people feel confident the error does
> not come from their configuration.

Attached patch factors out the link handling part of
`org-export-as-html' in a separat function which takes the processed
line and the exporting options as arguments and returns the possibly
modified line.  Having the link handling in a separate function makes
it way easier to test this specific behaviour of export.

Best,
  -- David
2011-01-31 19:28:30 +01:00
Bastien Guerry 7e608051ac Typo fix: don't rename org-complete defgroup 2011-01-31 19:27:42 +01:00
Bastien Guerry df23e58b48 Rename org-complete.el to org-pcomplete.el to avoid file-name clash.
On Jan 26, 2011, at 10:34 AM, Eli Zaretskii wrote:

> The file org-complete.el, added about a month ago, causes a file-name
> clash with org-compat.el after 8+3 truncation.  This causes trouble
> when unpacking Emacs tarballs on DOS filesystems.

Also rename org-complete-* functions in org-pcomplete.el and remove a
wrong reference to org-complete in doc/org.texi.

We still use org-complete-* namespace for the custom group and the
custom variables.
2011-01-31 18:40:05 +01:00
Dan Davison 9511f9e153 ob: Allow src block to be executed with point on #+header line
* lisp/ob.el (org-babel-where-is-src-block-head): Detect src block if
point is on a #+header line.
2011-01-31 15:38:49 +00:00
Dan Davison 4a2ed86f6d ob: Don't allow #+header lines to prevent block finding
* lisp/ob.el (org-babel-where-is-src-block-head): Skip over
intervening #+header lines when searching for block associated with
block name line.
2011-01-30 13:07:11 +00:00
Eric Schulte ba0f6d765f ob: safer insertion of results into a list
* lisp/ob.el (org-babel-result-end): Replace call to org-in-item-p to
  the more specific org-at-item-p.
2011-01-29 08:40:57 -07:00
Eric Schulte b2ae35471f org-latex: `org-latex-default-figure-position' for default figure position
* lisp/org-latex.el (org-latex-default-figure-position): New defcustom
  for default placement of latex figures.
  (org-export-latex-tables): Positioning tables using the new
  defcustom variable.
  (org-export-latex-format-image): Positioning images using the new
  defcustom variable.
2011-01-28 08:59:47 -07:00
Eric Schulte 5d9023b384 Merge branch 'master' of orgmode.org:org-mode 2011-01-27 15:42:37 -07:00
Eric Schulte 3559280aca ob-ditaa: throw error when evaluated and :file header argument is missing
* lisp/ob-ditaa.el (org-babel-execute:ditaa): Throw error when
  evaluated and :file header argument is missing.
2011-01-27 15:42:27 -07:00
Eric Schulte 5b35351002 ob-exp: simplifications and unification of inline and normal code blocks
* lisp/ob-exp.el (org-babel-exp-do-export): Simplified, no longer need
  to do anything to export code.
  (org-babel-exp-results): No longer returns a replacement for the
  code block.
  (org-babel-exp-inline-src-blocks): Simplified.
  (org-babel-exp-src-block): Removed unnecessary pluralization from
  function name.
2011-01-27 14:55:19 -07:00
Eric Schulte d0ca215105 ob: simplified code block exportation -- same process for inline and regular blocks
* lisp/ob-exp.el (org-babel-exp-inline-src-blocks): Simplified
  exportation of inline code blocks using normal code block execution
  mechanism to insert results.
  (org-babel-exp-results): Results exportation mechanism is unified
  for both inline and regular code blocks.
* lisp/ob.el (org-babel-where-is-src-block-result): Returns the point
  after an inline code block for inline code blocks.
2011-01-27 12:48:45 -07:00
Eric Schulte 8cca4424a4 ob: better insertion of inline code block results
* lisp/ob.el (org-babel-insert-result): Special handling of the
  position of results of inline code blocks.
  (org-babel-examplize-region): Now able to comment inline regions.
2011-01-27 11:31:47 -07:00
Lawrence Mitchell 81bac18755 Quote \[cmd] in docstring of org-export-with-LaTeX-fragments
* org-exp.el (org-export-with-LaTeX-fragments): Fix docstring so that
\\[ a = b \\] is not interpreted as a keybinding by
`substitute-command-keys'.

In a docstring \\[text] is used to indicate that text should be
interpreted by `substitute-command-keys'.  To avoid this
interpretation, we need to prefix it with \\=.
2011-01-26 19:07:31 +01:00
Dan Davison 76241dd192 PATCH: Support `org-export-process-option-filters' in latex export
`org-export-process-option-filters' is supported for HTML export but not
for latex export. The patch at the bottom fixes that.

I note that there is one other location in the same function where it
seems the same change could be made. I suspect this is not necessary,
but if someone is familiar with the org-latex code they might like to
have a look. (I didn't manage to understand the roles of the several
variables with names like *-opt-plist *-options-plist in that function.)

I'm protecting this patch from patchwork with ^$; it's the patch at the
bottom that I propose.

$ diff --git a/lisp/org-latex.el b/lisp/org-latex.el
$ index 51ee6d2..53d6b40 100644
$ --- a/lisp/org-latex.el
$ +++ b/lisp/org-latex.el
$ @@ -700,7 +700,8 @@ when PUB-DIR is set, use this as the publishing directory."
$  			     '(:org-license-to-kill nil))))
$    (org-update-radio-target-regexp)
$    (org-export-latex-set-initial-vars ext-plist arg)
$ -  (setq org-export-opt-plist org-export-latex-options-plist)
$ +  (setq org-export-opt-plist
$ +  	(org-export-process-option-filters org-export-latex-options-plist))
$    (org-install-letbind)
$    (run-hooks 'org-export-latex-after-initial-vars-hook)
$    (let* ((wcf (current-window-configuration))
$

    Support `org-export-process-option-filters' in latex export

    * lisp/org-latex.el (org-export-as-latex): Process export property
    list with `org-export-process-option-filters' early in latex export

	Modified lisp/org-latex.el
2011-01-26 19:01:04 +01:00
Julien Danjou 84d7165d74 org: remove org-invisible-p
I just found a left over in org-list.el. :)

Updated patch attached.

>From bf6c65a42e04d4753c58795442a479685bb5f318 Mon Sep 17 00:00:00 2001
From: Julien Danjou <julien@danjou.info>
Date: Wed, 26 Jan 2011 11:14:11 +0100
Subject: [PATCH] org: remove org-invisible-p

* org.el: Remove org-invisible-p: outline-invisible-p is
available in Emacs 22 and in recent XEmacs 21. Replace in
various files.

Signed-off-by: Julien Danjou <julien@danjou.info>
2011-01-26 18:26:46 +01:00
Julien Danjou 2d747caeab org-agenda: fix regexp in progress for state logging
* org-agenda.el (org-agenda-get-progress): Fix regexp for statep: it
must has \\ at the end of the line. This avoid matching the following
heading when there's no newline between the logged state and the next
heading.

Signed-off-by: Julien Danjou <julien@danjou.info>
2011-01-26 18:24:19 +01:00
Julien Danjou 9658a9909f org-agenda: simplify start/stop/duration time computing
* org-agenda.el (org-format-agenda-item): Simplify time comuting.

Signed-off-by: Julien Danjou <julien@danjou.info>
2011-01-26 11:16:27 +01:00
Carsten Dominik e10eaa2502 Revert "* org.el (org-fast-tag-selection): Fix bug when assigning keys"
This reverts commit c7d1e0f997.
2011-01-26 11:08:40 +01:00
Nicolas Goaziou 576c7bd520 Use existing macro to simplify code in LaTeX exporter
* lisp/org.el (org-current-level):
(org-store-link):
(org-mark-subtree): Use `org-with-limited-levels'.
2011-01-26 11:07:34 +01:00
Jan Seeger deb5f8df31 Always add sitemap file to project files if sitemap is requested
* lisp/org-publish.el (org-publish-get-base-files): Add sitemap file.

I noticed some wonkiness in getting my sitemap created on my webserver
when pushing my website, and the problem seems to lie in
org-publish-get-base-files only returning existing files, and not
picking up on the soon to be generated sitemap. My patch always adds
the sitemap file to the list of returned files if a sitemap is
requested, regardless of if it exists or not.
2011-01-26 11:03:20 +01:00
Matt Lundin 156e6b1466 Add new option for ignoring past or future items in the global todo list
* lisp/org-agenda.el: (org-agenda-todo-ignore-deadlines): New option.
(org-agenda-todo-ignore-scheduled): New option.
(org-agenda-todo-ignore-timestamp): New option.
(org-agenda-check-for-timestamp-as-reason-to-ignore-todo-item): Allow user
to specify custom distance to ignore (future or past).
(org-agenda-todo-custom-ignore-p): New function.

This patch gives users greater control over which past or future items
they would like to ignore in the global todo list. By setting
org-agenda-todo-ignore-scheduled to 7, for instance, a user can ignore
all items scheduled 7 or more days in the future. Similarly, by
setting org-agenda-todo-ignore-scheduled to -1, a user can ignore all
items that are truly in the past (unlike the 'past setting, which
ignores items scheduled today). Thanks to Paul Sexton for the idea for
this new functionality.
2011-01-26 10:59:58 +01:00
Matt Lundin c03c8f0e7c Optimize org-habit-parse-todo
* lisp/org-habit.el: (org-habit-parse-todo) Don't parse more days than
  needed.

When constructing a consistency graph, org-habit now stops searching
for timestamps when the number of matches exceeds the span of time
displayed in the graph. This can lead to a significant speedup in
agenda construction, especially for entries with many logbook entries.
Previously, org-habit would parse all logbook timestamps, even if they
numbered in the hundreds.
2011-01-25 22:58:57 +01:00
Carsten Dominik 8899e596f9 Merge branch 'master' of orgmode.org:org-mode 2011-01-25 22:58:37 +01:00
Eric Schulte 39c982eb49 ob: ob-exec-buf and ob-exec-tree now eval inline code blocks as well
* lisp/ob.el (org-babel-map-inline-src-blocks): Macro for executing
  code in each inline code block.
  (org-babel-execute-buffer): Executes inline code blocks as well as
  regular code blocks.
2011-01-25 10:15:47 -07:00
Eric Schulte db0e815a4c ob: fixed issue with ":results replace org"
* lisp/ob.el (org-babel-result-end): Now recognizes "#+begin_org"
  blocks for removal.
2011-01-25 09:15:06 -07:00
Benjamin Drieu 4cfea25f24 New hook for clock selection
* lisp/org-clock.el (org-clock-before-select-task-hook): New hook.
(org-clock-select-task): Run new hook.

Hi Org-moders,

I am often frustrated because I clock a lot of things and some of them
are repeated (i.e, coffee, read mails, etc.).  So when I want to clock
time I spend drinking coffee, the best I found was to search for a
headline matching "Coffee".  Or to tag frequent clocks and do some
agenda research on this tag.  Too long.  :-)

So here is a solution for this need : to add a shortcut property to
entries I would like to "bookmark" and insert matching entries in the
org-clock-select-task menu.  This can be done with :

* TODO Pause and drink coffee
  :PROPERTIES:
  :SHORTCUT: p
  :END:

then C-u C-c C-x C-i p.  And voil, "Pause and drink coffee" is clocked!

Here is a patch that adds a hook into org-clock-select-task and a module
that adds the shortcut feature.  I tried to be the least intrusive
possible, if this proves to be useful, the hook trick might not be
needed.

Benj

TINYCHANGE
2011-01-25 06:53:35 +01:00
Julien Danjou c78bf704ed org-agenda: fix start/end time in timerange
* org-agenda.el (org-agenda-get-blocks): Fix time of start/end
of events with range. This display things like:
<2011-01-22 Sat 14:00>--<2011-01-23 Sun 20:00>
correctly, with the event starting at 14:00 and ending at 20:00.

Signed-off-by: Julien Danjou <julien@danjou.info>
2011-01-25 06:47:09 +01:00
Dan Davison 8d00354704 ob: more permissive regexp match for inline src blocks
* lisp/ob.el (org-babel-inline-src-block-regexp): Character preceding
"src_" can now be anything as long as it is neither alphanumeric nor
'-'.
2011-01-21 17:47:51 +00:00
Dan Davison dcfeec887a docstring edits
* lisp/ob.el (org-babel-merge-params): docstring typo
2011-01-20 17:20:19 +00:00
Dan Davison 05ef2ae7cc ob: Allow babel settings to be made in multiple #+babel: lines
* lisp/ob.el (org-babel-params-from-buffer): Process all #+babel:
lines in the buffer
2011-01-20 17:20:18 +00:00
Dan Davison 624141cc68 ob: Make #+header lines override higher-level settings
* lisp/ob.el (org-babel-get-src-block-info): Alter order of merge arguments
2011-01-20 17:20:18 +00:00
Dan Davison 43772d2d9a ob: avoid error when python session buffer has been killed
* lisp/ob-python.el: Test whether non-nil buffer is #<killed buffer>
2011-01-20 17:20:18 +00:00
Eric Schulte 3d4b884cb3 ob: Ensure all portions of results wrappers end in newlines
* lisp/ob.el (org-babel-insert-result): Ensure all parts of result
  wrappers end in newlines.
2011-01-20 09:30:28 -07:00
Eric Schulte c07b5aed1e ob-tangle: new :mkdirp header argument creates parent dirs of tangle targets
* lisp/ob-tangle.el (org-babel-tangle): New :mkdirp header argument
  optionally creates parent directories of tangle targets.
2011-01-19 20:29:09 -07:00
Carsten Dominik 4007c1cdce Fix bug in ASCII export
* lisp/org-ascii.el (org-ascii-level-start): Catch the case of levels
which do not have an equivalent in the list of underline characters.

For more information see

http://thread.gmane.org/gmane.emacs.orgmode/36097
2011-01-19 10:57:25 +01:00
Carsten Dominik 20a3c2a6b6 Merge branch 'master' of orgmode.org:org-mode 2011-01-19 10:39:30 +01:00
Eric Schulte 70d338ec46 ob-sh: customize shell quoting format with org-babel-sh-var-quote-fmt.
* lisp/ob-sh.el (org-babel-sh-var-quote-fmt): Now possible to
  customize the format string used to escape arguments to shell code
  blocks.
2011-01-18 09:23:53 -07:00
Julien Danjou dc55710b60 Add command to reset agenda time span
* org-agenda.el (org-agenda-reset-view): New function.
(org-agenda-view-mode-dispatch): Bind space to org-agenda-reset-view.

Signed-off-by: Julien Danjou <julien@danjou.info>

* doc/org.texi (Agenda commands): Document `v SPC'.

* doc/orgcard.tex: Document v SPC
2011-01-18 11:14:20 +01:00
Bastien Guerry c8ec337d68 org-exp.el: cosmetic change to `org-get-file-contents' 2011-01-18 01:24:12 +01:00
Puneeth Chaganti 7b399fe128 How do I include text between a range of line numbers with #INCLUDE
Hi Carsten,

On Sat, Jan 8, 2011 at 11:35 PM, Carsten Dominik
<carsten.dominik@gmail.com> wrote:
> Hi Puneeth,
>
> can cou please augment the patch with a propert ChangeLog-like entry, and
> with documentation for the manual, and then resubmit?

Here is a patch with a ChangeLog entry and documentation for the
manual. Please tell me if it looks OK. Also, I hope using
git-format-patch is the right way to send this page. If not, what is
the right way?

Thanks,
Puneeth

>From 4a9be5b1a7a19c5d092ed14a86d29ad83122e9a8 Mon Sep 17 00:00:00 2001
From: Puneeth Chaganti <punchagan@gmail.com>
Date: Sun, 9 Jan 2011 00:48:51 +0530
Subject: [PATCH] Include only specified range of line numbers of a file

* doc/org.texi (Include files): Document :lines.
* lisp/org-exp.el (org-export-handle-include-files): Support :lines
property.
(org-get-file-contents): New argument lines to include specify a range
of lines to include.

On Fri, Jan 7, 2011 at 1:29 PM, Puneeth <punchagan@gmail.com> wrote:
> On Fri, Jan 7, 2011 at 10:03 AM, Venkatesh Choppella
> <venkatesh.choppella@iiit.ac.in> wrote:
>> I would like to include a part of a file (between a given range of
>> line numbers) instead of the whole file.  Is there a way to do that
>> in org-mode?
>
> It isn't possible to include files using line numbers, as of now.
> Here's a quick patch that would add this feature.  I have tested it
> with small files and works fine. Can somebody tell me if it looks
> good?
>
> :lines "5-10"  will include the lines from 5 to 10, 10 excluded.
> :lines "-10"  will include the lines from 1 to 10, 10 excluded.
> :lines "5-"  will include the lines from 1 to the end of the file.
>
> HTH,
> Puneeth
2011-01-18 01:02:04 +01:00
Bastien Guerry c7d1e0f997 * org.el (org-fast-tag-selection): Fix bug when assigning keys
* org.el (org-fast-tag-selection): Fix bug when assigning keys
for fast tag selection.

Patch submitted by Jason Dunsmore.
2011-01-18 00:50:32 +01:00
Bastien Guerry f33ae10e36 org-blank-before-new-entry: Fix small typo in the docstring. 2011-01-18 00:03:49 +01:00
Bastien Guerry 888739a378 Merge branch 't/patch540' 2011-01-17 23:30:05 +01:00
Nick Dokos ddf3ab1048 How to write special LaTeX symbols
Xin Shi <shixin111@gmail.com> wrote:

>
> Shr\"odinger   will give the o with two dots on top. Notice that the " is a double quotation mark. 
>
> However, when org translate that into LaTeX, it will become two single quotation mark! \'' (it's very hard to see the difference, but the pdf version will
> see the wrong result).
>
> Could someone tell me how to do that?
>

It works correctly in headlines, but not in running text. I think [fn:1]
that it is a bug and that the following patch fixes it:

--8<---------------cut here---------------start------------->8---
--8<---------------cut here---------------end--------------->8---

but I have not tested it extensively and it may do more harm than good:
I'd wait for a more definitive opinion.

Alternatively, you can use UTF-8 in your org file and write Schrödinger
explicitly.  This will survive the LaTeX export intact and the
\usepackage[utf8]{inputenc} in the LaTeX file will do the right thing
with it.[fn:2]

Nick

Footnotes:

[fn:1] but I'm really not sure: I've lost track of how things work in
LaTeX export - sigh...

[fn:2] I'm not sure whether it will survive the email trip
though. Here's hoping that it will.
2011-01-17 23:28:16 +01:00
Bastien Guerry 4e15183e6d org-latex.el (org-export-latex-make-header): Fix inclusion of email. 2011-01-17 20:10:16 +01:00
Lawrence Mitchell f705ab0966 Allow inclusion of author's email in LaTeX export
* org-latex.el (org-export-latex-make-header): Export email in
author line if `org-export-email-info' is non-nil.

Previously exporting to LaTeX would not include the document author's
email address when org-export-email-info was set.  This patch corrects
this oversight using the \thanks command to add a footnote to the
author line.
2011-01-17 19:58:56 +01:00
Julien Danjou f4984b3205 Bug: Jumping to a date in the agenda changes view back to 'day' [7.4 (release_7.4.80.g0e5e5)]
On Mon, Jan 17 2011, Bernt Hansen wrote:
>
> Thanks for this patch.  I think this fixes the issue I was having with
> 'j' in the agenda switching from week-view back to single-day view when
> org-agenda-ndays is set to 1.
>
> There is still a (new?) problem with jumping to today.
>
> Set the following variable
>
> (setq org-agenda-start-on-weekday 6)
>
> | Key Sequence | Notes                                          |
> |--------------+------------------------------------------------|
> | C-c a a      | Display weekly agenda                          |
> | f            | Go forward a week                              |
> | d            | Display day agenda                             |
> | .            | Go to to day - but it goes to Saturday instead |
>
> This should go to today and not the first day of the week.

Attached is a fix for that.

>From f566a5612560f997f4760144ca850dda5c06bc5e Mon Sep 17 00:00:00 2001
From: Julien Danjou <julien@danjou.info>
Date: Mon, 17 Jan 2011 18:09:30 +0100
Subject: [PATCH] Fix org-agenda-goto-today not respecting the current span.

* org-agenda.el (org-agenda-goto-today): Respect current span.

Signed-off-by: Julien Danjou <julien@danjou.info>
2011-01-17 19:27:09 +01:00
Carsten Dominik 970dba19b1 Merge branch 'master' of git://orgmode.org/org-mode 2011-01-17 12:51:51 +01:00
Carsten Dominik a7ac1f5cc9 Fix bug with completion of TODO keywords
* lisp/org-complete.el (pcomplete/org-mode/link):
(pcomplete/org-mode/todo):
(pcomplete/org-mode/prop): Copy list before uniquifying.

For a description of the bug, see

http://thread.gmane.org/gmane.emacs.orgmode/35640
2011-01-17 12:51:43 +01:00
Eric Schulte eb3bf55d48 ob: new ":comments noweb" option for wrapping noweb references in comment links
* lisp/ob-tangle.el (org-babel-spec-to-string): Adding "noweb" as a
  linking comment type
  (org-babel-tangle-comment-links): Returns comment links for the
  source code block at point

* lisp/ob.el (org-babel-expand-noweb-references): When :comments is
  set to "noweb" then wrap noweb references in comment links.
2011-01-16 08:21:16 -07:00
Bastien Guerry 97b264a092 org-refile-check-position: explain how to clear the cache
* org.el (org-refile-check-position): send a more explicit
message on how to clear the cache before refiling again.
2011-01-15 18:29:07 +01:00
Carsten Dominik c747c7f7fb Merge branch 'global-skipping-condition' 2011-01-15 12:43:20 +01:00
Carsten Dominik a2ec41c79a Implement a global skipping condition
* lisp/org-agenda.el (org-agenda-skip-function-global): New option.
(org-agenda-skip-eval): New function.
(org-agenda-skip): Use `org-agenda-skip-eval' and also check for the
global skipping condition.

This was a request by John Wiegley
2011-01-14 11:28:41 +01:00
David Maus 163cd58ffd Handle timestamps after handling links
* org-html.el (org-export-as-html): Handle timestamps after handling
links.

otherwise a link description with an ISO date is handled as an
inactive timestamp and replaced by a timestamp span.

Bug reported by Vincent Belaïche.
2011-01-14 06:37:52 +01:00
Eric Schulte c8e5ba90cc ob: ob-jump-to-org is more robust to link comment impostors
* lisp/ob-tangle.el (org-babel-tangle-jump-to-org): Ever wider
  searches until either a matching block is found, or the limits of
  the file are reached.
2011-01-13 14:07:19 -07:00
Tassilo Horn 0dfde2da72 org-store-link on gnus message fails
Carsten Dominik <carsten.dominik@gmail.com> writes:

Hi Carsten,

> is that patch on the patchwork server?  If you find it, can you please
> send me the ID?

No, I cannot find it there.  I'll attach it to this mail.

From 4a0fe0bfd4aafed16f658e963fc10e966601d651 Mon Sep 17 00:00:00 2001
From: Tassilo Horn <tassilo@member.fsf.org>
Date: Thu, 13 Jan 2011 19:25:04 +0100
Subject: [PATCH 3/3] * org-gnus.el (org-gnus-store-link): Don't error out if mail
 has no or bogus Date: header.
2011-01-13 19:48:45 +01:00
Carsten Dominik bc841dcf23 Revert "Fix org-store-link in GNUS messages with date"
This reverts commit e599234d5c.
2011-01-13 18:31:34 +01:00
Eric Schulte 47537dcda8 ob: allow detangling of text containing '\'s -- Thanks to Seth Burleigh
* lisp/ob.el (org-babel-update-block-body): Literal argument to
  `replace-match' to allow insertion of text containing '\'.
2011-01-13 10:00:39 -07:00
Carsten Dominik 0ec831d2c8 Merge branch 'master' of orgmode.org:org-mode 2011-01-13 12:53:28 +01:00
Tassilo Horn e599234d5c Fix org-store-link in GNUS messages with date
* lisp/org-gnus.el (org-gnus-store-link):

org-store-link on gnus message fails
2011-01-13 12:52:42 +01:00
Eric Schulte f7a752f6d6 ob-ref: Allow passing empty strings into code blocks.
Thanks to Leo Alekseyev for pointing this out.

* lisp/ob-ref.el (org-babel-ref-parse): Allow passing empty strings
  into code blocks.
2011-01-11 20:40:13 -07:00
Carsten Dominik 378beac762 Fix sorting with a bold emphasis at beginning of line
* lisp/org.el (org-sort-entries): Fix sorting with a bold emphasis at bol
2011-01-11 20:34:08 +01:00
Carsten Dominik bff981d23f Merge branch 'master' of orgmode.org:org-mode 2011-01-11 19:54:51 +01:00
Eric Schulte 1c3ef40f24 ob: fixed bug in org-babel-read-result
Thanks to Leo Alekseyev for bringing this bug to my attention

* lisp/ob.el (org-babel-open-src-block-result): Must collect result
  *before* jumping to the result buffer.
2011-01-11 10:41:35 -07:00
Eric Schulte ea847dcb5f ob: fix small bug in `org-babel-src-block-names'
* lisp/ob.el (org-babel-src-block-names): Fix bug, wrong match-string
  used after update to regexp.
2011-01-11 10:14:13 -07:00
Eric Schulte e72f207c3e ob: ensure that org-babel-temporary-directory is bound before using
* lisp/ob.el (org-babel-temp-file):  Ensure that
  org-babel-temporary-directory is bound before using.
  (org-babel-remove-temporary-directory):  Safer error throwing.
2011-01-09 17:47:45 -07:00
Jason Dunsmore e703ea9823 `org-export-htmlize-output-type' docstring patch
I noticed the choices for org-export-htmlize-output-type aren't listed
in its docstring.  I had to load up the customize interface to see what
the choices were.
2011-01-08 19:00:44 +01:00
niels giesen 9f8b10413c Fix table export to docbook when field contains a backslash
* lisp/org-docbook.el (org-export-docbook-finalize-table): Do literal
replacements.
2011-01-08 18:53:30 +01:00
Eric Schulte 8674006516 ob: Uses org-src-lang-modes to resolve language names for evaluation.
* lisp/ob.el (org-babel-execute-src-block): Uses org-src-lang-modes to
  resolve language names for evaluation.
2011-01-07 11:41:15 -07:00
Carsten Dominik bd11460542 Make file and path accessible in capture templates
* lisp/org-capture.el (org-capture-templates): Add %f and %F escapes
(org-capture): Add more information to capture property list
(org-capture-fill-template): Handle %f and %F escapes
2011-01-07 15:28:57 +01:00
David Maus b4979a86ca Use mtime of symlink target
* lisp/org-publish.el (org-publish-cache-ctime-of-src): Use mtime of
symlink target.
2011-01-06 20:25:00 +01:00
Carsten Dominik dd23461349 Implement next-error and previous-error functionality for sparse trees
* lisp/org.el (org-occur-next-match): New function.
(org-mode): Set the variable `next-error-function'.
(org-highlight-new-match): Add an `org-type' property to the overlays.
* doc/org.texi (Sparse trees): Document the next-error / previous-error
functionality.

After a sparse tree construction, `M-g n' and `M-g p' will now jump to
the location of matches.
2011-01-06 12:36:22 +01:00
Carsten Dominik 08755d7aa9 Fix regexp in export engine 2011-01-05 17:53:41 +01:00
Eric Schulte ec97a121e5 don't require calc-trail when on xemacs, Thanks to Michael Sperber
* lisp/ob-calc.el: No longer require `calc-trail' on XEmacs
2011-01-05 09:37:12 -07:00
Bastien Guerry 8d879c3870 org-html.el: add a space before attributes in org-html-make-link. 2011-01-04 17:24:47 +01:00
Bastien Guerry a39c35fcd9 org-exp.el: Inhibit read-only when grabbing the title from a subtree.
Eric S. Fraga found this problem while trying to export a subtree from
a read-only file.
2011-01-04 17:03:14 +01:00
Bastien Guerry e246133d75 org-taskjuggler.el: fix a small typo. 2011-01-04 16:25:48 +01:00
Bastien Guerry ed824d4e46 org.el: don't try to remove space in comma-separated tags.
No space is allowed in the prompt, trying to remove them is
confusing when reading the code.
2011-01-04 16:15:33 +01:00
Bastien Guerry 881b73bd77 Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode 2011-01-04 16:10:51 +01:00
Carsten Dominik 8dfd845c7f Add contrib package org-eshell.el
* contrib/lisp/org-eshell.el: New file
* lisp/org.el (org-modules): Add `org-eshell'.
2011-01-04 16:06:09 +01:00
Bastien Guerry 591db35943 org.el: document optional argument for org-global-tags-completion-table 2011-01-04 15:19:23 +01:00
Carsten Dominik 00b59ec005 Add some additional stuff needed after moving org-special-blocks.el
* Makefile (LISPF): Add org-special-blocks to the list of Lisp files
* lisp/org-special-blocks.el (htmlp):
(latexp):
(line): Add defvars for dynamically scoped variables.
* lisp/org.el (org-modules): Move org-special-blocks into
the core modules section.
2011-01-03 22:08:10 +01:00
Bastien Guerry 57144fea1e Move org-special-blocks.el from contrib/lisp/ to lisp/
Carsten received the completed assignment of Chris Grays,
org-special-blocks.el author's.
2011-01-03 20:17:14 +01:00
Carsten Dominik a6255a6ab7 Remove duplicate definition of `org-plist-delete'
* org.el (org-plist-delete): Remove duplicate definition.

Patch by Julien Danjou.
2011-01-03 13:21:15 +01:00
Bernt Hansen 8dc6733a2a Display invisible entry text at point when visiting a task from the agenda
* lisp/org-agenda.el (org-agenda-goto): Display invisible entry text
* lisp/org-agenda.el (org-agenda-switch-to): Display invisible entry text

Visiting clock lines with RET or TAB in the agenda can put point on a
folded clock drawer.  This means you are editing invisible/hidden text
inside the task entry.  Now when moving to invisible regions show the
entry so point is always visible.
2011-01-03 13:16:43 +01:00
Carsten Dominik ca733df0d4 Move the category property refresh to org-get-category where possible
* lisp/org.el (org-get-category): New optional argument FORCE-REFRESH.
Automatically refresh if the property is not there.
(org-entry-properties): Remove refresh - this is now done in
org-get-category.
* lisp/org-clock.el (org-clock-insert-selection-line): Let `org-get-category'
do the property refresh.
* lisp/org-archive.el (org-archive-subtree): Force a refresh of
category properties.

Based on a patch by Julien Danjou.
2011-01-03 13:12:42 +01:00
John Wiegley 3922c2cbc1 Fixed the interval for day scattering
It was [0,LIM), now it's [1,LIM]
2010-12-27 03:34:40 -05:00
Carsten Dominik 55d664e6d3 Revert "Always return refreshed category"
This reverts commit f5bb1b7dbf.
2010-12-24 17:32:22 +01:00
Julien Danjou f5bb1b7dbf Always return refreshed category
* org-icalendar.el (org-print-icalendar-entries): Do not manually
  refresh categories.

* org-clock.el (org-clock-insert-selection-line): Do not manually
  refresh categories.

* org.el (org-get-category): Refresh categories if no category found.
(org-entry-properties): Do not manually refresh categories.
(org-prepare-agenda-buffers): Do not manually refresh categories.

It seems a very bad thing to call manually for a category refresh. It
seems better to try to refresh if we do not have a category.

Signed-off-by: Julien Danjou <julien@danjou.info>
2010-12-23 08:42:32 +01:00
Dan Davison 6eaad22a37 Check for clear-image-cache before using it
* lisp/org.el (org-display-inline-images): Check for clear-image-cache
before using it.
2010-12-23 08:36:42 +01:00
Bernt Hansen ca1b251f19 Add missing value to docstring for org-link-frame-setup
* lisp/org.el: Document missing value for org-link-frame-setup
2010-12-23 08:27:38 +01:00
Dan Davison f7bca4ed1a ob-R: Don't handle errors in R; expose to Org-babel error handling.
* lisp/ob-R.el (org-babel-R-write-object-command): Force evaluation of
user code prior to the R exception-handling, so that errors in user
code are unhandled.
2010-12-22 15:19:57 +00:00
Dan Davison 7fa375d632 Avoid errors during fontification of src blocks.
* lisp/org-src.el (org-src-font-lock-fontify-block): Test, early on,
that a major-mode function corresponding to the language string
exists.

Thanks to Bernt Hansen for the report and investigation.
2010-12-22 11:50:42 +00:00
Nicolas Goaziou 478eabccbd org-exp: ensure list ending marker is inserted on a line on its own
* lisp/org-exp.el (org-export-mark-list-ending): insert additional
  newline characters if end-list-marker is at a wrong position.

This solves a problem arising when exporting a region to HTML with a
list ending at the end of region. The marker would then be inserted on
the last line, following text from the list.
2010-12-22 09:54:14 +01:00
Eric Schulte 1d3db31ca7 ob: better parsing of list output from scripting languages
* lisp/ob.el (org-babel-script-escape): Replace commas with spaces for
  better list reading when list items are packed with commas,
  e.g. Haskell list output.
2010-12-21 20:18:07 -07:00
Eric Schulte 9bf88fddfc ob-sass: uses ob-eval for better error reporting
* lisp/ob-sass.el (org-babel-execute:sass): Uses ob-eval for better
  error reporting.
2010-12-21 20:17:18 -07:00
Charles Sebold 9c4b936c0e ob-sql: header line in results table 2010-12-21 10:33:37 -07:00
Eric Schulte ece347e32c org-babel-confirm-evaluate: better doc and code when using function as
Thanks to Vladimir Alexiev for submitting this patch

* lisp/ob.el (org-babel-confirm-evaluate): Fix for the case when
  org-confirm-babel-evaluate is a function (used to always ask no matter
  what the function returns).
* doc/org.texi (Code evaluation security): Add example for using a
  function.
2010-12-21 09:37:19 -07:00
Dan Davison d234a9973b ob-R: Delete duplicated function
* lisp/ob-R.el: Delete duplicated function
2010-12-21 14:20:14 +00:00
Eric Schulte 4e146a5ac2 ob: a little more refactoring
* lisp/ob.el (org-babel-execute-src-block): Removed unused flet function.
2010-12-21 14:19:25 +00:00
Dan Davison e030d95ddb ob: language-specific changes in response to :file arg changes
These languages are capable of writing results to file; for several of
them this is their only mode of operation. These changes cause the
languages to return to ob.el either the computed result, or nil, when
they have written results to file themselves. This is in place of the
previous method of returning the output file name as a string to
ob.el.

* lisp/ob-asymptote.el (org-babel-execute:asymptote): Return nil to
signal that the intended content has been written to file.
* lisp/ob-ditaa.el (org-babel-execute:ditaa): Return nil to signal
that the intended content has been written to file.
* lisp/ob-dot.el (org-babel-execute:dot): Return nil to signal that
the intended content has been written to file.
* lisp/ob-gnuplot.el (org-babel-execute:gnuplot): Return nil to signal
that the intended content has been written to file.
* lisp/ob-latex.el (org-babel-execute:latex): Return nil to signal
that the intended content has been written to file.
* lisp/ob-mscgen.el (org-babel-execute:mscgen): Return nil to
signal that the intended content has been written to file.
* lisp/ob-octave.el (org-babel-execute:octave): Return result; not
name of output file.
* lisp/ob-plantuml.el (org-babel-execute:plantuml): Return nil to
signal that the intended content has been written to file.
* lisp/ob-python.el (org-babel-execute:python): Return result; not
name of output file.
* lisp/ob-ruby.el (org-babel-execute:ruby): Return result; not
name of output file.
* lisp/ob-sass.el (org-babel-execute:sass): Return nil if result has
been written to file
2010-12-21 14:19:24 +00:00
Dan Davison 6bcbdce949 ob-R: Respond to changes in handling of :file header argument
":results graphics" is now required in addition to ":file filename" in
order for graphical output to be sent automatically to file. If :file
is supplied, but not ":results graphics", then the default behavior
obtains: i.e., either "value" or "output" results are written to file,
depending on which of those options is in effect.

* lisp/ob-R.el (org-babel-R-graphical-output-file): New function
returns the name of the output file iff R has been instructed to send
graphical output to file by means of the ":results graphics"
directive.
(org-babel-expand-body:R): Use `org-babel-R-graphical-output-file'
when constructing the R code to evaluate, which may be augmented with
code implementing the writing of graohical output to file.
(org-babel-execute:R): Use `org-babel-R-graphical-output-file' to
determine whether R is taking responsibility for writing output to
file; if so, this is signalled to ob.el by returning a nil result.
2010-12-21 14:19:24 +00:00
Dan Davison 366abc6175 ob: Refactoring
* lisp/ob.el (org-babel-format-result): New function to format results
of src block execution.
(org-babel-execute-src-block): Use `org-babel-format-result' when
writing to file.
(org-babel-open-src-block-result): Use `org-babel-format-result' when
displaying results in a buffer; name results buffer differently.
2010-12-21 14:19:24 +00:00
Dan Davison 70349cd0c2 ob: Bug fix in writing results to file
* lisp/ob.el (org-babel-execute-src-block): Avoid calling
`orgtbl-to-generic' on number results
2010-12-21 14:19:24 +00:00
Eric Schulte e0b7927678 ob: :sep specifies table separator when opening or writing tabular results
* lisp/ob.el (org-babel-execute-src-block): Allow specification of
  table separator with :sep header argument.
  (org-babel-open-src-block-result): Allow specification of table
  separator with :sep header argument.
2010-12-21 14:19:24 +00:00
Dan Davison 74d752b4b5 ob: Wipe error buffer before executing buffer/subtree
* lisp/ob.el (org-babel-execute-buffer): Wipe error buffer at outset
of executing buffer (note that this handles execute subtree also).
2010-12-21 11:06:35 +00:00
Dan Davison fc70272de9 Merge branch 'master' of ssh://repo.or.cz/srv/git/org-mode 2010-12-21 11:06:24 +00:00
Nicolas Goaziou d30d00023a org-inlinetask: remove case-sensitivity at end line, improve code comments
* lisp/org-inlinetask.el (org-inlinetask-in-task-p): small
  refactoring, do not modify match data either.
(org-inlinetask-goto-end): small refactoring, remove case-sensitivity.
(org-inlinetask-goto-beginning): small refactoring, remove case-sensitivity.
2010-12-21 11:06:58 +01:00
Carsten Dominik ce157879de Fix typo 2010-12-21 08:26:34 +01:00
Dan Davison 607efd4e30 Starting on new R graphics scheme 2010-12-20 17:35:23 +00:00
Dan Davison a871c6a77c new :results behavior 2010-12-20 16:44:24 +00:00
Carsten Dominik 5f77fd6a81 Merge branch 't/patch491' 2010-12-20 15:50:23 +01:00
Carsten Dominik f9e174b74e Merge branch 't/patch490' 2010-12-20 15:50:04 +01:00
Carsten Dominik f11b134b46 Merge branch 't/patch489' 2010-12-20 15:49:44 +01:00
Carsten Dominik af33cb709a Fix bug with capture to datetree
* lisp/org-capture.el (org-capture-set-target-location): Use `current-time'.
2010-12-20 15:14:00 +01:00
Bernt Hansen de62618009 Fix before first heading check
* lisp/org.el (org-before-first-heading-p): If point is on an org-mode heading line then we are not before the first heading

If point is anywhere on the first line of the first heading then we
are not before the first heading.  This makes
org-before-first-heading-p returns t instead of nil when on the '*' or
blank of the first level 1 heading in an org file.

This was noticed when the first heading has an encryption
tag :crypt:. C-c C-r would not decrypt this entry if point is at the
beginning of the line since it was considered before the first
heading.
2010-12-20 13:22:05 +01:00
Carsten Dominik 3ceee2fefe Timer: Run a hook when relative timer is continued
* lisp/org-timer.el (org-timer-continue-hook): Define the variable
(org-timer-pause-or-continue): Run hook after relative timer is
continued

There was a hook run when the relative timer is paused (and for most
other actions), but none for continuing afterwards.

One use for this would be to pause/continue playback in a media-player
app with the same keystroke used to pause/continue the timer.

TINYCHANGE

Patch by Christian Moe
2010-12-20 13:18:27 +01:00
Julien Danjou 2be22d9aa4 org-agenda: allow %() in prefix format
* org-agenda.el (org-compile-prefix-format): Allow %() expression.

Signed-off-by: Julien Danjou <julien@danjou.info>
2010-12-20 13:13:13 +01:00
Julien Danjou f73b121549 org-capture: use org-eval
* org-capture.el (org-capture-fill-template): Use org-eval.
2010-12-20 13:12:48 +01:00
Julien Danjou 2c1925f2a5 Add org-eval
* org-agenda.el (org-eval): New function.

Signed-off-by: Julien Danjou <julien@danjou.info>
2010-12-20 13:12:25 +01:00
Carsten Dominik a43055a26f Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode 2010-12-20 13:09:58 +01:00
Dan Davison d6fefb406e babel: Interpret string results as file links with :results file
* lisp/ob.el (org-babel-execute-src-block): With :results file, when
:file is not supplied, interpret result as a file link as long as it
is a string.
2010-12-19 14:25:18 +00:00
David Maus 2a3663b314 Don't convert link description parts that look like numeric footnote
* lisp/org-latex.el (org-export-latex-preprocess): Don't convert link
description parts that look like numeric footnote.

Fixes a problem reported by Thomas S. Dye.
2010-12-19 14:54:16 +01:00
Eric Schulte d37705391e allow specification of table*, tabularx and tabulary table environments
e.g.

  #+CAPTION: A wide table with tabulary
  #+LABEL: tbl:wide
  #+ATTR_LaTeX: table* tabulary width=\textwidth align=l|lp{3cm}r|l
  | 1 | 2 | 3 |
  | 4 | 5 | 6 |

  #+CAPTION: A normal table with tabularx
  #+LABEL: tbl:wide
  #+ATTR_LaTeX: table tabularx width=\textwidth align=l|lp{3cm}r|l
  | 1 | 2 | 3 |
  | 4 | 5 | 6 |

  Thanks to Tom Dye for suggestions and LaTeX background knowledge.

* lisp/org-latex.el (org-export-latex-tables): Allowing specification
  of tabular[xy] inner environments through the ATTR_LaTeX line.
2010-12-17 13:36:09 -07:00
Julien Danjou ce837d0e8f org: rework `org-set-property'
* org-capture.el (org-capture-fill-template): Use `org-set-property'
directly.

* org.el (org-set-property): Split property and values reading.
(org-read-property-name, org-read-property-value)
(org-set-property-function): New functions.
(org-property-set-functions-alist): New variable.

The goal of this patch is to introduce a special variable
`org-property-set-functions-alist'. This variable allows to read
properties values in a more intelligent way from `org-set-property' or
from `org-capture'.

For that, it simplifies the `org-set-property' code and remove
duplication between `org-capture' and `org-set-property'.

Signed-off-by: Julien Danjou <julien@danjou.info>
2010-12-17 18:37:30 +01:00
Julien Danjou 3b9822f1a9 Fix org-agenda-prefix-format docstring
* org-agenda.el (org-agenda-prefix-format): Add missing `search' item
  in docstring.

Signed-off-by: Julien Danjou <julien@danjou.info>
2010-12-17 18:23:56 +01:00
Eric Schulte f8000a9bc1 org-export-string now accepts symbolic or string fmt argument
* lisp/org-exp.el (org-export-string): Use `format' to construct
  function call to allow symbolic or string arguments.
2010-12-16 18:09:51 -07:00
Carsten Dominik 8aacc708dd Capture: Better error message for invalid entry-type templates
* lisp/org-capture.el (org-capture-place-entry):
(org-capture-insert-template-here): Check tree for validity before
pasting it.
2010-12-16 16:51:04 +01:00
Julien Danjou dece850eca org-gnus: trim date
* org-gnus.el (org-gnus-store-link): Trim date.

Signed-off-by: Julien Danjou <julien@danjou.info>
2010-12-16 14:21:26 +01:00
Julien Danjou 073391f5a7 Allow to retrieve email link date
* org.el (org-email-link-description): Allow to retrieve email link date.

Signed-off-by: Julien Danjou <julien@danjou.info>
2010-12-16 14:17:54 +01:00
Lawrence Mitchell 32be74e098 Quote any special characters in org-make-target-link-regexp
* lisp/org.el (org-make-target-link-regexp): regexp-quote target
before replacing whitespace.

Previously a radio link <<<...>>> would match all three-letter words
in the buffer.  The manual indicates the radio links are meant to
match literally (modulo whitespace differences), so we should
regexp-quote all the targets to avoid over-eager matching.
2010-12-16 14:12:28 +01:00
John Wiegley c61cdced2f Undid one of the scatter-related changes 2010-12-15 23:31:19 -05:00
Eric Schulte f5f2851401 Noweb references can now be resolved from the library of babel.
* lisp/ob.el (org-babel-expand-noweb-references): Noweb references can
  now be resolved from the library of babel.
2010-12-15 10:16:58 -07:00
Eric Schulte e919c97d7e fixed insertion of trailing newline after code block evaluation
* lisp/ob.el (org-babel-result-end): No longer leaving trailing new
  line after block removal.
2010-12-15 09:58:57 -07:00
Carsten Dominik 8eee473f37 Anchor outline regexp during LaTeX tree export
* lisp/org-latex.el (org-export-latex-first-lines): Anchor outline
regexp during LaTeX tree export

Jrg Hagmann writes:

> - If you export the (new) minimal example below to latex (C-cC-e l), it works.
> - If you only export a tree (Subtree in the example; C-cC-e 1 l), the first table ends at the horizontal line and everything between it and the next node (Subsubtree) is eliminated. The second (identical) table is exported correctly.
> - If you remove the asterisk(s) in the first table, it works.
>
> This problem crept in in the last days or weeks before 7.4.
>
> It may not be a problem for most of you, but I happen to have a number of files where columns are automatically displayed as tables preceding the first subnode (#+BEGIN: columnview ...). An alternative would be to display %ITEM in column-view without the asterisks.
>
> Emacs 23.2.1 on OS X 10.6.5
> Org-mode version 7.4 (release_7.4.24.g48b11.dirty)
>
> Thanks, Jrg
>
> -------New minimal example------------
> * Subtree
>
>
> | One    | Two  | Three |
> |--------+------+-------|
> | * Test | text | text  |
> | ** One | text | text  |
>
>
> Some text
>
> ** Subsubtree
>
> | One    | Two  | Three |
> |--------+------+-------|
> | * Test | text | text  |
> | ** One | text | text  |
2010-12-15 12:37:45 +01:00
Bastien Guerry eb0d35dd18 Fix typo (which broke lisp/org.el).
Thanks to Matt Lundin for a warning about this.
2010-12-14 21:48:43 +01:00
John Wiegley 48b11c4420 Fixed an improper use of org-today 2010-12-14 02:02:41 -05:00
John Wiegley 14350cac34 Added FILE meta-property 2010-12-14 02:02:40 -05:00
Konrad Hinsen 8916e948d2 ob-python: ensure py-which-bufname is initialized
* lisp/ob-python.el (org-babel-python-initiate-session-by-key): Make
  sure that py-which-bufname is initialized, as otherwise it will be
  overwritten the first time a Python buffer is created.
2010-12-13 18:47:46 -07:00
Eric Schulte 19a0ca3182 ob-sh: Better escaping of variables with spaces.
* lisp/ob-sh.el (org-babel-sh-var-to-sh): Better escaping of variables
  with spaces.
2010-12-13 13:56:03 -07:00
Eric Schulte e3aeb07a17 ob-org: Padding code block with an empty title on LaTeX export.
* lisp/ob-org.el (org-babel-execute:org): Padding code block with an
  empty title on LaTeX export.
2010-12-13 13:23:10 -07:00
Matt Lundin 4760c3b948 Make timestamp search in org-entry-properties more efficient.
* lisp/org.el: (org-entry-properties) Stop scanning for timestamps if
a specific timestamp property (e.g., DEADLINE, SCHEDULED, etc.) is
requested and a match is found. Also, if a specific timestamp property
is requested, do not push non-relevant timestamps onto property list.

This change only effects org-entry-properties when a specific
timestamp is requested with the special flag, as in:

(org-entry-properties nil 'special "SCHEDULED")

Previously, even if only the SCHEDULED timestamp was requested,
org-entry-properties would parse all the timestamps in an entry. This
extra parsing could slow down the construction of agenda views,
especially with entries that contained a large number of log
items (CLOCK, state changes, etc.). The function org-entry-get,
however, is only interested in the first occurrence of the item. When
looking for a specific type of timestamp, org-entry-properties now
stops searching for timestamps after the match is found, unless the
property is "CLOCK".

Here are the relevant ELP results:

Before:

org-entry-get	     296         0.4724579999  0.0015961418
org-entry-properties 31          0.3438769999  0.0110928064

After:

org-entry-get        296         0.1447729999  0.0004890979
org-entry-properties 31          0.015765      0.0005085483
2010-12-13 15:13:36 +01:00
Carsten Dominik 98015f3748 Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode 2010-12-13 15:11:14 +01:00
Carsten Dominik fbe3eb4d2a Fix display of current time to show up only today
* lisp/org-agenda.el (org-agenda-add-time-grid-maybe): Show time only
when grid is being made for today.

Patch by Matt Lundin
2010-12-13 10:43:37 +01:00
John Wiegley 3542f0eed9 Scattering tasks first resets them to "today" 2010-12-13 01:20:04 -05:00
Matt Lundin bca4ac9998 Optimize calls to org-is-habit-p
* lisp/org-agenda.el: (org-agenda-get-scheduled) Don't call
  org-is-habit-p until after checking for for
  org-agenda-skip-scheduled-if-done.

Org-agenda-get-scheduled was calling org-is-habit-p on every scheduled
item (including DONE items when org-agenda-skip-scheduled-if-done was
set to t). Tweaking the timing of the test shaves some time off of
agenda construction when org-habit is loaded and
org-agenda-skip-scheduled-if-done is t.

Before:  org-is-habit-p  478         0.2434439999  0.0005092970
After:   org-is-habit-p	 81          0.057944      0.0007153580
2010-12-12 22:26:23 +01:00
Carsten Dominik b65ba05758 Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode 2010-12-12 20:45:40 +01:00
Achim Gratz 8dfd6a6140 Fixup 95bb16661b
* org.el: remove spurious linebreak introduced by earlier patch
* ob.el, ob-ref.el: remove double fix of the same problem

Achim Gratz <Stromeko@Stromeko.DE> wrote:

> this patch had already been partially applied by Carsten and Eric (in
> slightly a different way than I suggested).  The changes to ob.el and
> ob-ref.el (the require statements) are therefore superfluous and should
> probably be backed out.  There was also a superfluous whitespace change
> in org.el (a closing paren that was broken onto the next line).  Patch
> to this effect is attached.  You've already cleaned up org-agenda.el and
> the conditions in org-macs...
2010-12-12 20:09:28 +01:00
Carsten Dominik 5f44294c83 Support #+CONSTANTS in non - Org-mode files
* lisp/org-table.el (orgtbl-ctrl-c-ctrl-c): Parse buffer for constants.

Patch by Seweryn
2010-12-12 13:22:11 +01:00
Łukasz Stelmach 93135fa814 Add displaymath to MathJax setup
* lisp/org-html.el (org-export-html-mathjax-template): displaymath
environment and MathJax

Greetings All.

The following patch makes MathJax consider \begin{displaymath} and
\end{displaymath} as math environmetn boundaries. For someone who, like
me, keeps "The not so short introduction to LaTeX2e" alway around, the
displaymath environment is the default way to introduce a block of math.

In fact '\[' and '\]' are also mentioned there but the environment is
used in every single example so the patch minimizes the surprise.
2010-12-12 13:13:45 +01:00
Carsten Dominik 1495bc6b08 Add current time to time grid in agenda
* lisp/org-faces.el (org-agenda-current-time): New face.
* lisp/org-agenda.el (org-agenda-show-current-time-in-grid):
(org-agenda-current-time-string): New options.
(org-agenda-add-time-grid-maybe): Add current time to time grid.
2010-12-12 09:26:01 +01:00
Łukasz Stelmach ad006dea13 sexp can set its face (was: Including current time in agenda)
suvayu ali <fatkasuvayu+linux@gmail.com> writes:

> I actually tried to set the text properties for the string instead,
> but looks like org-agenda is ignoring that.
>
> (defun jd:org-current-time ()
>   "Return current-time if date is today."
>   (when (equal date (calendar-current-date))
>     (propertize (format-time-string "%H:%M Current time") 'font-lock-face
> 		'(:weight bold :foreground "DodgerBlue4" :background "snow"))))

To accomplish this you'd have to apply the following patch and use 'face
property rather than font-lock-face.

Why can't a sexp choose its 'face after all?

--8<---------------cut here---------------start------------->8---
--8<---------------cut here---------------end--------------->8---
2010-12-12 08:38:38 +01:00
Carsten Dominik 651e137c50 Make sure windows are created correctly on full-screen sessions
Patch by Leo
2010-12-12 08:36:49 +01:00
Carsten Dominik 7666ba421f Version number back to 7.4 2010-12-10 18:49:40 +01:00
Carsten Dominik 76a25715c9 Bump version number to 7.5 2010-12-10 18:43:10 +01:00
Carsten Dominik 1330048ba0 Keep byte compiler happy 2010-12-10 14:13:05 +01:00
Carsten Dominik 9df61b6c3e Fix typos 2010-12-10 11:12:56 +01:00
Tassilo Horn 21d4acf035 Place Footnotes section before signature in all message-mode derived modes.
* org-footnote.el (org-footnote-create-definition): Place Footnotes
  section before message-signature-separator also in modes derived
  from message-mode.
2010-12-10 07:34:27 +01:00
Carsten Dominik 3c7dd8487d XEmacs compatibility: temp dir 2010-12-10 07:33:15 +01:00
Julien Danjou 330721f406 org: remove useless computed value in org-make-tags-matcher
* org.el (org-make-tags-matcher): Remove useless cat-p value.

Signed-off-by: Julien Danjou <julien@danjou.info>
2010-12-10 07:30:24 +01:00
Julien Danjou 8c2f37270d org-entry-properties: enhance docstring
* org.el (org-entry-properties): Enhance docstring.

Signed-off-by: Julien Danjou <julien@danjou.info>
2010-12-10 07:29:14 +01:00
Nicolas Goaziou 9966f922f3 Do not break lists with blocks within when exporting
* lisp/org-list.el (org-list-top-point-with-indent,
  org-list-bottom-point-with-indent): Pay also attention to
  'original-indentation property of text, as blocks are put to column
  0 upon exporting.
2010-12-09 09:54:42 +01:00
Dan Davison c6a945e82c babel: Handle errors when temporary directory is on a different partition
* lisp/ob.el (org-babel-remove-temporary-directory): Handle exception
  with message informing of failure to remove directory.

Thanks to Antti Kaihola for the bug report:

http://thread.gmane.org/gmane.emacs.orgmode/34394

From: Antti Kaihola <akaihola <at> gmail.com>
Subject: Can't close Emacs+org-mode if /tmp and /home on different	partitions
Newsgroups: gmane.emacs.orgmode
Date: 2010-12-02 08:33:28 GMT (6 days, 1 hour and 22 minutes ago)
I have /tmp on my root partition and a separate partition for /home.
When trying to close an Emacs session which is using org-mode, I get
this error:

    move-file-to-trash: Non-regular file: Is a directory, /tmp/babel-XXXXXXX

(where XXXXXXX are random characters).

I tracked down the problem to org-babel-remove-temporary-directory
which ob.el adds to kill-emacs-hook. It tries to remove the temporary
directory using delete-directory, which in turn tries to move the
directory (by renaming) into trash, which is in my home directory.

I added this to my ~/.emacs.d/init.el:

   (custom-set-variables '(temporary-file-directory "/home/akaihola/tmp/"))

and closing Emacs works correctly again. However, since my init.el is
part of emacs-starter-kit which I update frequently, I'd prefer not to
modify that file. Unfortunately the customization hook
emacs-starter-kit provides (~/.emacs.d/custom.el) is loaded too late
to affect the temporary directory.

I'm running emacs-snapshot 1:20090909-1 in Ubuntu 10.10. Looks like
this is really an Emacs bug and is already fixed:
http://groups.google.com/group/gnu.emacs.bug/browse_thread/thread/0446b8684a8ef504
2010-12-08 10:11:49 +00:00
Eric Schulte be882617ad ob-clojure: reading `package' header argument from heading properties
* lisp/ob-clojure.el (org-babel-header-arg-names:clojure): Adding
  `package' to the list of Clojure header arguments which will be read
  from heading properties.
2010-12-07 21:08:31 -07:00
Nicolas Goaziou b3e16cda95 inlinetask: illustrate LaTeX export template with a new example
* lisp/org-inlinetask.el (org-inlinetask-export-templates): added
  Sébastien Vauban's suggestion for LaTeX export in docstring. This is
  not default as it requires an additional LaTeX package: "todonotes".
2010-12-06 19:24:00 +01:00
Nicolas Goaziou 2c23f2f064 New configurable way to export inline tasks
* org-inlinetask.el (org-inlinetask-export-templates): new variable
* org-inlinetask.el (org-inlinetask-export-handler): make use of
  templates to export inline tasks
2010-12-06 19:13:09 +01:00
Nicolas Goaziou aa9fbbb323 Fix cycling indentation with inline tasks
* org.el (org-current-level): ignore inline tasks when getting current
  level of entry
2010-12-06 19:13:09 +01:00
Nicolas Goaziou 5bbce0473d Fix indentation after an inline task with drawers
* org.el (org-indent-line-function): ignore drawers inside inline
  tasks  if the line to indent isn't inside an inline task itself.
2010-12-06 19:13:09 +01:00
Nicolas Goaziou 85591ffcbf Fix indentation of text after an inline task in indent-mode
* org-inlinetask.el (org-inlinetask-get-task-level): new function
* org-indent.el (org-indent-add-properties): find true level of indentation wrt inline tasks.
2010-12-06 19:13:09 +01:00
Nicolas Goaziou 9be9f727f8 Fix LaTeX export of subtrees and inline tasks 2010-12-06 19:13:09 +01:00
Nicolas Goaziou 5ecd79ea74 Handle inline tasks when marking a subtree
* org-inlinetask.el (org-inlinetask-outline-regexp): new function
* org-inlinetask.el (org-inlinetask-goto-beginning): new function
* org-inlinetask.el (org-inlinetask-goto-end): new function
* org.el (org-mark-subtree): new command
* org.el (org-speed-commands-default, org-mode-map): make use of new command
2010-12-06 19:13:09 +01:00
Nicolas Goaziou cd70dc1038 inlinetasks: fix latex export wrt conversion to lists
* org-inlinetask.el (org-inlinetask-export-handler): Remove protection
  from @<span class...> so it can be removed during LaTeX export.
2010-12-06 19:13:09 +01:00
Eric Schulte 1ce04c5057 updating Code block evaluation messages
Thanks to Sébastien Vauban for suggesting these changes.

* lisp/ob.el (org-babel-insert-result): More informative code block
  evaluation messages.
2010-12-06 08:04:17 -07:00