Gnus development mailing list
 help / color / mirror / Atom feed
* exiting digest mails does not move the cursor to next line
@ 2007-05-05 11:21 Shanks N
  2007-05-06 14:00 ` Katsumi Yamaoka
  2007-05-08 13:09 ` Exiting groups moves the cursor to next line (was: exiting digest mails does not move the cursor to next line) Michaël Cadilhac
  0 siblings, 2 replies; 18+ messages in thread
From: Shanks N @ 2007-05-05 11:21 UTC (permalink / raw)
  To: ding

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


Hello,

In the previous version of No gnus 0.4/0.5, entering a nnml group with
mails in digest format, the following was the behaviour.

1.  Hit C-d to read the digest mail
2.  hit q to quit reading the above
3.  Cursor moves to next digest mail

With the version below, the cursor continues to stay on the same mail
line on the Summary page. 


No Gnus v0.6
GNU Emacs 22.0.50.2 (i386-mingw-nt5.1.2600)
 of 2005-04-17 on LAPTOP

regards,
Shanks





[-- Attachment #2: User settings --]
[-- Type: application/emacs-lisp, Size: 3264 bytes --]

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

* Re: exiting digest mails does not move the cursor to next line
  2007-05-05 11:21 exiting digest mails does not move the cursor to next line Shanks N
@ 2007-05-06 14:00 ` Katsumi Yamaoka
  2007-05-08 12:18   ` Katsumi Yamaoka
  2007-05-08 13:09 ` Exiting groups moves the cursor to next line (was: exiting digest mails does not move the cursor to next line) Michaël Cadilhac
  1 sibling, 1 reply; 18+ messages in thread
From: Katsumi Yamaoka @ 2007-05-06 14:00 UTC (permalink / raw)
  To: Shanks N; +Cc: ding

>>>>> In <uy7k3zfb3.fsf@gmail.com>
>>>>>	Shanks N <shanks.n@gmail.com> wrote:

> In the previous version of No gnus 0.4/0.5, entering a nnml group with
> mails in digest format, the following was the behaviour.

> 1.  Hit C-d to read the digest mail
> 2.  hit q to quit reading the above
> 3.  Cursor moves to next digest mail

> With the version below, the cursor continues to stay on the same mail
> line on the Summary page.

> No Gnus v0.6
> GNU Emacs 22.0.50.2 (i386-mingw-nt5.1.2600)
>  of 2005-04-17 on LAPTOP

I did it, though I don't recall why I thought that's good.

2006-05-12  Katsumi Yamaoka  <yamaoka@jpl.org>
[...]
	(gnus-handle-ephemeral-exit): Don't move to next summary line.

I'll make the behavior customizable, within a couple of days.

Thanks.



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

* Re: exiting digest mails does not move the cursor to next line
  2007-05-06 14:00 ` Katsumi Yamaoka
@ 2007-05-08 12:18   ` Katsumi Yamaoka
  2007-05-08 14:25     ` Shanks N
  0 siblings, 1 reply; 18+ messages in thread
From: Katsumi Yamaoka @ 2007-05-08 12:18 UTC (permalink / raw)
  To: Shanks N; +Cc: ding

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

>>>>>> In <uy7k3zfb3.fsf@gmail.com>
>>>>>>	Shanks N <shanks.n@gmail.com> wrote:

>> In the previous version of No gnus 0.4/0.5, entering a nnml group with
>> mails in digest format, the following was the behaviour.

>> 1.  Hit C-d to read the digest mail
>> 2.  hit q to quit reading the above
>> 3.  Cursor moves to next digest mail

>> With the version below, the cursor continues to stay on the same mail
>> line on the Summary page.

>> No Gnus v0.6
>> GNU Emacs 22.0.50.2 (i386-mingw-nt5.1.2600)
>>  of 2005-04-17 on LAPTOP

> I did it, though I don't recall why I thought that's good.

> 2006-05-12  Katsumi Yamaoka  <yamaoka@jpl.org>
> [...]
> 	(gnus-handle-ephemeral-exit): Don't move to next summary line.

> I'll make the behavior customizable, within a couple of days.

Before No Gnus v0.6, after exiting the ephemeral (nndoc) group,
Gnus displayed the old article[1], i.e., the original of the one
that you have already read in the ephemeral group, in the
article buffer in spite of the cursor pointing to the next
article in the summary buffer.  I didn't feel it was good that
the summary buffer and the article buffer didn't synchronize.

[1] From Gnus v5.10.2 to No Gnus v0.5, only the header was
    displayed because redisplaying the whole article did cost
    (see Jesper's comment in the `gnus-handle-ephemeral-exit'
    function).  Now it can be done gratis, though.

Then you might have wanted to type `g' for displaying the next
article or to type `P' to redisplay the article.  OTOH, now you
can choose to type `n' (or `N') or to do nothing.  Do you think
which is better?

Otherwise, I think Gnus should really display the next article
according to the user option.  Though I'm satisfied with the
present behavior and am not urged to make Gnus do so.

Regards,



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

* Exiting groups moves the cursor to next line (was: exiting digest mails does not move the cursor to next line)
  2007-05-05 11:21 exiting digest mails does not move the cursor to next line Shanks N
  2007-05-06 14:00 ` Katsumi Yamaoka
@ 2007-05-08 13:09 ` Michaël Cadilhac
  2007-05-08 17:44   ` Exiting groups moves the cursor to next line Reiner Steib
  1 sibling, 1 reply; 18+ messages in thread
From: Michaël Cadilhac @ 2007-05-08 13:09 UTC (permalink / raw)
  To: ding


[-- Attachment #1.1: Type: text/plain, Size: 696 bytes --]

Shanks N <shanks.n@gmail.com> writes:

> Hello,
>
> In the previous version of No gnus 0.4/0.5, entering a nnml group with
> mails in digest format, the following was the behaviour.
>
> 1.  Hit C-d to read the digest mail
> 2.  hit q to quit reading the above
> 3.  Cursor moves to next digest mail
>
> With the version below, the cursor continues to stay on the same mail
> line on the Summary page. 

Speaking of  which, I've  always been bothered  by a  similar feature:
when exiting  a summary  buffer, the next  group line is  selected. In
fact, if I want  the next group to be selected, I  just don't exit the
group and continue `n'-ing.

Can we make it customizable?


[-- Attachment #1.2: gnus-sum.patch --]
[-- Type: text/x-patch, Size: 1689 bytes --]

Index: lisp/gnus-sum.el
===================================================================
RCS file: /usr/local/cvsroot/gnus/lisp/gnus-sum.el,v
retrieving revision 7.182
diff -c -r7.182 gnus-sum.el
*** lisp/gnus-sum.el	27 Apr 2007 08:39:17 -0000	7.182
--- lisp/gnus-sum.el	8 May 2007 12:57:23 -0000
***************
*** 62,67 ****
--- 62,72 ----
    :group 'gnus-summary-exit
    :type 'boolean)
  
+ (defcustom gnus-next-group-on-exit t
+   "*If non-nil, go to the next unread newsgroup on summary exit."
+   :group 'gnus-summary-exit
+   :type 'boolean)
+ 
  (defcustom gnus-fetch-old-headers nil
    "*Non-nil means that Gnus will try to build threads by grabbing old headers.
  If an unread article in the group refers to an older, already
***************
*** 6933,6938 ****
--- 6938,6944 ----
        (gnus-group-jump-to-group group))
      (gnus-run-hooks 'gnus-summary-exit-hook)
      (unless (or quit-config
+ 		(not gnus-next-group-on-exit)
  		;; If this group has disappeared from the summary
  		;; buffer, don't skip forwards.
  		(not (string= group (gnus-group-group-name))))
Index: lisp/ChangeLog
===================================================================
RCS file: /usr/local/cvsroot/gnus/lisp/ChangeLog,v
retrieving revision 7.1543
diff -C0 -r7.1543 ChangeLog
*** lisp/ChangeLog	3 May 2007 18:34:28 -0000	7.1543
--- lisp/ChangeLog	8 May 2007 12:57:29 -0000
***************
*** 0 ****
--- 1,6 ----
+ 2007-05-08  Michaël Cadilhac  <michael@cadilhac.name>
+ 
+ 	* gnus-sum.el (gnus-next-group-on-exit): New variable.  Tell if, on
+ 	summary exit, the next group has to be selected.
+ 	(gnus-summary-exit): Use it.
+ 

[-- Attachment #1.3: Type: text/plain, Size: 327 bytes --]


-- 
 |   Michaël `Micha' Cadilhac       |  La meilleure façon                    |
 |   http://michael.cadilhac.name   |     de ne pas avancer,                 |
 |   JID/MSN:                       |  c'est de suivre une idée fixe.        |
 `----  michael.cadilhac@gmail.com  |          -- Jacques Prévert       -  --'

[-- Attachment #2: Type: application/pgp-signature, Size: 188 bytes --]

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

* Re: exiting digest mails does not move the cursor to next line
  2007-05-08 12:18   ` Katsumi Yamaoka
@ 2007-05-08 14:25     ` Shanks N
  2007-05-09  8:25       ` Katsumi Yamaoka
  0 siblings, 1 reply; 18+ messages in thread
From: Shanks N @ 2007-05-08 14:25 UTC (permalink / raw)
  To: ding

Katsumi Yamaoka <yamaoka@jpl.org> writes:

>>>>>> In <b4m8xc2yrtx.fsf@jpl.org> Katsumi Yamaoka wrote:
>
>>>>>>> In <uy7k3zfb3.fsf@gmail.com>
>>>>>>>	Shanks N <shanks.n@gmail.com> wrote:
>

[...]

> Before No Gnus v0.6, after exiting the ephemeral (nndoc) group,
> Gnus displayed the old article[1], i.e., the original of the one
> that you have already read in the ephemeral group, in the
> article buffer in spite of the cursor pointing to the next
> article in the summary buffer.  I didn't feel it was good that
> the summary buffer and the article buffer didn't synchronize.
>
> [1] From Gnus v5.10.2 to No Gnus v0.5, only the header was
>     displayed because redisplaying the whole article did cost
>     (see Jesper's comment in the `gnus-handle-ephemeral-exit'
>     function).  Now it can be done gratis, though.
>
> Then you might have wanted to type `g' for displaying the next
> article or to type `P' to redisplay the article.  OTOH, now you
> can choose to type `n' (or `N') or to do nothing.  Do you think
> which is better?
>
> Otherwise, I think Gnus should really display the next article
> according to the user option.  Though I'm satisfied with the
> present behavior and am not urged to make Gnus do so.
>
> Regards,

Actually, I don't mind any option.  When I started using Gnus to read
digest mails (I don't recollect for normal mails), I found it initially
annoying.  Then I got used to it as it saved 1 <down arrow> key press.

Now that it's changed again, I'll learn it over again.  At least it
appears to fit the principle of least surprises from a user
perspective. 

Thanks anyway.

Shanks

-- 




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

* Re: Exiting groups moves the cursor to next line
  2007-05-08 13:09 ` Exiting groups moves the cursor to next line (was: exiting digest mails does not move the cursor to next line) Michaël Cadilhac
@ 2007-05-08 17:44   ` Reiner Steib
  2007-05-08 21:25     ` Michaël Cadilhac
  0 siblings, 1 reply; 18+ messages in thread
From: Reiner Steib @ 2007-05-08 17:44 UTC (permalink / raw)
  To: ding

On Tue, May 08 2007, Michaël Cadilhac wrote:

> Speaking of  which, I've  always been bothered  by a  similar feature:
> when exiting  a summary  buffer, the next  group line is  selected. In
> fact, if I want  the next group to be selected, I  just don't exit the
> group and continue `n'-ing.
>
> Can we make it customizable?

Good idea.  A user in de.comm.software.gnus also requested this some
time ago.  Back then, I've prepared the following patch:

--8<---------------cut here---------------start------------->8---
--- gnus-group.el	24 Jan 2007 07:15:37 -0000	7.92
+++ gnus-group.el	8 May 2007 17:32:51 -0000
@@ -93,6 +93,14 @@
   :group 'gnus-group-various
   :type 'boolean)
 
+(defcustom gnus-group-goto-next-group t
+  "If non-nil, the cursor will move to the group on summary exit.
+See `gnus-group-goto-unread'."
+  :link '(custom-manual "(gnus)Group Maneuvering")
+  :group 'gnus-group-various
+  :version "23.0" ;; No Gnus
+  :type 'boolean)
+
 (defcustom gnus-goto-next-group-when-activating t
   "*If non-nil, the \\<gnus-group-mode-map>\\[gnus-group-get-new-news-this-group] command will advance point to the next group."
   :link '(custom-manual "(gnus)Scanning New Messages")

--- gnus-sum.el	19 Jul 2006 09:07:52 -0000	7.156
+++ gnus-sum.el	31 Aug 2006 20:19:18 -0000
@@ -6878,6 +6878,7 @@
       (gnus-group-jump-to-group group))
     (gnus-run-hooks 'gnus-summary-exit-hook)
     (unless (or quit-config
+		(not gnus-group-goto-next-group)
 		;; If this group has disappeared from the summary
 		;; buffer, don't skip forwards.
 		(not (string= group (gnus-group-group-name))))
--8<---------------cut here---------------end--------------->8---

> --- lisp/gnus-sum.el	27 Apr 2007 08:39:17 -0000	7.182
> +++ lisp/gnus-sum.el	8 May 2007 12:57:23 -0000
> @@ -62,6 +62,11 @@
>    :group 'gnus-summary-exit
>    :type 'boolean)
>
> +(defcustom gnus-next-group-on-exit t
> +  "*If non-nil, go to the next unread newsgroup on summary exit."
> +  :group 'gnus-summary-exit
> +  :type 'boolean)

Please don't add a "*" when introducing a new defcustom (it's useless)
and add a custom version (see above).  Documentation in the manual and
a custom-manual link would also be nice.

Beside these remarks, I don't have a strong opinion which version we
use.  Do you have commit access now?

Bye, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo---  |  PGP key available  |  http://rsteib.home.pages.de/




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

* Re: Exiting groups moves the cursor to next line
  2007-05-08 17:44   ` Exiting groups moves the cursor to next line Reiner Steib
@ 2007-05-08 21:25     ` Michaël Cadilhac
  2007-05-10 12:31       ` Michaël Cadilhac
  0 siblings, 1 reply; 18+ messages in thread
From: Michaël Cadilhac @ 2007-05-08 21:25 UTC (permalink / raw)
  To: ding

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

Reiner Steib <reinersteib+gmane@imap.cc> writes:

> On Tue, May 08 2007, Michaël Cadilhac wrote:
>
>> Speaking of  which, I've  always been bothered  by a  similar feature:
>> when exiting  a summary  buffer, the next  group line is  selected. In
>> fact, if I want  the next group to be selected, I  just don't exit the
>> group and continue `n'-ing.
>>
>> Can we make it customizable?
>
> Good idea.  A user in de.comm.software.gnus also requested this some
> time ago.

> +  :link '(custom-manual "(gnus)Group Maneuvering")
> +  :version "23.0" ;; No Gnus

> Please don't add a "*" when introducing a new defcustom (it's useless)

Yep, policy differs from package to package: stick to a uniform use of
`*', or progressively remove them.

> Documentation in the manual and a custom-manual link would also be
> nice.

Yep.

> Do you have commit access now?

No, not yet, Lars surely has better things to do :-)  But eventually,
I can install a mix of these patches, if the idea is OK.

-- 
 |   Michaël `Micha' Cadilhac       |  I'd be surprised if my fix doesn't    |
 |   http://michael.cadilhac.name   |      address this problem as well.     |
 |   JID/MSN:                       |  PS: But I like surprises.             |
 `----  michael.cadilhac@gmail.com  |          -- Stefan Monnier        -  --'

[-- Attachment #2: Type: application/pgp-signature, Size: 188 bytes --]

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

* Re: exiting digest mails does not move the cursor to next line
  2007-05-08 14:25     ` Shanks N
@ 2007-05-09  8:25       ` Katsumi Yamaoka
  0 siblings, 0 replies; 18+ messages in thread
From: Katsumi Yamaoka @ 2007-05-09  8:25 UTC (permalink / raw)
  To: Shanks N; +Cc: ding

>>>>> In <utzunie8q.fsf@gmail.com> Shanks N wrote:

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

>> Otherwise, I think Gnus should really display the next article
>> according to the user option.  Though I'm satisfied with the
>> present behavior and am not urged to make Gnus do so.

> Actually, I don't mind any option.  When I started using Gnus to read
> digest mails (I don't recollect for normal mails), I found it initially
> annoying.  Then I got used to it as it saved 1 <down arrow> key press.

> Now that it's changed again, I'll learn it over again.  At least it
> appears to fit the principle of least surprises from a user
> perspective.

I changed my mind. ;-)  Now I realized the current behavior is
not helpful especially for people who get many digest mails.
I've made the new option as follows:

,----
| The variable `gnus-auto-select-on-ephemeral-exit' controls what
| article should be selected after exiting a digest group.  Valid
| values include:
|
| next'
|      Select the next article.
|
| next-unread'
|      Select the next unread article.
|
| next-noselect'
|      Move the cursor to the next article.  This is the default.
|
| next-unread-noselect'
|      Move the cursor to the next unread article.
|
| If it has any other value or there is no next (unread) article, the
| article selected before entering to the digest group will appear.
`----

This is now in the Gnus CVS trunk.

Regards,

P.S. I made a snapshot named ngnus-0.7-200705090823.tar.gz in
ftp://ftp.jpl.org/pub/tmp/ and http://www.jpl.org/ftp/pub/tmp/.



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

* Re: Exiting groups moves the cursor to next line
  2007-05-08 21:25     ` Michaël Cadilhac
@ 2007-05-10 12:31       ` Michaël Cadilhac
  2007-05-12 15:13         ` Michaël Cadilhac
  0 siblings, 1 reply; 18+ messages in thread
From: Michaël Cadilhac @ 2007-05-10 12:31 UTC (permalink / raw)
  To: ding


[-- Attachment #1.1: Type: text/plain, Size: 187 bytes --]

michael@cadilhac.name (Michaël Cadilhac) writes:

> I can install a mix of these patches, if the idea is OK.

Here's the mix. If there's no objection, I'll install it later today.


[-- Attachment #1.2: gnus-sum.patch --]
[-- Type: text/x-patch, Size: 3112 bytes --]

Index: lisp/gnus-sum.el
===================================================================
RCS file: /usr/local/cvsroot/gnus/lisp/gnus-sum.el,v
retrieving revision 7.183
diff -c -r7.183 gnus-sum.el
*** lisp/gnus-sum.el	9 May 2007 08:23:42 -0000	7.183
--- lisp/gnus-sum.el	10 May 2007 12:27:49 -0000
***************
*** 62,67 ****
--- 62,75 ----
    :group 'gnus-summary-exit
    :type 'boolean)
  
+ (defcustom gnus-summary-next-group-on-exit t
+   "If non-nil, go to the next unread newsgroup on summary exit.
+ See `gnus-group-goto-unread'."
+   :link '(custom-manual "(gnus)Group Maneuvering")
+   :group 'gnus-summary-exit
+   :version "23.0" ;; No Gnus
+   :type 'boolean)
+ 
  (defcustom gnus-fetch-old-headers nil
    "*Non-nil means that Gnus will try to build threads by grabbing old headers.
  If an unread article in the group refers to an older, already
***************
*** 6955,6960 ****
--- 6963,6969 ----
        (gnus-group-jump-to-group group))
      (gnus-run-hooks 'gnus-summary-exit-hook)
      (unless (or quit-config
+ 		(not gnus-summary-next-group-on-exit)
  		;; If this group has disappeared from the summary
  		;; buffer, don't skip forwards.
  		(not (string= group (gnus-group-group-name))))
Index: texi/gnus.texi
===================================================================
RCS file: /usr/local/cvsroot/gnus/texi/gnus.texi,v
retrieving revision 7.228
diff -c -r7.228 gnus.texi
*** texi/gnus.texi	9 May 2007 08:23:47 -0000	7.228
--- texi/gnus.texi	10 May 2007 12:28:03 -0000
***************
*** 2087,2092 ****
--- 2087,2097 ----
  the commands that say they move to the next unread group.  The default
  is @code{t}.
  
+ @vindex gnus-summary-next-group-on-exit
+ If @code{gnus-summary-next-group-on-exit} is @code{t}, when a summary is
+ exited, the point in the group buffer is moved to the next unread group.
+ Otherwise, the point is set to the group just exited.  The default is
+ @code{t}.
  
  @node Selecting a Group
  @section Selecting a Group
Index: lisp/ChangeLog
===================================================================
RCS file: /usr/local/cvsroot/gnus/lisp/ChangeLog,v
retrieving revision 7.1545
diff -c -r7.1545 ChangeLog
*** lisp/ChangeLog	9 May 2007 08:23:42 -0000	7.1545
--- lisp/ChangeLog	10 May 2007 12:27:44 -0000
***************
*** 0 ****
--- 1,6 ----
+ 2007-05-10  Michaël Cadilhac  <michael@cadilhac.name>
+ 
+ 	* gnus-sum.el (gnus-summary-next-group-on-exit): New variable.  Tell if, on
+ 	summary exit, the next group has to be selected.
+ 	(gnus-summary-exit): Use it.
+ 
Index: texi/ChangeLog
===================================================================
RCS file: /usr/local/cvsroot/gnus/texi/ChangeLog,v
retrieving revision 7.328
diff -C0 -r7.328 ChangeLog
*** texi/ChangeLog	9 May 2007 08:23:47 -0000	7.328
--- texi/ChangeLog	10 May 2007 12:31:29 -0000
***************
*** 0 ****
--- 1,5 ----
+ 2007-05-10  Michaël Cadilhac  <michael@cadilhac.name>
+ 
+ 	* gnus.texi (Group Maneuvering): Document
+ 	`gnus-summary-next-group-on-exit'.
+ 

[-- Attachment #1.3: Type: text/plain, Size: 329 bytes --]



-- 
 |   Michaël `Micha' Cadilhac       |  I'd be surprised if my fix doesn't    |
 |   http://michael.cadilhac.name   |      address this problem as well.     |
 |   JID/MSN:                       |  PS: But I like surprises.             |
 `----  michael.cadilhac@gmail.com  |          -- Stefan Monnier        -  --'

[-- Attachment #2: Type: application/pgp-signature, Size: 188 bytes --]

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

* Re: Exiting groups moves the cursor to next line
  2007-05-10 12:31       ` Michaël Cadilhac
@ 2007-05-12 15:13         ` Michaël Cadilhac
  2007-05-13 23:01           ` Katsumi Yamaoka
  2007-05-13 23:14           ` Kevin Ryde
  0 siblings, 2 replies; 18+ messages in thread
From: Michaël Cadilhac @ 2007-05-12 15:13 UTC (permalink / raw)
  To: ding

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

Installed.

-- 
 |   Michaël `Micha' Cadilhac       |    The second-degree,                  |
 |   http://michael.cadilhac.name   |       is kind of                       |
 |   JID/MSN:                       |   the semantic back slang.             |
 `----  michael.cadilhac@gmail.com  |                                   -  --'

[-- Attachment #2: Type: application/pgp-signature, Size: 188 bytes --]

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

* Re: Exiting groups moves the cursor to next line
  2007-05-12 15:13         ` Michaël Cadilhac
@ 2007-05-13 23:01           ` Katsumi Yamaoka
  2007-05-14 14:57             ` Michaël Cadilhac
  2007-05-13 23:14           ` Kevin Ryde
  1 sibling, 1 reply; 18+ messages in thread
From: Katsumi Yamaoka @ 2007-05-13 23:01 UTC (permalink / raw)
  To: ding

>>>>> In <87r6pog8qx.fsf@lrde.org> Michaël Cadilhac wrote:

> + 2007-05-10  Michaël Cadilhac  <michael@cadilhac.name>
> +
> + 	* gnus-sum.el (gnus-summary-next-group-on-exit): New variable.  Tell if, on
> + 	summary exit, the next group has to be selected.
> + 	(gnus-summary-exit): Use it.

Only setting `gnus-group-goto-unread' to nil has been sufficient
for me but that's ok.;-)  Why don't you use
`gnus-summary-next-group-on-exit' in `gnus-summary-exit-no-update'
too?



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

* Re: Exiting groups moves the cursor to next line
  2007-05-12 15:13         ` Michaël Cadilhac
  2007-05-13 23:01           ` Katsumi Yamaoka
@ 2007-05-13 23:14           ` Kevin Ryde
  2007-05-14 15:13             ` Michaël Cadilhac
  2007-06-30 12:03             ` Johan Bockgård
  1 sibling, 2 replies; 18+ messages in thread
From: Kevin Ryde @ 2007-05-13 23:14 UTC (permalink / raw)
  To: ding

I've been using the exit command below for semi-smart advance.  If
reviewing an old group it doesn't advance, but in normal reading it
does.

"Old" means anything unsubscribed (I keep bits of occasional interest
in unsubscribed level), or anything with no unread articles (which is
not necessarily old, but is certainly a case of going back to
revisit).

I guess it's personal preference, but maybe there'd be a clean way to
have a notion of "reading in sequence" versus revisiting, and only
advance for the former.


(defun my-gnus-summary-exit (&optional temporary)
  "Like `gnus-summary-exit', but sometimes preserve point in *Group*."
  (interactive "P")
  (if (save-excursion
        (with-current-buffer "*Group*"
          (beginning-of-line)
          (looking-at "^ U\\|^. *0:")))
      (my-gnus-summary-exit-nonext temporary)
    (gnus-summary-exit temporary)))

(defun my-gnus-summary-exit-nonext (&optional temporary)
  "Like `gnus-summary-exit', but don't move in *Group*."
  (interactive "P")
  (let ((group gnus-newsgroup-name))
    (gnus-summary-exit temporary)
    (gnus-summary-jump-to-group group)))



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

* Re: Exiting groups moves the cursor to next line
  2007-05-13 23:01           ` Katsumi Yamaoka
@ 2007-05-14 14:57             ` Michaël Cadilhac
  2007-05-15  2:13               ` Katsumi Yamaoka
  0 siblings, 1 reply; 18+ messages in thread
From: Michaël Cadilhac @ 2007-05-14 14:57 UTC (permalink / raw)
  To: Katsumi Yamaoka; +Cc: ding

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

Katsumi Yamaoka <yamaoka@jpl.org> writes:

>>>>>> In <87r6pog8qx.fsf@lrde.org> Michaël Cadilhac wrote:
>
>> + 2007-05-10  Michaël Cadilhac  <michael@cadilhac.name>
>> +
>> + 	* gnus-sum.el (gnus-summary-next-group-on-exit): New variable.  Tell if, on
>> + 	summary exit, the next group has to be selected.
>> + 	(gnus-summary-exit): Use it.
>
> Only setting `gnus-group-goto-unread' to nil has been sufficient
> for me but that's ok.;-)

I _need_ to do things the hard way :-) Well, it's not completely the
same thing, isn't it?

> Why don't you use `gnus-summary-next-group-on-exit' in
> `gnus-summary-exit-no-update' too?

Simple: because I'm a newcomer in Gnus patching, and I had to make an
error.  Was quite obvious, nop? :-)

There's also two other occurrences of (gnus-group-next-unread-group 1),
but it's not really a « summary exit » so I don't know if I should put
the test there:

In gnus-summary-read-group-1:

     ;; We couldn't select this group.
     ((null did-select)
        [...]
	(gnus-group-next-unread-group 1)
        [...])

     ;; The user did a `C-g' while prompting for number of articles,
     ;; so we exit this group.
     ((eq did-select 'quit)
        [...]
	(gnus-group-next-unread-group 1)
        [...])

-- 
 |   Michaël `Micha' Cadilhac       |   Did you Mooh today ?                 |
 |   http://michael.cadilhac.name   |                                        |
 |   JID/MSN:                       |       http://boitam.eu/                |
 `----  michael.cadilhac@gmail.com  |                                   -  --'

[-- Attachment #2: Type: application/pgp-signature, Size: 188 bytes --]

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

* Re: Exiting groups moves the cursor to next line
  2007-05-13 23:14           ` Kevin Ryde
@ 2007-05-14 15:13             ` Michaël Cadilhac
  2007-06-30 12:03             ` Johan Bockgård
  1 sibling, 0 replies; 18+ messages in thread
From: Michaël Cadilhac @ 2007-05-14 15:13 UTC (permalink / raw)
  To: Kevin Ryde; +Cc: ding

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

Kevin Ryde <user42@zip.com.au> writes:

> (defun my-gnus-summary-exit (&optional temporary)
>   "Like `gnus-summary-exit', but sometimes preserve point in *Group*."
>   (interactive "P")
>   (if (save-excursion
>         (with-current-buffer "*Group*"
>           (beginning-of-line)
>           (looking-at "^ U\\|^. *0:")))
>       (my-gnus-summary-exit-nonext temporary)
>     (gnus-summary-exit temporary)))
>
> (defun my-gnus-summary-exit-nonext (&optional temporary)
>   "Like `gnus-summary-exit', but don't move in *Group*."
>   (interactive "P")
>   (let ((group gnus-newsgroup-name))
>     (gnus-summary-exit temporary)
>     (gnus-summary-jump-to-group group)))

Well, you now can use (not tested at all) :

(defun my-gnus-summary-exit (&optional temporary)
  (interactive "P")
  (let ((gnus-summary-next-group-on-exit
          (with-current-buffer "*Group*"
            (not (string-match "^ U\\|^. *0:" (thing-at-point 'line))))))
    (gnus-summary-exit temporary)))

Yeah! Less characters, less functions, more free disk space and memory!
Gorgeous, isn't it? :-)

> I guess it's personal preference, but maybe there'd be a clean way to
> have a notion of "reading in sequence" versus revisiting, and only
> advance for the former.

On the other hand, I don't know if it's good to add customization
mechanisms for summary exit that much.

-- 
 |   Michaël `Micha' Cadilhac       |  La meilleure façon                    |
 |   http://michael.cadilhac.name   |     de ne pas avancer,                 |
 |   JID/MSN:                       |  c'est de suivre une idée fixe.        |
 `----  michael.cadilhac@gmail.com  |          -- Jacques Prévert       -  --'

[-- Attachment #2: Type: application/pgp-signature, Size: 188 bytes --]

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

* Re: Exiting groups moves the cursor to next line
  2007-05-14 14:57             ` Michaël Cadilhac
@ 2007-05-15  2:13               ` Katsumi Yamaoka
  2007-05-18  1:33                 ` Kevin Ryde
  0 siblings, 1 reply; 18+ messages in thread
From: Katsumi Yamaoka @ 2007-05-15  2:13 UTC (permalink / raw)
  To: ding

>>>>> In <873b1z5u6x.fsf@lrde.org> Michaël Cadilhac wrote:
> Katsumi Yamaoka <yamaoka@jpl.org> writes:

>> Only setting `gnus-group-goto-unread' to nil has been sufficient
>> for me but that's ok.;-)

> I _need_ to do things the hard way :-) Well, it's not completely the
> same thing, isn't it?

Yes, they are not the same.  While `gnus-group-goto-unread' decides
where the point is moved to, `gnus-summary-next-group-on-exit'
decides whether to move the point or not and is preferred than
the former if it is nil.  `g-g-g-u' is used also for cases other
than simply exiting the summary buffer; the most typical one is
the `n' command in the group buffer, although it is named `unread'
and there is even the `N' command[1].  I'd been using `g-g-g-u'
with the nil value, but I can replace it with setting `g-s-n-g-o-e'
to nil if it is effective also when I use the `Q' command in the
summary buffer.

Why I needed to set `g-g-g-u' to nil is that I have all my mail
groups always visible (even if there is no unread article) in
the group buffer.  In the case where there are many mail groups
having no unread articles, I don't want Gnus to move the point
far far away.

>> Why don't you use `gnus-summary-next-group-on-exit' in
>> `gnus-summary-exit-no-update' too?

> Simple: because I'm a newcomer in Gnus patching, and I had to make an
> error.  Was quite obvious, nop? :-)

I think it is not a matter how long you've been improving Gnus. :-)

> There's also two other occurrences of (gnus-group-next-unread-group 1),
> but it's not really a « summary exit » so I don't know if I should put
> the test there:

> In gnus-summary-read-group-1:

>      ;; We couldn't select this group.
>      ((null did-select)
>         [...]
> 	(gnus-group-next-unread-group 1)
>         [...])

>      ;; The user did a `C-g' while prompting for number of articles,
>      ;; so we exit this group.
>      ((eq did-select 'quit)
>         [...]
> 	(gnus-group-next-unread-group 1)
>         [...])

IMHO, `gnus-summary-next-group-on-exit' should be effective also
for them, in the viewpoint that some of those who set it to nil
have a lot of visible groups having no unread article. ;-)

[1] I think it is better to make `gnus-group-next-unread-group'
behave as its name, regardless of the value of
`gnus-group-goto-unread'.  So does `gnus-group-prev-unread-group'.
Because there seems to be no means to move the point to an unread
group automatically for users who set `gnus-group-goto-unread' to
nil, `gnus-group-catchup-current' works on even groups in which
there is no unread article when two or more groups are marked if
`gnus-group-goto-unread' is nil...

Regards,

P.S.  Please ignore it but I hit on a plan; setting
`gnus-group-goto-unread' to `never' might become a substitute of
setting `gnus-summary-next-group-on-exit' to nil.



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

* Re: Exiting groups moves the cursor to next line
  2007-05-15  2:13               ` Katsumi Yamaoka
@ 2007-05-18  1:33                 ` Kevin Ryde
  2007-05-18  1:56                   ` Katsumi Yamaoka
  0 siblings, 1 reply; 18+ messages in thread
From: Kevin Ryde @ 2007-05-18  1:33 UTC (permalink / raw)
  To: ding

Katsumi Yamaoka <yamaoka@jpl.org> writes:
>
> In the case where there are many mail groups
> having no unread articles, I don't want Gnus to move the point
> far far away.

I wondered once if it could set the mark, so you can go C-x C-x to get
back.  (Unless that's now so and I never noticed ...)



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

* Re: Exiting groups moves the cursor to next line
  2007-05-18  1:33                 ` Kevin Ryde
@ 2007-05-18  1:56                   ` Katsumi Yamaoka
  0 siblings, 0 replies; 18+ messages in thread
From: Katsumi Yamaoka @ 2007-05-18  1:56 UTC (permalink / raw)
  To: ding

>>>>> In <87fy5urk4z.fsf@zip.com.au> Kevin Ryde wrote:
> Katsumi Yamaoka <yamaoka@jpl.org> writes:

>> In the case where there are many mail groups
>> having no unread articles, I don't want Gnus to move the point
>> far far away.

> I wondered once if it could set the mark, so you can go C-x C-x to get
> back.  (Unless that's now so and I never noticed ...)

Thanks.  It might be generally useful regardless of the values
of `gnus-group-goto-unread' and `gnus-summary-next-group-on-exit'.

(defadvice gnus-group-read-group (before mark-this-group activate)
  "Mark the group I am about to enter."
  (set-mark-command nil))



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

* Re: Exiting groups moves the cursor to next line
  2007-05-13 23:14           ` Kevin Ryde
  2007-05-14 15:13             ` Michaël Cadilhac
@ 2007-06-30 12:03             ` Johan Bockgård
  1 sibling, 0 replies; 18+ messages in thread
From: Johan Bockgård @ 2007-06-30 12:03 UTC (permalink / raw)
  To: ding

Kevin Ryde <user42@zip.com.au> writes:

> "Old" means anything unsubscribed (I keep bits of occasional interest
> in unsubscribed level), or anything with no unread articles (which is
> not necessarily old, but is certainly a case of going back to
> revisit).

My preference is

    ;; Kludge ahead
    (defadvice gnus-group-next-unread-group (around summary-exit activate)
      (if (boundp 'group-point)
          (let ((gnus-level-subscribed (max gnus-level-subscribed
                                            (gnus-group-group-level))))
            ad-do-it)
        ad-do-it))

to make the call to `gnus-group-next-unread-group' inside
`gnus-summary-exit' not insist on selecting a subscribed group, but
to instead advance to the next unread group on the same level or
better. I might have a whole bundle of seldomly read groups and i don't
want point to jump far away.

A more friendly way to do this would be welcome.

-- 
Johan Bockgård




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

end of thread, other threads:[~2007-06-30 12:03 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-05-05 11:21 exiting digest mails does not move the cursor to next line Shanks N
2007-05-06 14:00 ` Katsumi Yamaoka
2007-05-08 12:18   ` Katsumi Yamaoka
2007-05-08 14:25     ` Shanks N
2007-05-09  8:25       ` Katsumi Yamaoka
2007-05-08 13:09 ` Exiting groups moves the cursor to next line (was: exiting digest mails does not move the cursor to next line) Michaël Cadilhac
2007-05-08 17:44   ` Exiting groups moves the cursor to next line Reiner Steib
2007-05-08 21:25     ` Michaël Cadilhac
2007-05-10 12:31       ` Michaël Cadilhac
2007-05-12 15:13         ` Michaël Cadilhac
2007-05-13 23:01           ` Katsumi Yamaoka
2007-05-14 14:57             ` Michaël Cadilhac
2007-05-15  2:13               ` Katsumi Yamaoka
2007-05-18  1:33                 ` Kevin Ryde
2007-05-18  1:56                   ` Katsumi Yamaoka
2007-05-13 23:14           ` Kevin Ryde
2007-05-14 15:13             ` Michaël Cadilhac
2007-06-30 12:03             ` Johan Bockgård

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