1
0
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-11-26 07:33:39 +00:00

Fix bug when removing scheduled/deadline times

Bernt Hansen writes:

> I ran into this a few weeks ago and it's been bugging me.
>
> I reorganized a project which had a deadline on the main task and moved
> it down to multiple subtasks in the project.
>
> ,----
> | * TODO Project task
> |   DEADLINE: <2009-08-28 Fri>
> | ** TODO Step 1
> | ** TODO Step 2
> | ...
> | ** TODO Step n
> `----
>
> I decided the DEADLINE really doesn't belong at the top -- since the
> deadline was for step 2 (and a few other tasks)... so I moved it the
> hard way.  Instead of cutting it out and pasting it back in the right
> tree I just used C-c C-d and entered the same date on step 2 (because I
> was moving the date a bit from the original date).
>
> ,----
> | * TODO Project task
> |   DEADLINE: <2009-08-28 Fri>
> | ** TODO Step 1
> | ** TODO Step 2
> |    DEADLINE: <2009-08-28 Fri>
> | ...
> | ** TODO Step n
> `----
>
> Now to remove the deadline from the Project task I just did C-u C-c C-d
> on the Project task but this removed all the deadlines in the subtree
> and my deadline in Step 2 (and others) is now gone.
>
> AFAICT SCHEDULED: works the same way.  This doesn't feel natural to me
> but I know it is documented this way.
>
> Does the way it works now really make sense or would just removing the
> deadline from the task you are working on be better.
>
> C-c C-d sets a deadline just for this task, so it felt natural to me
> that C-u C-c C-d would remove the deadline just for this task -- but
> that's what I get for not reading the manual (or forgetting since I read
> it ;)
This commit is contained in:
Carsten Dominik 2009-08-28 14:41:15 +02:00
parent 31b0deb4aa
commit 93ea7371bd
2 changed files with 4 additions and 1 deletions

View File

@ -1,5 +1,8 @@
2009-08-28 Carsten Dominik <carsten.dominik@gmail.com>
* org.el (org-remove-timestamp-with-keyword): Only remove in
entry, not in subtree.
* org-src.el (org-src-lang-modes): Add abbreviation elisp for
emacs lisp.

View File

@ -10045,7 +10045,7 @@ nil."
(save-excursion
(org-back-to-heading t)
(setq beg (point))
(org-end-of-subtree t t)
(outline-next-heading)
(while (re-search-backward re beg t)
(replace-match "")
(if (and (string-match "\\S-" (buffer-substring (point-at-bol) (point)))