Gnus development mailing list
 help / color / mirror / Atom feed
* `gnus-auto-center-summary' does not work when point is in article buffer
@ 2004-03-10 21:14 Michael Schierl
  2004-03-11  0:37 ` zeDek
  0 siblings, 1 reply; 17+ messages in thread
From: Michael Schierl @ 2004-03-10 21:14 UTC (permalink / raw)


Hi,

i usually leave point in article buffer while reading, since i'm used
to scroll articles with cursor keys and I can scroll the summary pane
with N and P anyway.

Today i found a really useful feature in the gnus manua:
`gnus-auto-center-summary'. However i was quite surprised when i
noticed that this was already set to `t' and apparently not working.

After a bit of examination i found that it works iff point is in
summary buffer but not when point is in article buffer. Is that
intentional? Is there a config option to change that?

Michael




^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: `gnus-auto-center-summary' does not work when point is in article buffer
  2004-03-10 21:14 `gnus-auto-center-summary' does not work when point is in article buffer Michael Schierl
@ 2004-03-11  0:37 ` zeDek
  2004-03-11  0:51   ` `gnus-auto-center-summary' does not work when point is in Jon Ericson
  0 siblings, 1 reply; 17+ messages in thread
From: zeDek @ 2004-03-11  0:37 UTC (permalink / raw)


Michael Schierl <schierlm-usenet <at> gmx.de> writes:

> 
> Hi,

Yo,

> Today i found a really useful feature in the gnus manua:
> `gnus-auto-center-summary'. However i was quite surprised when i
> noticed that this was already set to `t' and apparently not working.

Weird, for me 't' is bound to toggle show/hide all headers.
 





^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: `gnus-auto-center-summary' does not work when point is in
  2004-03-11  0:37 ` zeDek
@ 2004-03-11  0:51   ` Jon Ericson
  2004-03-11  1:57     ` Katsumi Yamaoka
  2004-03-11 14:43     ` Xavier Maillard
  0 siblings, 2 replies; 17+ messages in thread
From: Jon Ericson @ 2004-03-11  0:51 UTC (permalink / raw)


zeDek <zedek@gnu-rox.org> writes:

> Michael Schierl <schierlm-usenet <at> gmx.de> writes:
>
>> Today i found a really useful feature in the gnus manua:
>> `gnus-auto-center-summary'. However i was quite surprised when i
>> noticed that this was already set to `t' and apparently not working.
>
> Weird, for me 't' is bound to toggle show/hide all headers.

I think the OP meant that the *value*  of `gnus-auto-center-summary'
is `t'.  It doesn't make any sense to bind that function to any key,
if I understand correctly.

Jon




