Gnus development mailing list
 help / color / mirror / Atom feed
From: Stephen Berman <stephen.berman@gmx.net>
To: ding@gnus.org
Subject: Re: M-g sometimes moves point one line up
Date: Wed, 27 Oct 2010 15:30:17 +0200	[thread overview]
Message-ID: <87eibb9312.fsf@escher.home> (raw)
In-Reply-To: <87iq0qk1i4.fsf@escher.home>

On Mon, 25 Oct 2010 12:30:59 +0200 Stephen Berman <stephen.berman@gmx.net> wrote:

> On Sun, 24 Oct 2010 21:03:54 +0200 Stephen Berman <stephen.berman@gmx.net> wrote:
>
>> On Sun, 24 Oct 2010 18:15:54 +0200 Lars Magne Ingebrigtsen <larsi@gnus.org> wrote:
>>
>>> Stephen Berman <stephen.berman@gmx.net> 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




  reply	other threads:[~2010-10-27 13:30 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-22 12:08 Stephen Berman
2010-10-22 14:56 ` Lars Magne Ingebrigtsen
2010-10-22 16:06   ` Stephen Berman
2010-10-23 10:48     ` Stephen Berman
2010-10-24 16:15     ` Lars Magne Ingebrigtsen
2010-10-24 19:03       ` Stephen Berman
2010-10-25 10:30         ` Stephen Berman
2010-10-27 13:30           ` Stephen Berman [this message]
2010-10-29 22:50             ` Lars Magne Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87eibb9312.fsf@escher.home \
    --to=stephen.berman@gmx.net \
    --cc=ding@gnus.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).