From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/73632 Path: news.gmane.org!not-for-mail From: Stephen Berman Newsgroups: gmane.emacs.gnus.general Subject: Re: M-g sometimes moves point one line up Date: Wed, 27 Oct 2010 15:30:17 +0200 Message-ID: <87eibb9312.fsf@escher.home> References: <87hbgewhth.fsf@escher.home> <87d3r2w6tc.fsf@escher.home> <87pquzct0l.fsf@escher.home> <87iq0qk1i4.fsf@escher.home> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1288186234 25240 80.91.229.12 (27 Oct 2010 13:30:34 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 27 Oct 2010 13:30:34 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M22001@lists.math.uh.edu Wed Oct 27 15:30:31 2010 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PB65G-000312-Ug for ding-account@gmane.org; Wed, 27 Oct 2010 15:30:31 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1PB65C-00032S-Q2; Wed, 27 Oct 2010 08:30:26 -0500 Original-Received: from mx1.math.uh.edu ([129.7.128.32]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1PB65A-00032A-OL for ding@lists.math.uh.edu; Wed, 27 Oct 2010 08:30:24 -0500 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx1.math.uh.edu with esmtp (Exim 4.72) (envelope-from ) id 1PB655-00048N-D6 for ding@lists.math.uh.edu; Wed, 27 Oct 2010 08:30:24 -0500 Original-Received: from lo.gmane.org ([80.91.229.12]) by quimby.gnus.org with esmtp (Exim 3.36 #1 (Debian)) id 1PB654-00027s-00 for ; Wed, 27 Oct 2010 15:30:18 +0200 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1PB654-0002tc-H0 for ding@gnus.org; Wed, 27 Oct 2010 15:30:18 +0200 Original-Received: from i59f55492.versanet.de ([89.245.84.146]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 27 Oct 2010 15:30:18 +0200 Original-Received: from stephen.berman by i59f55492.versanet.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 27 Oct 2010 15:30:18 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 57 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: i59f55492.versanet.de User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-Spam-Score: -1.9 (-) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:73632 Archived-At: On Mon, 25 Oct 2010 12:30:59 +0200 Stephen Berman wrote: > On Sun, 24 Oct 2010 21:03:54 +0200 Stephen Berman wrote: > >> On Sun, 24 Oct 2010 18:15:54 +0200 Lars Magne Ingebrigtsen wrote: >> >>> Stephen Berman writes: >>> >>>> My .gnus.el does indeed have: >>>> >>>> (setq gnus-group-line-format " %S%(%G%* (%y+%i)%)\n") >>>> (setq gnus-goto-next-group-when-activating nil) >>> >>> Yes, that should be fine. >>> >>> I've tried using this and `M-g'-ing here and there, and I'm unable to >>> get it to misbehave. >> >> Pity, but thanks for trying. I'll chime in again if I notice anything >> that looks like a pattern. > > I think I've found the cause of the problem. [...] > This misplacement is a result of the sexp (when beg (goto-char beg)) in > gnus-group-get-new-news-this-group: beg, which is point before invoking > `M-g', remains unchanged (after funcalling > gnus-group-update-group-function in gnus-group-update-group) when the > number of new articles does not increase the places of the numbers in > the topic lines, as is the case between 0 and 2, but not between 2 and > 21 -- with the latter, point (beg) moves back by three characters, > putting it on the previous line. The following patch seems to DTRT: *** /data/steve/bzr/emacs/trunk/lisp/gnus/gnus-group.el 2010-10-24 13:56:16.000000000 +0200 --- /data/steve/bzr/emacs/quickfixes/lisp/gnus/gnus-group.el 2010-10-27 15:20:04.000000000 +0200 *************** *** 3984,3990 **** (let* ((groups (gnus-group-process-prefix n)) (ret (if (numberp n) (- n (length groups)) 0)) (beg (unless n ! (point))) group method (gnus-inhibit-demon t) ;; Binding this variable will inhibit multiple fetchings --- 3984,3990 ---- (let* ((groups (gnus-group-process-prefix n)) (ret (if (numberp n) (- n (length groups)) 0)) (beg (unless n ! (point-marker))) group method (gnus-inhibit-demon t) ;; Binding this variable will inhibit multiple fetchings If this is an acceptable fix, could someone commit it? Thanks, Steve Berman