GNU bug report logs - #13769
gnus-tree-hightlight-article moves point in summary buffer

Previous Next

Package: gnus;

Reported by: Dave Abrahams <dave <at> boostpro.com>

Date: Wed, 20 Feb 2013 02:19:02 UTC

Severity: normal

Tags: fixed

Found in version 5.130006

Fixed in version 24.4

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

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 13769 in the body.
You can then email your comments to 13769 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bugs <at> gnus.org:
bug#13769; Package gnus. (Wed, 20 Feb 2013 02:19:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Dave Abrahams <dave <at> boostpro.com>:
New bug report received and forwarded. Copy sent to bugs <at> gnus.org. (Wed, 20 Feb 2013 02:19:03 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Dave Abrahams <dave <at> boostpro.com>
To: submit <at> debbugs.gnu.org (The Gnus Bugfixing Girls + Boys)
Subject: gnus-tree-hightlight-article moves point in summary buffer
Date: Tue, 19 Feb 2013 18:17:03 -0800
This bug affects gnus-summary-mark-forward; the point moves backward in
the summary buffer quite perplexingly.  The following patch seems to
suppress the symptoms of the bug:

--8<---------------cut here---------------start------------->8---
diff --git a/lisp/gnus-salt.el b/lisp/gnus-salt.el
index 48b51d2..4b37980 100644
--- a/lisp/gnus-salt.el
+++ b/lisp/gnus-salt.el
@@ -857,12 +857,14 @@ Two predefined functions are available:
       (set-buffer buf))))
 
 (defun gnus-tree-highlight-article (article face)
+  (save-excursion
   (with-current-buffer (gnus-get-tree-buffer)
     (let (region)
       (when (setq region (gnus-tree-article-region article))
 	(gnus-put-text-property (car region) (cdr region) 'face face)
 	(set-window-point
 	 (gnus-get-buffer-window (current-buffer) t) (cdr region))))))
+  )
 
 ;;; Allow redefinition of functions.
 (gnus-ems-redefine)
--8<---------------cut here---------------end--------------->8---




Ma Gnus v0.6
GNU Emacs 24.2.93.1 (x86_64-apple-darwin11.4.2, Carbon Version 1.6.0 AppKit 1138.51)
 of 2013-02-09 on Takanami.local
200 Leafnode NNTP Daemon, version 1.11.8 running at localhost (my fqdn: cube.boostpro.com)
100 Legal commands on THIS server:
 ARTICLE [<Message-ID>|<Number>]
 BODY [<Message-ID>|<Number>]
 DATE
 GROUP <Newsgroup>
 HDR <Header> <Message-ID>|<Range>
 HEAD [<Message-ID>|<Number>]
 HELP
 LAST
 LIST [ACTIVE|NEWSGROUPS] [<Wildmat>]]
 LIST [ACTIVE.TIMES|EXTENSIONS|OVERVIEW.FMT]
 LISTGROUP <Newsgroup>
 MODE READER
 NEWGROUPS <yymmdd> <hhmmss> [GMT]
 NEXT
 POST
 OVER <Range>
 SLAVE
 STAT [<Message-ID>|<Number>]
 XHDR <Header> <Message-ID>|<Range>
 XOVER <Range>
.

-- 
Dave Abrahams





Information forwarded to bugs <at> gnus.org:
bug#13769; Package gnus. (Sat, 06 Jul 2013 16:18:01 GMT) Full text and rfc822 format available.

Message #8 received at 13769 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Dave Abrahams <dave <at> boostpro.com>
Cc: 13769 <at> debbugs.gnu.org
Subject: Re: bug#13769: gnus-tree-hightlight-article moves point in summary
 buffer
Date: Sat, 06 Jul 2013 18:17:01 +0200
Dave Abrahams <dave <at> boostpro.com> writes:

> This bug affects gnus-summary-mark-forward; the point moves backward in
> the summary buffer quite perplexingly.  The following patch seems to
> suppress the symptoms of the bug:

[...]

>  (defun gnus-tree-highlight-article (article face)
> +  (save-excursion
>    (with-current-buffer (gnus-get-tree-buffer)
>      (let (region)
>        (when (setq region (gnus-tree-article-region article))
>  	(gnus-put-text-property (car region) (cdr region) 'face face)
>  	(set-window-point
>  	 (gnus-get-buffer-window (current-buffer) t) (cdr region))))))
> +  )

Hm.  I don't quite understand this patch.  `save-excursion' saves the
point in the current buffer, and what the current buffer is.  The bit
inside the save-excursion all happens in a different buffer, so point in
the current buffer shouldn't change at all.

Does anybody have any ideas why this patch would help?  It could be some
magic connected to `set-window-point', I guess...

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/




Information forwarded to bugs <at> gnus.org:
bug#13769; Package gnus. (Fri, 31 Jan 2014 00:27:02 GMT) Full text and rfc822 format available.

Message #11 received at 13769 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Dave Abrahams <dave <at> boostpro.com>
Cc: 13769 <at> debbugs.gnu.org
Subject: Re: bug#13769: gnus-tree-hightlight-article moves point in summary
 buffer
Date: Thu, 30 Jan 2014 16:25:06 -0800
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> Dave Abrahams <dave <at> boostpro.com> writes:
>
>> This bug affects gnus-summary-mark-forward; the point moves backward in
>> the summary buffer quite perplexingly.  The following patch seems to
>> suppress the symptoms of the bug:
>
> [...]
>
>>  (defun gnus-tree-highlight-article (article face)
>> +  (save-excursion
>>    (with-current-buffer (gnus-get-tree-buffer)
>>      (let (region)
>>        (when (setq region (gnus-tree-article-region article))
>>  	(gnus-put-text-property (car region) (cdr region) 'face face)
>>  	(set-window-point
>>  	 (gnus-get-buffer-window (current-buffer) t) (cdr region))))))
>> +  )
>
> Hm.  I don't quite understand this patch.  `save-excursion' saves the
> point in the current buffer, and what the current buffer is.  The bit
> inside the save-excursion all happens in a different buffer, so point in
> the current buffer shouldn't change at all.
>
> Does anybody have any ideas why this patch would help?  It could be some
> magic connected to `set-window-point', I guess...

Even though I don't understand why it helps, I've applied your patch
(but changed it slightly, so that it doesn't do both a save-excursion
and a with-current-buffer).

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/




Added tag(s) fixed. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Fri, 31 Jan 2014 00:27:03 GMT) Full text and rfc822 format available.

bug marked as fixed in version 24.4, send any further explanations to 13769 <at> debbugs.gnu.org and Dave Abrahams <dave <at> boostpro.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Fri, 31 Jan 2014 00:27:03 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 28 Feb 2014 12:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 11 years and 117 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.