From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/73571 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: Mon, 25 Oct 2010 12:30:59 +0200 Message-ID: <87iq0qk1i4.fsf@escher.home> References: <87hbgewhth.fsf@escher.home> <87d3r2w6tc.fsf@escher.home> <87pquzct0l.fsf@escher.home> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1288002679 19945 80.91.229.12 (25 Oct 2010 10:31:19 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 25 Oct 2010 10:31:19 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M21940@lists.math.uh.edu Mon Oct 25 12:31:18 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 1PAKKj-0004AG-Tp for ding-account@gmane.org; Mon, 25 Oct 2010 12:31:18 +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 1PAKKW-0005Lg-TZ; Mon, 25 Oct 2010 05:31:04 -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 1PAKKT-0005LN-Mt for ding@lists.math.uh.edu; Mon, 25 Oct 2010 05:31:01 -0500 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx1.math.uh.edu with esmtp (Exim 4.72) (envelope-from ) id 1PAKKP-0000Op-6J for ding@lists.math.uh.edu; Mon, 25 Oct 2010 05:31:01 -0500 Original-Received: from lo.gmane.org ([80.91.229.12]) by quimby.gnus.org with esmtp (Exim 3.36 #1 (Debian)) id 1PAKKO-0007eE-00 for ; Mon, 25 Oct 2010 12:30:56 +0200 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1PAKKO-0003xp-BG for ding@gnus.org; Mon, 25 Oct 2010 12:30:56 +0200 Original-Received: from i59f54566.versanet.de ([89.245.69.102]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 25 Oct 2010 12:30:56 +0200 Original-Received: from stephen.berman by i59f54566.versanet.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 25 Oct 2010 12:30:56 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 64 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: i59f54566.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:73571 Archived-At: 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. When I start a Gnus session and there are no unread articles in the current topic and its parent topics, then it looks like this (I use the default value of gnus-topic-line-format): [ Newsgroups -- 0 ] [ Gmane -- 0 ] [ Emacs -- 0 ] gmane.emacs.bugs (*+533) gmane.emacs.devel (*+1084) If I put the cursor on column 0 of the gmane.emacs.bugs group line and type `M-g', and there are two new articles, it now looks like this, where `^' indicates point: [ Newsgroups -- 2 ] [ Gmane -- 2 ] [ Emacs -- 2 ] gmane.emacs.bugs^ (2+533) gmane.emacs.devel (*+1084) If I put the cursor on column 0 of the gmane.emacs.devel group line and type `M-g', and there are 19 new articles, it now looks like this, where `^' indicates point, which is the same as above, instead of after `gmane.emacs.devel': [ Newsgroups -- 21 ] [ Gmane -- 21 ] [ Emacs -- 21 ] gmane.emacs.bugs^ (2+533) gmane.emacs.devel (19+1084) 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. I hope this is enough information for someone who knows the code better than I do to come up with a fix. Steve Berman