GNU bug report logs -
#19727
25.0.50; setting a todo item to done puts point at the end of the buffer
Previous Next
Reported by: Robert Pluim <rpluim <at> gmail.com>
Date: Thu, 29 Jan 2015 17:11:01 UTC
Severity: normal
Found in version 25.0.50
Done: Stephen Berman <stephen.berman <at> gmx.net>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 19727 in the body.
You can then email your comments to 19727 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#19727
; Package
emacs
.
(Thu, 29 Jan 2015 17:11:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Robert Pluim <rpluim <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Thu, 29 Jan 2015 17:11:01 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hi,
when I set an item to done in a todo-mode buffer, point ends up at the
end of the buffer, which is somewhat surprising. Attached patch
remembers where point was, and restores it.
Regards
Robert
In GNU Emacs 25.0.50.6 (i686-pc-cygwin)
of 2015-01-28 on RPLUIM
Repository revision: 8a8bd38fedb89b2d04cca2419698813a22862c3b
Windowing system distributor `Microsoft Corp.', version 6.1.7601
Configured using:
`configure --with-w32 --with-wide-int'
[todo-mode-done-restore-point.patch (text/x-patch, inline)]
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 90681c8..060cbf7 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
+2015-01-26 Robert Pluim <rpluim <at> gmail.com>
+
+ * calendar/todo-mode.el (todo-item-done): Initialize opoint so
+ that point stays where it is when setting items to DONE.
+
2015-01-28 Tassilo Horn <tsdh <at> gnu.org>
* textmodes/reftex.el (reftex-syntax-table-for-bib): Give ( and )
diff --git a/lisp/calendar/todo-mode.el b/lisp/calendar/todo-mode.el
index 7ca57a4..2fb7e2e 100644
--- a/lisp/calendar/todo-mode.el
+++ b/lisp/calendar/todo-mode.el
@@ -2816,7 +2816,8 @@ (defun todo-item-done (&optional arg)
(goto-char (point-min))
(re-search-forward todo-done-string-start nil t)))
(buffer-read-only nil)
- item done-item opoint)
+ item done-item
+ (opoint (point)))
;; Don't add empty comment to done item.
(setq comment (unless (zerop (length comment))
(concat " [" todo-comment-string ": " comment "]")))
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#19727
; Package
emacs
.
(Tue, 03 Feb 2015 22:41:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 19727 <at> debbugs.gnu.org (full text, mbox):
On Thu, 29 Jan 2015 11:10:47 +0100 Robert Pluim <rpluim <at> gmail.com> wrote:
> when I set an item to done in a todo-mode buffer, point ends up at the
> end of the buffer, which is somewhat surprising. Attached patch
> remembers where point was, and restores it.
As the todo-mode.el maintainer, sorry for not responding sooner. I
guess it's reasonable to leave point where the previously not-done item
was when the done items section is hidden. I take it you have no
objection to the current behavior of point moving to the item just set
to done when the done items section is visible, since your patch doesn't
alter that. If so, then I'll install your patch as is (but with a more
appropriate commit message and ChangeLog entry). Before I do that, have
you submitted a copyright assignment for Emacs? If not, I'll install it
as a tiny change. Thanks for the patch.
Steve Berman
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#19727
; Package
emacs
.
(Wed, 04 Feb 2015 13:28:02 GMT)
Full text and
rfc822 format available.
Message #11 received at submit <at> debbugs.gnu.org (full text, mbox):
Stephen Berman <stephen.berman <at> gmx.net> writes:
> On Thu, 29 Jan 2015 11:10:47 +0100 Robert Pluim <rpluim <at> gmail.com> wrote:
>
>> when I set an item to done in a todo-mode buffer, point ends up at the
>> end of the buffer, which is somewhat surprising. Attached patch
>> remembers where point was, and restores it.
>
> As the todo-mode.el maintainer, sorry for not responding sooner.
I can carry local patches forever :-)
> I
> guess it's reasonable to leave point where the previously not-done item
> was when the done items section is hidden. I take it you have no
> objection to the current behavior of point moving to the item just set
> to done when the done items section is visible, since your patch doesn't
> alter that.
I never set the done items to visible, so can't offer an opinion there.
> If so, then I'll install your patch as is (but with a more
> appropriate commit message and ChangeLog entry). Before I do that, have
> you submitted a copyright assignment for Emacs? If not, I'll install it
> as a tiny change. Thanks for the patch.
I don't have a copyright assignment on file. I have no objection to
doing so if necessary, but for such a small change I suspect it would be
more effort than it's worth.
Regards
Robert
Reply sent
to
Stephen Berman <stephen.berman <at> gmx.net>
:
You have taken responsibility.
(Wed, 04 Feb 2015 21:47:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Robert Pluim <rpluim <at> gmail.com>
:
bug acknowledged by developer.
(Wed, 04 Feb 2015 21:47:02 GMT)
Full text and
rfc822 format available.
Message #16 received at 19727-done <at> debbugs.gnu.org (full text, mbox):
On Wed, 04 Feb 2015 13:48:37 +0100 Robert Pluim <rpluim <at> gmail.com> wrote:
> I don't have a copyright assignment on file. I have no objection to
> doing so if necessary, but for such a small change I suspect it would be
> more effort than it's worth.
I committed your patch to emacs-24 and am closing this bug. Thanks
again.
Steve Berman
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Thu, 05 Mar 2015 12:24:03 GMT)
Full text and
rfc822 format available.
This bug report was last modified 10 years and 112 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.