Fix bulk refiling in the agenda due to commit
9ec5529 (Fix jumping to last refile location in agenda, 2009-08-20)
This restores the original behaviour.
This bug was caused by commit
8c177dc832, and reported by Matt
Lundin. The problem was that this commit tried to remove the text
propertes of the MATCH part of an agenda command. However, in block
commands, the MATCH part is not a string.
New variable `org-agenda-skip-scheduled-if-deadline-is-shown' to avoid
that a entry shows up in the agenda for today for both a scheduling
and a deadline entry. See the docstring of the variables for more
details.
Bernt Hansen writes:
> Every so often I run into a situation where bulk refiling
> doesn't work anymore.
>
> I currently have 15 items in my refile.org file that I want
> to refile to other locations. I marked a few of them and
> bulk refiled them just fine. Then I marked a few more and B
> r fails with "Cannot find entry for marker #<marker at
> 297156 in norang.org>"
>
> I think this happens when I mark multiple tasks in the same
> subtree (i.e. the parent and a sibling) and refile both to
> the same location. After that it gets confused.
>
> If I have a task like this in refile.org
>
> #+FILETAGS: REFILE
> * Test
> ** Test 2
>
> and run a tags match on REFILE I see both tasks. Mark both
> with m in the agenda and B r to some other location. It
> refiles the first (and this moves the sibling too) and then
> it's broken after that.
>
> I get the following backtrace
>
> Debugger entered--Lisp error: (error "Cannot find entry for
> marker #<marker at 297156 in norang.org>")
Indeed the happens because, when a parent gets refiled or
achieved, any entries corresponding to its children are
removed from the agenda.
We address this issue by
- sorting the markers, to make sure parents will be handled
before children
- No longer throwing an error when a bulk action entry no
longer is present in the agenda - most likely it was taken
care of together with its parent.
This commit defines three new functions in org-timer.el:
- org-timer-set-timer, bound to `C-c C-x ;' in Org buffers
and to `;' in Org agenda buffers. This function sets a
timer for the headline the cursor is currently it. Up to
three timers can be set.
- org-timer-show-remaining-time: this shows the remaining
time for the last set timer.
- org-timer-reset-timers: this reset all timers.
This functionality was requested by Samuel Wales and emulates
that of tea-time.el -- see the emacswiki doc about tea-time.el:
http://www.emacswiki.org/emacs/tea-time
Agenda bulk commands on marked entries now can also set the scheduling
date or a deadline. Normally, all entries will be set to the
specified date. However, when writing the change as "++5d" or "++2w",
then each time stamp will independently be shifted by that amount.
This commit implements refiling directly from the agenda.
It also implements a mechanism for selecting a number of entries in
the agenda and then executing a command on all of them. Possible
actions include archive, refile, todo state setting, and more.
When the agenda buffer for an agenda series is created, this was so
far done without the options of the custom agenda command in place.
This meant that some options would not take effect, because the only
place where that did would have an effect was during creation of that
buffer.
This commit makes sure that the global options of an agenda series are
in fact in place when the buffer is created.
Nicolas Goaziou writes:
> As I was saying in anoter post, it looks like there's something
> weird happening when using C-k in agenda view:
>
> 1. Create two new remember entries (i.e. test and test2) with the
> same tag (I used @office)
> 2. Narrow down the agenda view to only see the @office entries.
> 3. Kill the last but one entry (it should be "test") : both of
> "test" and "test2" disappear frow the view. Actually, "test2" is
> not properly killed, but it is scary nonetheless.
>
> It only happens with two last entries.
>
> Is anyone able to reproduce this ?