emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[debbugs-tracker] bug#19727: closed (25.0.50; setting a todo item to don


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#19727: closed (25.0.50; setting a todo item to done puts point at the end of the buffer)
Date: Wed, 04 Feb 2015 21:47:02 +0000

Your message dated Wed, 04 Feb 2015 22:46:22 +0100
with message-id <address@hidden>
and subject line Re: bug#19727: 25.0.50; setting a todo item to done puts point 
at the end of the buffer
has caused the debbugs.gnu.org bug report #19727,
regarding 25.0.50; setting a todo item to done puts point at the end of the 
buffer
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
19727: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=19727
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: 25.0.50; setting a todo item to done puts point at the end of the buffer Date: Thu, 29 Jan 2015 11:10:47 +0100
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'

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  <address@hidden>
+
+       * 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  <address@hidden>
 
        * 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 "]")))

--- End Message ---
--- Begin Message --- Subject: Re: bug#19727: 25.0.50; setting a todo item to done puts point at the end of the buffer Date: Wed, 04 Feb 2015 22:46:22 +0100 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)
On Wed, 04 Feb 2015 13:48:37 +0100 Robert Pluim <address@hidden> 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


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]