The content of blocks like #+begin_example will be marked with a
separate face. That same face is also used for single lines
introducing text for specific backends.
This commit introduces two new variables:
- org-treat-insert-todo-heading-as-state-change
Default is nil. When set to t, adding a new TODO item will be done
by adding an item and the executing an "official" state change which
potentially will trigger state logging.
- org-treat-S-cursor-todo-seletion-as-state-change
Default is t. When set to nil, selecting a TODO state with
S-left/right will not trigger logging, only selecting a new state
with `C-c C-t'. I actually like this a lot and would even consider
making this the default.
Setting the new option `org-hierarchical-todo-statistics' to nil will
make TODO statistics to be computed recursively. This means, not only
the direct children of a node contribute to its TODO statistics, but
the entire subtree.
You can also set the COOKIE_DATA property and add the word "recursive"
there to get recursive statistics for a specific tree.
Hsiu-Khuern Tang writes:
> Hi Carsten,
>
> You recently changed org-edit-src-code to use a separate buffer
> instead of an indirect buffer. One side effect of this is that I
> can no longer edit several code examples at the same time:
> opening the second buffer will silently discard any changes made
> in the first. I would prefer this behavior: when opening the
> second edit source buffer, write any changes in the first buffer
> to the originating Org buffer (but don't save it, of course).
>
> Another approach is to use different buffer names.
The better approach is clearly to allow several buffers, now
implemented with this commit.
The commit implements a general mechanism for providing special
(e.g. completion) support for specific link types when entering links
with `C-c C-l'. After calling `C-c C-l', you may now press RET after
inserting a link prefix, and Org will look for a function
`org-PREFIX-complete-link'. Such functions may be defined for any
link types, including link abbreviations. Currently, Org has
`org-file-complete-link' for file name completion, and
`org-bbdb-complete-link' for completion of record names from BBDB.
Peter Westlake writes:
> On Fri, 8 May 2009 06:24:54 +0200, "Carsten Dominik"
> <carsten.dominik@gmail.com> said:
>
> I anyone could make an example that allos me to reproduce this
> problem, then I might be able to fix it.
>
> It's trivial:
>
> * top
> ** sub 1
> Set org-cycle-include-plain-lists.
> Type TAB on this line, and the whole of top gets folded.
>
> ** sub 2
> This entry is not needed to reproduce the bug. It just
> makes it more visible.
There was indeed a bug, I think it is fixed now.
Editing source code examples and pictures is not done in a truly
separate buffer, not in an indirect buffer. Indirect buffers had
caused problems with fontification, for example.
Thomas Morgan writes:
> I just tried exporting an Org file with LaTeX fragments to HTML
> on a computer that doesn't have dvipng. There were error messages
> in *Messages* ("Failed to create png file..."), but this wasn't
> obvious to me at first glance because those messages were replaced
> in the echo area by "Exporting... done" before I could see them.
>
> So I was wondering, is there a good way to make the user aware of
> those errors? Maybe by printing "Exporting... done (with errors)"?
There is now a better error message when either the latex or the
dvipng program does not exist.
Matt Lundin writes:
> If it's not too much trouble, I was wondering if I could
> request the following properties to set export options for
> subtrees:
>
> EXPORT_AUTHOR
> EXPORT_DATE
>
> In addition to specifying an EXPORT_FILE and EXPORT_TITLE
> for a subtree, I often find myself wanting to change the
> date and author lines.
The variable `org-refile-target-verify-function' can be set to a
function that will be called to verify a refile target. The function
must return t if the target is valid.
Sometimes refiling a task displays the next task heading after ... at the
end of a folded task. This keeps the next task the cursor is on starting
in column 1 which feels more natural.
When refiling, you can now create new parent nodes on the fly. To do
this, set the variable `org-refile-allow-creating-parent-nodes' to
`confirm'. Then, at a refiling prompt, proceed with completion until
you have an existing heading, and then add "/new heading", i.e. a
slash followed by the new heading. That heading will be created as a
child of the existing heading, and the entry to be refiled will end up
under that new heading.
Time stamps in LaTeX export now also honor custom time stamp formats.
Furthermore, the new option `org-export-latex-timestamp-markup' can
specify special markup for time stamps.
Samuel Wales writes:
> A lower case version of a todo kw at the beginning of a
> headline, when in lower case, causes sort to ignore the
> word.
>
> Also, setting priority with shift down causes the cookie to
> be inserted in the wrong place.
Both problems are address in this commit.
The following contributed packages are (partially) obsolete.
org-browser-url.el
org-annotation-helper.el
The functionality of both these packages is a subset of
org-protocol.el, which is now part of the Emacs core
and is recommended.
org-depend.el
A significant fraction of the org-depend functionality
dependence on siblings, children, and parents) is now
built-in into the Org core. Org-depend remains
in the distribution as a proof-of-concept fro complex
and remote dependencies.
org-interactive-query.el
I believe that much of what this package was build for
is now available with tag filtering.
These packages are now marked in org-modules as such.
The command org-reload did not only reload any loaded files, but all
lisp files in the Org distribution. Also, it actually never reloaded
any files from the contrib directory. Both of these problems are now
fixed.
Mapping call a function for each matching entry. So far this has
always assumed that the entry stays in the buffer and search can
continue from there. However, when the mapper function removes the
tree, more control is needed to specify from where the search should
continue.
The action function handed to the mapping function can now set the
variable `org-map-continue-from' to the position from where mapping
should continue.
Daniel Hochheimer writes:
> It seems there is a bug in the handling of simple dependencies.
> I think an example tree is the best solution, to show you the bug:
>
> * Projects
> #+CATEGORY: Projects
> *** TODO foo bar project
> :PROPERTIES:
> :ORDERED: t
> :END:
> ***** TODO foo subproject :FooSubproject:
> ******* TODO Task 1
> ***** TODO bar subproject :BarSubproject:
> ******* TODO Task 1
>
> This is in my .emacs file:
> (setq org-enforce-todo-dependencies t)
> (setq org-agenda-dim-blocked-tasks 'invisible)
> (setq org-odd-levels-only t)
>
> the expected global todo agenda view imho is:
>
> Projects: Task 1 :FooSubproject:
>
> but actual it is unfortunately:
>
> Projects: Task 1 :FooSubproject:
> Projects: Task 1 :BarSubproject:
>
>
> Imho "Task 1" from "bar subproject" should not be visible,
> because "bar subproject " is blocked because of the
> ORDERED property (therefore it's childs should be blocked, too)
>
>
> Is it easy / possible to fix this bug? My whole GTD system is
> heavily based on such project / subproject-Constructs. But with
> this bug my global todo agenda view is unfortunately "polluted"
> a little bit with tasks from projects that shouldn't be active.
After some back and forth, Daniel convinced me, and this is now done
correctly.
With the setting
(setq org-refile-use-outline-path 'file)
the file names ended up twice, like
"xxx.org/level 1/level 2 (xxx.org)"
Now the second occurrence is omitted.
Rustom Mody writes:
> The last two lines of my org file are
>
> *** Vishnu Sahasranam
> *** Ram Navami
>
> without a newline at the end
>
> Trying to reorder these two lines I do a M-S-down on second last
> line I get
>
> *** Ram Navami*** Vishnu Sahasranam
This module implements inline tasks in Org-mode. Inline tasks are
tasks that have all the properties of normal outline nodes, including
the ability to store meta data like scheduling dates, TODO state, tags
and properties. However, these nodes are treated specially by the
visibility cycling and export commands.
RefTeX can now be used to create a citation in Org-mode buffers.
Setup the buffer with #+BIBLIOGRAPHY: bibbase style
and create citations with `C-c C-x ['.
Chris Leyon writes:
> For some semi-short time, org-ido-switchb has been broken, complaining
> about wrong type arguments. The attached one-line patch corrects
> this.
Patch by Chris fixes this problem.
Harri Kiiskinen writes:
> It seems that org-use-tag-inheritance set to regexp, the use of
> #+FILETAGS: and org-todo-list do not work together. It seems, that a
> regexp in org-use-tag-inheritance matching a tag set in #+FILETAGS
> causes this error:
>
> Debugger entered--Lisp error: (wrong-type-argument stringp nil)
> string-match("^ +" nil)
> [...]
> when org-use-tag-inheritance is set to regexp "te"
> with this file:
>
> --------
> #+STARTUP:
> #+FILETAGS: tea
> * TODO testing :test:
> ** TODO too :data:
> -----
>
> When the regexp is "tes", so that the FILETAG does not match,
> org-todo-list produces a correct list.
This is indeed a bug. The all to `org-get-tags-at' does change the
match data if there is a match for the inheritance regexp. This
problem is now avoided by first extracting (match-string 1), and then
getting the tags.
Studying this bug also exposed another one, namely that file tags are
not marked as inherited tags. This is now fixed, immediately when
the #+FILETAGS line is parsed.
Items are listed in the agenda sometimes in bright colors, to draw
attention to important tasks or deadlines. When such an item is
switched to DONE, the state change is reflected by the new TODO
keyword, but the line itself might still be bright. Org de-emphasizes
the line by changing the face of the line. It used to change it to
the face `org-done', but now we use a new, independent face
`org-agenda-done'.
When a tags/property match does match an entry and its sublevels, the
sublevels used to be indented by dots, to indicate that the matches
likely result from tag inheritance. This is now no longer the
default, but you can get it back with
(setq org-tags-match-list-sublevels 'indented)
This commit implements an important change: When, during a
stuck-project search, a project tree is identified as not stuck, so
far the search would continue after the end of the project tree. From
now on, the search continues in the subtree, so that stuck subprojects
can still be identified.
When a note is taken, the new drawer is created before the note is
taken. Now the drawer is removed again if the note gets aborted and
if the drawer is empty.
Anupam Sengupta writes:
> I routinely use time ranges (and occasionally time-stamp ranges)
> in my org files to document the scheduled block of time for a
> meeting or activity. As an example, I will mark meetings as:
>
> * A Meeting
> <2009-03-12 Thu 10:00-11:00>
>
> As often happens with meetings, rescheduling needs to be done and
> I use S-<up> or S-<down> on the time-stamp to make the
> modifications. While this works fine, it usually leads to a
> duplication when the *time* part of the time-stamp needs to be
> changed.
>
> For the same example above, if the time-block has now changed to
> 11:00-12:00, then I need to do S-<up> on both the "10:00" and the
> "11:00" string. I.e,
>
>
> * A Meeting
> <2009-03-12 Thu 11:00-11:00>
> ^
> +---------------- After the first S-<up>
>
> * A Meeting
> <2009-03-12 Thu 11:00-12:00>
> ^
> +---------------- After the second S-<up>
>
> Can we have a feature (with a toggle option perhaps) which would
> *move* the block (i.e., both time entries) by the same amount
> when either one is moved in the same direction. I.e., the
> proposal is to have:
>
> * A Meeting
> <2009-03-12 Thu 11:00-12:00>
> ^ ^
> | |
> | +---------- Automatically shifted
> +---------------- After the S-<up>
This is in fact how changing time works in many applications, and
it does make sense here as well. The commits implements this
change.
It also implements a way to change the start time of an entry from
the agenda. The date is normally changed with S-right/left.
Now, if you add a C-u prefix, the hour will be changed. If you
immediately press S-right/left again, hours will continue to be
changed.
A double prefix will do the same for minutes.
Wanrong Lin writes:
> Suppose I have an org file with following lines:
>
> * Test1
> Test2
>
> Now if I put the cursor at the beginning of the "Test2" line and
> press "M-S-RET" (Alt-Shift-Return on my machine), I got this:
>
> * Test1
> * Test2TODO
>
> The "TODO" keyword was inserted at the end instead of the
> beginning of the task text. This seems a bug to me.
Yes, this is a bug that occurs in the special case when the
heading stars are inserted in front of an existing line. The
commit adds code to make sure the correct position is used.
Running a command that would use the tag scanner could suffer a large
slow-down when many entries match, because the tag list with
inheritance forces each matching entry to walk the hierarchy.
Now, it is possible to avoid this penalty by using the variable
`org-scanner-tags', or by binding the `org-trust-scanner-tags' to t
around calls to `org-get-tags-at' and `org-entry-properties' when
retrieving tags and properties for the current entry in the
scanner/mapper.
An agenda item carries a full list of tags. The list must normally be
made, but not during a tags scan. So now the tags scan does pass on
its list instead, which should make things faster.
Jeff Mickey writes:
> Hey all,
>
> To reproduce:
>
> * TODO Make Bicycle :project:workshop:
> ** TODO Buy stuff
> ** TODO Build stuff
> ** TODO Test stuff
>
> (setq org-use-tag-inheritance t)
> (setq org-tags-exclude-from-inheritance '("project"))
>
> <C-a m> to type in a match string to search, I type in "project"
>
> I expected to see:
> TODO Make Bicycle
>
> I saw:
> TODO Make Bicycle
> .TODO Buy stuff
> .TODO Build stuff
> .TODO Test stuff
>
> I assume this isn't what is supposed to happen. I'm currently at work
> so I can't investigate and provide a diff, but it seems like there
> needs to be a check in org.el:10144:org-get-tags-at to remove tags
> that are explicitly excluded from inheritance.
This commit fixes the bug.
uuidgen ids may start with a number and therefore are not valid names
in HTML. Therefore we now use and "ID-" prefix for such IDs when
exporting to HTML.
The variable org-priority-faces can now be used to set special faces
for different priority cookies.
Also, in the agenda, the default is now to fontify only the priority
cookie, not the entire task. See the variable
`org-agenda-fontify-priorities'.
When inserting new list entries, sometime empty lines will be
inserted automatically. This, however, makes only sense if empty
lines do not terminate the list, as configured by
`org-empty-line-terminates-plain-lists'.
This commit makes sure that, if
`org-empty-line-terminates-plain-lists' is set, automatic empty lines
will never be inserted.
Undo will now remove up to 20 characters typed consecutively, just
like Emacs normally does. We need a special implementation for this
because Org has its own self-insert command.
The code for doing this is a patch by Martin Pohlack.
A line: #+MARCO: name replacement text
can be referenced by {{{name}}}. As special cases, {{{title}}} will
reference #+TITLE, and similar with similar lines.
Alan E. Davis writes:
> I have found the behavior of the cursor at the beginning of
> the line to be clumsy, and troublesome. I cannot easily set
> a region, for example.
>
> However, the special setting of ctrl-e is extremely useful.
>
> A single variable controls these two variables, in a unified
> way. This variable also has two aliases. The aliases are
> not recognized by the functions that are affected by these
> variables in org.el: org-beginning-of-line, and
> org-end-of-line. As far as I can see, there seems no reason
> to keep these two aliased variables as references to a
> single unified variable, insofar as the underlying code is
> concerned.
>
> Because, at least for me, the behaviors have sufficiently
> distinct behaviors, I propose these should be separated.
This is a reasonable request, and this commit implements it.
To have separate values, set org-special-ctrl-a/e to a cons
cell with the setting for C-a in the car and the setting for
C-e in the cdr.
This commit fixes the bug discussed in:
http://thread.gmane.org/gmane.emacs.orgmode/11106
The reason for the empty line being inserted is subtle:
The function `org-add-planning-info' is used to add and remove planning
info time stamps (deadline, scheduled, closed) from the second line in
an entry. Usually, the function is called to add something, with an
optional argument to also remove something. In doing so, it assumes
that the second line must be there, and if it is not there, it creates
it.
Now, sometimes `org-add-planning-info' is called only to remove a time
stamp. In this particular case it was to remove the CLOSED time
stamp. This happens when the state is changed from a DONE or nil
state to a not-done state. The idea behind this is that maybe to
entry was marked earlier as DONE, but the user has changed his mind,
so the timestamp recording when it was finished should be removed.
So in this case, an empty line was created, assuming that there would
be something to add - only nothing was added.
This commit arranges for checking if there is something to add before
creating an empty line.
orgstruct++-mode is an enhanced version of orgstruct mode that
also imports all indentation and paragraph settings into the major
mode. Furthermore, it now allows to use M-RET and M-S-RET in items
after the first line. The latter change was a request by Austin
Frank.
The new command `org-reload' allows to reload all Org lisp files.
By default it will load compiled files if these are available. If
not, or when called with a C-u prefix argument, uncompiled code will
be loaded. This is good for producing a meaningful backtrace when an
error occurs.
Org has a number of places where the value read by completing-read may
contains spaces. For these occasions, the space character needs to be
a normal character.
The recent support for ido.el invalidated these special cases because
ido has its own way of dealing with spaces.
This commit now makes sure that ido is off for the critical cases
where completion must allow spaces.
John Rakestraw writes:
> I noticed today that, at least in my set-up, setting these variables
> this way:
>
> (setq org-agenda-dim-blocked-tasks 'invisible)
> (setq org-enforce-todo-checkbox-dependencies t)
>
> means that a TODO task with checkboxes doesn't get included in the
> agenda. However, the sub-tasks in the checkbox list don't get included,
> either. So the TODO task with checkboxes doesn't show up in the agenda.
>
> It makes sense given the way the variables work. However, I wonder if
> it makes more sense for a task with checklisted sub-tasks to be
> included in the agenda so that the tasks and sub-tasks don't get lost.
> Or, to put the point slightly differently, I think that a TODO that's
> blocked because it has dependent TODOs might be treated differently in
> agenda listings than a TODO that's blocked because it has dependent
> checklist items.
>
> Not a big deal to me because I don't typically use checkboxes for TODO
> items. But I thought I'd raise it for consideration.
I agree with this view and the commit implements exactly this.
(org-indent-line-function): Make sure this works even if there is not
`org-drawer-regexp' defined. This can happen when orgstruct-mode is
used in a non-org buffer.
This commit makes it possible to force new lines and even empty lines
in the fast tag selection interface, either by splitting tags
definition into several lines, or by inserting "\n" into the tags
list, or by inserting (:newline) into the tags alist.
This is largely a patch from Christopher Suckling
The :END: line is now indented like the line starting the drawer. And
the first line after the drawer is now indented like the :END: line.
The latter problem was pointed out by Christopher Suckling.
Clock lines are now by default captured into the drawer LOGBOOK. This
means that, if state notes are also captured into a drawer, they will
be mixed with notes.
Org-mode has many context-sensitive keys. A new hook system now
allows add-ons to add functionality to these keys for contexts that
are special for the add-on.
For example, if an add-on wants to use C-c C-c in a special context,
if must add a function to `org-ctrl-c-ctrl-c-hook' that will check for
the context and run its command when the context is present.
Wanrong Lin writes:
2. Can we put all of those state change history logging messages
into a drawer like "STATE-HIST" (when the drawer is defined in
org-drawers), so it is less intrusive in the file?
Yes we can. This commit provides this functionality. It introduces a
new drawer, LOGBOOK. When the variable
`org-log-state-notes-into-drawer' is set, state change time stamps and
notes will go into this drawer, or another one specified by that
variable.
When the variable org-log-states-order-reversed was nil, so that notes
would be appended to the list of notes, the indentation of the item
was wrong. This commit fixes the problem.
Wanrong Lin writes:
My TODO sequence is set up as following:
(setq org-todo-keywords '((sequence "TODO(t)" "STARTED(s!)"
"WAITING(w@/!)" "MAYBE(m/!)" "DELEGATED(g@/!)"
"DEFERRED(d!/!)" "HOLD(h!/!)" "|" "DONE(x)" "CANCELED(c)")))
The state change logging is great, but I wonder whether we can
further improve it:
1. Can we also include the original state in the log message?
i.e.: instead of having - State "DEFERRED" [2009-02-11 Wed 11:38]
we can have
- State "DEFERRED" from "HOLD" [2009-02-11 Wed 11:38]
The message will be clearer, and useful even when somebody edited
the TODO keyword in place without using the "org-todo" command
(in that case, simply looking at all the "destination states" in
the log message does not give us the right information).
This strikes me like a good idea, so I have implemented it with this
commit.
Now any line like
#+XYZ_TODO:
will be assumed to define some kind of TODO chain. If the handlers in
`org-todo-setup-filter-hook' do not do anything with this sequence, it
will be treated as `sequence'.
Hsui-Khuern Tang writes:
I have a table where one column consists of inactive dates, such as
this:
| Date | OK? |
|------------------+-----|
| [2009-01-30 Fri] | x |
| [2009-01-27 Tue] | x |
| [2009-01-28 Wed] | x |
I can't sort the table by that column. If I change the dates to
active, then sorting (by time) works fine. Is this behavior
intentional?
Yes, intentional, because the same routine also does sorting of
entries and should prefer active time stamps. However, I realize that
we can still look for an inactive time stamp when no active one can be
found. This is what this commit implements.
Patch by Andrew Hyatt
Andrew Hyatt writes:
I like to schedule items I'm supposed to be working on, so I like
when I complete a task that the next sibling task gets the
schedule from the previous one. This implements that kind of
workflow with the org-depend contrib package.
I've also added a few methods to org.el to make working with
schedules & deadlines easier.
When there were multiple cookies in a headline, the counting would be
double. Also the hook got called always, even if no cookie was
present.
Fixed now.
Turns out a number of people set their variables too late so that
activating dependencies does not work correctly. We now double-check
in the mode hook that everything is in order.....
This commit adds a key (`C-c C-x o') to toggle the ORDERED property of
a tree. And it adds menu entries for doing this, which also reflect
the current state of the tree.
When a line now contains several statistics cookies, all of them will
be updated.
Jari Aalto submitted a patch to this effect which I did end up not
using. Thanks anyway!
A user setting of
(setq org-show-entry-below t)
could overrule a visibility property with value FOLDED. This commit
fixes this by turning off the above setting for the context of setting
startup visibility.
I have changed my mind and turned off shift-selection support again by
default, because it causes confusing behavior, sometimes calling an Org
command and sometimes doing shift selection. The default behavior is
now:
- in special contexts, execute Org commands
- outside special contexts, create an error that will point users to
configure the variable `org-support-shift-select'. Hopefully that
will make them read the docstring and then decide for themselves
what to do.
Emacs 23 introduces `shift-selection-mode', and even turns it on by
default. Therefore, it is fair to assume that users of Emacs 23 will
expect to be able to select a region by holding down shift will moving
the cursor. This conflicts with the use of shifted cursor keys in
Org-mode for other purposes, in particular to "change the item under
the cursor", like it is done for time stamps, item bullet types, TODO
keywords and priorities.
This commit tries to support `shift-selection-mode' as much as possible,
while retaining these valuable commands keys for Org-mode. The
following things are changed:
1. The range of contexts where Org's commands do act is reduced.
- S-up and S-down no longer jump to the previous and next plain list
item - you can use the paragraph commands C-up and C-down for this
quite well.
- S-left and S-right only change the bullet type of a plain list
item when the cursor is *exactly* on the bullet, not just anywhere
in the item line.
2. When a S-cursor key is used outside a special context, a region is
started or extended.
3. When a region has already been started, it will be continue to
extend even if the S-cursor keys move the cursor into a special
context.
4. If you want S-cursor selection to work in headlines as well, you
can set the variable `org-support-shift-select' to
`even-in-headlines'. Then you need to rely on `C-c C-t' to set
TODO keywords, and on `C-c ,' to set priorities.
If you want everything to behave the way it was, set
`org-support-shift-select' to nil.