^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: `gnus-auto-center-summary' does not work when point is in
  2004-03-11  0:51   ` `gnus-auto-center-summary' does not work when point is in Jon Ericson
@ 2004-03-11  1:57     ` Katsumi Yamaoka
  2004-03-11 12:19       ` `gnus-auto-center-summary' does not work when point is in article buffer Katsumi Yamaoka
  2004-03-11 14:43     ` Xavier Maillard
  1 sibling, 1 reply; 17+ messages in thread
From: Katsumi Yamaoka @ 2004-03-11  1:57 UTC (permalink / raw)


>> Michael Schierl <schierlm-usenet <at> gmx.de> writes:
>>
>>> Today i found a really useful feature in the gnus manua:
>>> `gnus-auto-center-summary'. However i was quite surprised when i
>>> noticed that this was already set to `t' and apparently not working.

You may see the vertical recentering doesn't work by setting
gnus-auto-center-summary as nil.  And also you may see the
horizontal recentering works with a very long thread or a very
narrowed Emacs frame.
-- 
Katsumi Yamaoka <yamaoka@jpl.org>



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: `gnus-auto-center-summary' does not work when point is in article buffer
  2004-03-11  1:57     ` Katsumi Yamaoka
@ 2004-03-11 12:19       ` Katsumi Yamaoka
  2004-03-11 14:49         ` `gnus-auto-center-summary' does not work when point is in David S Goldberg
  2004-03-11 20:04         ` Michael Schierl
  0 siblings, 2 replies; 17+ messages in thread
From: Katsumi Yamaoka @ 2004-03-11 12:19 UTC (permalink / raw)


>>>>> In <b9yhdwwp2ls.fsf@jpl.org> Katsumi Yamaoka wrote:

>>> Michael Schierl <schierlm-usenet <at> gmx.de> writes:
>>>
>>>> Today i found a really useful feature in the gnus manua:
>>>> `gnus-auto-center-summary'. However i was quite surprised when i
>>>> noticed that this was already set to `t' and apparently not working.

> You may see the vertical recentering doesn't work by setting
> gnus-auto-center-summary as nil.  And also you may see the
> horizontal recentering works with a very long thread or a very
> narrowed Emacs frame.

Oops, I missed the end of the subject, sorry.  Surely the
recentering doesn't work when I invoke the summary command in
the article buffer.  I used the following program in order to
make it possible to use most of summary command keys in the
article buffer:

(let (keys)
  (let ((key 32))
    (while (<= key 127)
      (push (char-to-string key) keys)
      (incf key))
    (dolist (elem (accessible-keymaps gnus-summary-mode-map))
      (setq key (car elem))
      (when (and (> (length key) 0)
		 (not (eq 'menu-bar (aref key 0)))
		 (symbolp (lookup-key gnus-summary-mode-map key)))
	(push key keys))))
  (dolist (key keys)
    (unless (lookup-key gnus-article-mode-map key)
      (define-key gnus-article-mode-map key 'gnus-article-read-summary-keys))))
-- 
Katsumi Yamaoka <yamaoka@jpl.org>



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: `gnus-auto-center-summary' does not work when point is in
  2004-03-11  0:51   ` `gnus-auto-center-summary' does not work when point is in Jon Ericson
  2004-03-11  1:57     ` Katsumi Yamaoka
@ 2004-03-11 14:43     ` Xavier Maillard
  1 sibling, 0 replies; 17+ messages in thread
From: Xavier Maillard @ 2004-03-11 14:43 UTC (permalink / raw)


Jon Ericson <Jon.Ericson <at> jpl.nasa.gov> writes:

> I think the OP meant that the *value*  of `gnus-auto-center-summary'
> is `t'.  It doesn't make any sense to bind that function to any key,

Oops, I should have read better ;)

zeDek




^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: `gnus-auto-center-summary' does not work when point is in
  2004-03-11 12:19       ` `gnus-auto-center-summary' does not work when point is in article buffer Katsumi Yamaoka
@ 2004-03-11 14:49         ` David S Goldberg
  2004-03-11 20:04         ` Michael Schierl
  1 sibling, 0 replies; 17+ messages in thread
From: David S Goldberg @ 2004-03-11 14:49 UTC (permalink / raw)


>>>>> On Thu, 11 Mar 2004 21:19:19 +0900, Katsumi Yamaoka
>>>>> <yamaoka@jpl.org> said: 

> (let (keys)
>   (let ((key 32))
>     (while (<= key 127)
>       (push (char-to-string key) keys)
>       (incf key))
>     (dolist (elem (accessible-keymaps gnus-summary-mode-map))
>       (setq key (car elem))
>       (when (and (> (length key) 0)
> 		 (not (eq 'menu-bar (aref key 0)))
> 		 (symbolp (lookup-key gnus-summary-mode-map key)))
> 	(push key keys))))
>   (dolist (key keys)
>     (unless (lookup-key gnus-article-mode-map key)
>       (define-key gnus-article-mode-map key 'gnus-article-read-summary-keys))))

I'm not the OP, but I feel his pain :-) I tried the above code, but it
doesn't seem to change the behavior the OP complained about.  That is,
by default, I can do things like n, p, . and l in an article buffer
and get the appropriate summary command run to select the next,
previous, best and last article respectively.  However, the summary
buffer is not recentered when run in the article buffer whereas it is
when run in the summary buffer in spite of having
gnus-auto-center-summary set to t.

-- 
Dave Goldberg
david.goldberg6@verizon.net





^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: `gnus-auto-center-summary' does not work when point is in
  2004-03-11 12:19       ` `gnus-auto-center-summary' does not work when point is in article buffer Katsumi Yamaoka
  2004-03-11 14:49         ` `gnus-auto-center-summary' does not work when point is in David S Goldberg
@ 2004-03-11 20:04         ` Michael Schierl
  2004-03-11 22:52           ` Katsumi Yamaoka
  1 sibling, 1 reply; 17+ messages in thread
From: Michael Schierl @ 2004-03-11 20:04 UTC (permalink / raw)


Katsumi Yamaoka <yamaoka@jpl.org> writes:

> (define-key gnus-article-mode-map key 'gnus-article-read-summary-keys))))

Hmm, advising gnus-article-read-summary-keys seems to do the trick:

(defadvice gnus-article-read-summary-keys (after mihi-gars-keys-adv activate)
  (when (gnus-buffer-live-p gnus-summary-buffer)
    (gnus-article-show-summary)
    (gnus-summary-recenter)
    (gnus-summary-select-article-buffer)))

Michael




^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: `gnus-auto-center-summary' does not work when point is in
  2004-03-11 20:04         ` Michael Schierl
@ 2004-03-11 22:52           ` Katsumi Yamaoka
  2004-03-11 23:29             ` Michael Schierl
  0 siblings, 1 reply; 17+ messages in thread
From: Katsumi Yamaoka @ 2004-03-11 22:52 UTC (permalink / raw)


>>>>> In <wk1xnzrvzv.fsf@smsoft.ixy.de>
>>>>>	Michael Schierl <schierlm-usenet@gmx.de> wrote:

> Katsumi Yamaoka <yamaoka@jpl.org> writes:

>> (define-key gnus-article-mode-map key 'gnus-article-read-summary-keys))))

> Hmm, advising gnus-article-read-summary-keys seems to do the trick:

> (defadvice gnus-article-read-summary-keys (after mihi-gars-keys-adv activate)
>   (when (gnus-buffer-live-p gnus-summary-buffer)
>     (gnus-article-show-summary)
>     (gnus-summary-recenter)
>     (gnus-summary-select-article-buffer)))

> Michael

I noticed what g-a-r-s-k does.  Thanks.  Here is an alternative:

(ad-unadvise 'gnus-article-read-summary-keys)

(defadvice gnus-article-read-summary-keys (around ky-gars-keys-adv activate)
  (ad-set-arg 2 t)
  ad-do-it
  (gnus-summary-select-article-buffer))
-- 
Katsumi Yamaoka <yamaoka@jpl.org>



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: `gnus-auto-center-summary' does not work when point is in
  2004-03-11 22:52           ` Katsumi Yamaoka
@ 2004-03-11 23:29             ` Michael Schierl
  2004-03-11 23:34               ` Katsumi Yamaoka
  0 siblings, 1 reply; 17+ messages in thread
From: Michael Schierl @ 2004-03-11 23:29 UTC (permalink / raw)


Katsumi Yamaoka <yamaoka@jpl.org> writes:

> In <wk1xnzrvzv.fsf@smsoft.ixy.de>
> Michael Schierl <schierlm-usenet@gmx.de> wrote:

>> (defadvice gnus-article-read-summary-keys (after mihi-gars-keys-adv activate)
>>   (when (gnus-buffer-live-p gnus-summary-buffer)
>>     (gnus-article-show-summary)
>>     (gnus-summary-recenter)
>>     (gnus-summary-select-article-buffer)))
>
> I noticed what g-a-r-s-k does.  Thanks.  Here is an alternative:
>
> (ad-unadvise 'gnus-article-read-summary-keys)
>
> (defadvice gnus-article-read-summary-keys (around ky-gars-keys-adv activate)
>   (ad-set-arg 2 t)
>   ad-do-it
>   (gnus-summary-select-article-buffer))

that one creates an error on `q'. Most likely because the article
buffer is away then.

Michael




^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: `gnus-auto-center-summary' does not work when point is in
  2004-03-11 23:29             ` Michael Schierl
@ 2004-03-11 23:34               ` Katsumi Yamaoka
  2004-03-12  4:48                 ` Katsumi Yamaoka
  0 siblings, 1 reply; 17+ messages in thread
From: Katsumi Yamaoka @ 2004-03-11 23:34 UTC (permalink / raw)


>>>>> In <wkishbt12k.fsf@smsoft.ixy.de>
>>>>>	Michael Schierl <schierlm-usenet@gmx.de> wrote:

>> (defadvice gnus-article-read-summary-keys (around ky-gars-keys-adv activate)

> that one creates an error on `q'. Most likely because the article
> buffer is away then.

Oops.  Indeed.



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: `gnus-auto-center-summary' does not work when point is in
  2004-03-11 23:34               ` Katsumi Yamaoka
@ 2004-03-12  4:48                 ` Katsumi Yamaoka
  2004-03-12 17:56                   ` Michael Schierl
  0 siblings, 1 reply; 17+ messages in thread
From: Katsumi Yamaoka @ 2004-03-12  4:48 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 420 bytes --]

I've fixed the gnus-article-read-summary-keys function so that
gnus-auto-center-summary takes effect even if a user invokes
summary commands in the article buffer.

>>>>> In <b9yy8q7injs.fsf@jpl.org> Katsumi Yamaoka wrote:

> I used the following program in order to make it possible to use
> most of summary command keys in the article buffer:

The revised version (which can be put into the ~/.gnus.el file)
is here:


[-- Attachment #2: Type: application/emacs-lisp, Size: 548 bytes --]

[-- Attachment #3: Type: text/plain, Size: 38 bytes --]

-- 
Katsumi Yamaoka <yamaoka@jpl.org>

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: `gnus-auto-center-summary' does not work when point is in
  2004-03-12  4:48                 ` Katsumi Yamaoka
@ 2004-03-12 17:56                   ` Michael Schierl
  2004-03-12 18:23                     ` David S Goldberg
  2004-03-13  1:08                     ` Katsumi Yamaoka
  0 siblings, 2 replies; 17+ messages in thread
From: Michael Schierl @ 2004-03-12 17:56 UTC (permalink / raw)


Katsumi Yamaoka <yamaoka@jpl.org> writes:

> I've fixed the gnus-article-read-summary-keys function so that
> gnus-auto-center-summary takes effect even if a user invokes
> summary commands in the article buffer.

Hmm. In CVS. Will there be an update for "stable" Gnus? (although I've
been hit by the "pseudo article bug" today as well, so maybe CVS is
really the better choice?)

>>>>>> In <b9yy8q7injs.fsf@jpl.org> Katsumi Yamaoka wrote:
>
>> I used the following program in order to make it possible to use
>> most of summary command keys in the article buffer:
>
> The revised version (which can be put into the ~/.gnus.el file)
> is here:

Hmm, the keys i need are bound correctly nevertheless. Or do they need
to be bound differently?

Michael




^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: `gnus-auto-center-summary' does not work when point is in
  2004-03-12 17:56                   ` Michael Schierl
@ 2004-03-12 18:23                     ` David S Goldberg
  2004-03-13  1:08                     ` Katsumi Yamaoka
  1 sibling, 0 replies; 17+ messages in thread
From: David S Goldberg @ 2004-03-12 18:23 UTC (permalink / raw)


>>>>> On Fri, 12 Mar 2004 18:56:48 +0100, Michael Schierl
>>>>> <schierlm-usenet@gmx.de> said:

> Hmm, the keys i need are bound correctly nevertheless. Or do they need
> to be bound differently?

I mostly use . , n p c and l as well as the Z and Y prefixes.  All
work just fine from the article buffer (though I have to make sure I'm
not on a MIME button to use .) and as of today, the summary is
properly centered after each.

Thanks,

-- 
Dave Goldberg
david.goldberg6@verizon.net





^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: `gnus-auto-center-summary' does not work when point is in
  2004-03-12 17:56                   ` Michael Schierl
  2004-03-12 18:23                     ` David S Goldberg
@ 2004-03-13  1:08                     ` Katsumi Yamaoka
  2004-03-13 16:05                       ` Michael Schierl
  1 sibling, 1 reply; 17+ messages in thread
From: Katsumi Yamaoka @ 2004-03-13  1:08 UTC (permalink / raw)
  Cc: ding

[-- Attachment #1: Type: text/plain, Size: 287 bytes --]

>>>>> In <wk65dane3j.fsf@smsoft.ixy.de>
>>>>>	Michael Schierl <schierlm-usenet@gmx.de> wrote:

> Katsumi Yamaoka <yamaoka@jpl.org> writes:

>> I've fixed the gnus-article-read-summary-keys function so that...

> Hmm. In CVS. Will there be an update for "stable" Gnus?

Yes, here it is.


[-- Attachment #2: gnus-5.10.6-garsk.patch.gz --]
[-- Type: application/x-gzip, Size: 667 bytes --]

[-- Attachment #3: Type: text/plain, Size: 436 bytes --]

> (although I've been hit by the "pseudo article bug" today as
> well, so maybe CVS is really the better choice?)

I read your bug report but I couldn't solve it, sorry.

>> The revised version (which can be put into the ~/.gnus.el file)
>> is here:

> Hmm, the keys i need are bound correctly nevertheless. Or do they need
> to be bound differently?

The program I've posted is a mere example. :)
-- 
Katsumi Yamaoka <yamaoka@jpl.org>

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: `gnus-auto-center-summary' does not work when point is in
  2004-03-13  1:08                     ` Katsumi Yamaoka
@ 2004-03-13 16:05                       ` Michael Schierl
  2004-03-15  4:33                         ` Katsumi Yamaoka
  0 siblings, 1 reply; 17+ messages in thread
From: Michael Schierl @ 2004-03-13 16:05 UTC (permalink / raw)


Katsumi Yamaoka <yamaoka@jpl.org> writes:
>>>>>> In <wk65dane3j.fsf@smsoft.ixy.de>
>>>>>>	Michael Schierl <schierlm-usenet@gmx.de> wrote:

>> Hmm. In CVS. Will there be an update for "stable" Gnus?
>
> Yes, here it is.

thank you.

>> (although I've been hit by the "pseudo article bug" today as
>> well, so maybe CVS is really the better choice?)
>
> I read your bug report but I couldn't solve it, sorry.

Thanks for accrediting the report to me, but I don't think i wrote
it. But i suffer from it as well. (Strange, sometimes bugs are found
by more than one person at the same time ;) )

Michael




^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: `gnus-auto-center-summary' does not work when point is in
  2004-03-13 16:05                       ` Michael Schierl
@ 2004-03-15  4:33                         ` Katsumi Yamaoka
  0 siblings, 0 replies; 17+ messages in thread
From: Katsumi Yamaoka @ 2004-03-15  4:33 UTC (permalink / raw)
  Cc: ding

>>>>> In <wk65d868cw.fsf@smsoft.ixy.de>
>>>>>	Michael Schierl <schierlm-usenet@gmx.de> wrote:

>>> (although I've been hit by the "pseudo article bug" today as
>>> well, so maybe CVS is really the better choice?)
>>
>> I read your bug report but I couldn't solve it, sorry.

> Thanks for accrediting the report to me, but I don't think i wrote
> it. But i suffer from it as well. (Strange, sometimes bugs are found
> by more than one person at the same time ;) )

Oops, that was not yours.  Since I read the same bug report
several times, I got confused completely.  Recently, someone
wrote about it in the gnus.gnus-bug newsgroup (articles posted
to <bugs@gnus.org> are fed there).  According to that thread,
there may be a relation with agent...
-- 
Katsumi Yamaoka <yamaoka@jpl.org>



^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2004-03-15  4:33 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-03-10 21:14 `gnus-auto-center-summary' does not work when point is in article buffer Michael Schierl
2004-03-11  0:37 ` zeDek
2004-03-11  0:51   ` `gnus-auto-center-summary' does not work when point is in Jon Ericson
2004-03-11  1:57     ` Katsumi Yamaoka
2004-03-11 12:19       ` `gnus-auto-center-summary' does not work when point is in article buffer Katsumi Yamaoka
2004-03-11 14:49         ` `gnus-auto-center-summary' does not work when point is in David S Goldberg
2004-03-11 20:04         ` Michael Schierl
2004-03-11 22:52           ` Katsumi Yamaoka
2004-03-11 23:29             ` Michael Schierl
2004-03-11 23:34               ` Katsumi Yamaoka
2004-03-12  4:48                 ` Katsumi Yamaoka
2004-03-12 17:56                   ` Michael Schierl
2004-03-12 18:23                     ` David S Goldberg
2004-03-13  1:08                     ` Katsumi Yamaoka
2004-03-13 16:05                       ` Michael Schierl
2004-03-15  4:33                         ` Katsumi Yamaoka
2004-03-11 14:43     ` Xavier Maillard

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).