Gnus development mailing list
 help / color / mirror / Atom feed
* Select first *unseen* unread message in summary buffer?
@ 2001-12-05  5:39 Daniel Pittman
  2001-12-05  5:56 ` Matt Armstrong
                   ` (2 more replies)
  0 siblings, 3 replies; 15+ messages in thread
From: Daniel Pittman @ 2001-12-05  5:39 UTC (permalink / raw)


Hey y'all. I am curious to know if there is as (easy) way to get Gnus to
put point on the first /unseen/ and unread article in a summary buffer.

Basically, what I want is that when I enter the group, Gnus places point
after the article that I have not read but have seen, by default.

This way I can have articles sitting there for attention but not focus
them if I, for example, 'n n' in the previous group.

        Daniel

-- 
We are so accustomed to wearing a disguise before others that
eventually we are unable to recognize ourselves.
        -- Francois Duc De La Rochefoucauld



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

* Re: Select first *unseen* unread message in summary buffer?
  2001-12-05  5:39 Select first *unseen* unread message in summary buffer? Daniel Pittman
@ 2001-12-05  5:56 ` Matt Armstrong
  2001-12-05  9:11   ` Colin Marquardt
  2001-12-05  9:20   ` Daniel Pittman
  2001-12-05  8:57 ` Kai Großjohann
  2001-12-07 14:29 ` Simon Josefsson
  2 siblings, 2 replies; 15+ messages in thread
From: Matt Armstrong @ 2001-12-05  5:56 UTC (permalink / raw)
  Cc: ding

Daniel Pittman <daniel@rimspace.net> writes:

> Hey y'all. I am curious to know if there is as (easy) way to get Gnus to
> put point on the first /unseen/ and unread article in a summary buffer.
>
> Basically, what I want is that when I enter the group, Gnus places point
> after the article that I have not read but have seen, by default.
>
> This way I can have articles sitting there for attention but not focus
> them if I, for example, 'n n' in the previous group.

I'm a little confused.  What do you mean by "unseen"?  Gnus makes a
distinction between read and unread, with every article state other
than unread implying that the article has been read.

-- 
matt



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

* Re: Select first *unseen* unread message in summary buffer?
  2001-12-05  5:39 Select first *unseen* unread message in summary buffer? Daniel Pittman
  2001-12-05  5:56 ` Matt Armstrong
@ 2001-12-05  8:57 ` Kai Großjohann
  2001-12-05  9:22   ` Daniel Pittman
  2001-12-07 14:29 ` Simon Josefsson
  2 siblings, 1 reply; 15+ messages in thread
From: Kai Großjohann @ 2001-12-05  8:57 UTC (permalink / raw)
  Cc: ding

Daniel Pittman <daniel@rimspace.net> writes:

> Hey y'all. I am curious to know if there is as (easy) way to get Gnus to
> put point on the first /unseen/ and unread article in a summary buffer.

Hm.  You mean the same article that `.' or `,' goes to?  So you want
`.' but without auto-selecting the article.  I don't know if that
works.

kai
-- 
Simplification good!  Oversimplification bad!  (Larry Wall)



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

* Re: Select first *unseen* unread message in summary buffer?
  2001-12-05  5:56 ` Matt Armstrong
@ 2001-12-05  9:11   ` Colin Marquardt
  2001-12-05  9:20   ` Daniel Pittman
  1 sibling, 0 replies; 15+ messages in thread
From: Colin Marquardt @ 2001-12-05  9:11 UTC (permalink / raw)


"Matt Armstrong" <matt+dated+1007963807.5ef3c2@lickey.com> writes:

> Daniel Pittman <daniel@rimspace.net> writes:
>
>> Hey y'all. I am curious to know if there is as (easy) way to get Gnus to
>> put point on the first /unseen/ and unread article in a summary buffer.
>>
>> Basically, what I want is that when I enter the group, Gnus places point
>> after the article that I have not read but have seen, by default.
>>
>> This way I can have articles sitting there for attention but not focus
>> them if I, for example, 'n n' in the previous group.
>
> I'm a little confused.  What do you mean by "unseen"?  Gnus makes a
> distinction between read and unread, with every article state other
> than unread implying that the article has been read.

It also knows about unseen: if you enter a Group which has new articles,
and then leave the Group without reading the new articles, it knows them
as seen (but unread). If you re-enter the Group again, and it has gotten
new articles in the meantime, these articles are unseen and are marked
with an "N" in the summary. This is a recent (maybe 4-6 weeks?) addition
to Oort.

Funny enough, I have at least seen that feature in the past, but not
currently. Not sure if I did something to change this, and I cannot
try a newer version since the nightly snapshots are not up-to-date
and I cannot access CVS from here.

Colin

-- 
"; -- is the ever important semi-colon without which Perl freaks out."
                                                 [from www.newbie.org]



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

* Re: Select first *unseen* unread message in summary buffer?
  2001-12-05  5:56 ` Matt Armstrong
  2001-12-05  9:11   ` Colin Marquardt
@ 2001-12-05  9:20   ` Daniel Pittman
  2001-12-05 10:37     ` Martin Monsorno
  1 sibling, 1 reply; 15+ messages in thread
From: Daniel Pittman @ 2001-12-05  9:20 UTC (permalink / raw)


On Tue, 04 Dec 2001, Matt Armstrong wrote:
> Daniel Pittman <daniel@rimspace.net> writes:
> 
>> Hey y'all. I am curious to know if there is as (easy) way to get Gnus
>> to put point on the first /unseen/ and unread article in a summary
>> buffer.
>>
>> Basically, what I want is that when I enter the group, Gnus places
>> point after the article that I have not read but have seen, by
>> default.
>>
>> This way I can have articles sitting there for attention but not
>> focus them if I, for example, 'n n' in the previous group.
> 
> I'm a little confused.  What do you mean by "unseen"?  

I mean an article that has the unseen mark next to it. The little '.'
character, for reference, that's available in a fairly modern Gnus for
nnml mail. :)

> Gnus makes a distinction between read and unread, with every article
> state other than unread implying that the article has been read.

Yes, it does. It /also/ tracks if this is the first time that a message
has been shown in a summary buffer and shows the '.' if it has not.

So, it's not all that uncommon for me to enter a group and see three
marked messages (*), two unread and two unread-but-seen-before messages.

        Daniel

-- 
Let the credulous and the vulgar continue to believe that all mental woes can
be cured by a daily application of old Greek myths to their private parts.
        -- Vladimir Nabokov



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

* Re: Select first *unseen* unread message in summary buffer?
  2001-12-05  8:57 ` Kai Großjohann
@ 2001-12-05  9:22   ` Daniel Pittman
  0 siblings, 0 replies; 15+ messages in thread
From: Daniel Pittman @ 2001-12-05  9:22 UTC (permalink / raw)


On Wed, 05 Dec 2001, Kai Großjohann wrote:
> Daniel Pittman <daniel@rimspace.net> writes:
> 
>> Hey y'all. I am curious to know if there is as (easy) way to get Gnus
>> to put point on the first /unseen/ and unread article in a summary
>> buffer.
> 
> Hm.  You mean the same article that `.' or `,' goes to?  

Not quite. That is the action that I want to customize. :)

> So you want `.' but without auto-selecting the article. I don't know
> if that works.

No. I want to select the first article that has the '.' secondary mark
*as well* as the unread (absence of a) mark.

        Daniel

-- 
A pedestal is as much a prison as any small space.
        -- Gloria Steinem



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

* Re: Select first *unseen* unread message in summary buffer?
  2001-12-05  9:20   ` Daniel Pittman
@ 2001-12-05 10:37     ` Martin Monsorno
  2001-12-05 11:33       ` Daniel Pittman
  2001-12-05 16:51       ` Matt Armstrong
  0 siblings, 2 replies; 15+ messages in thread
From: Martin Monsorno @ 2001-12-05 10:37 UTC (permalink / raw)
  Cc: ding

Daniel Pittman <daniel@rimspace.net> writes:

> On Tue, 04 Dec 2001, Matt Armstrong wrote:
>> Daniel Pittman <daniel@rimspace.net> writes:
>> 
>>> Hey y'all. I am curious to know if there is as (easy) way to get Gnus
>>> to put point on the first /unseen/ and unread article in a summary
>>> buffer.
>>>
>>> Basically, what I want is that when I enter the group, Gnus places
>>> point after the article that I have not read but have seen, by
>>> default.
>>>
>>> This way I can have articles sitting there for attention but not
>>> focus them if I, for example, 'n n' in the previous group.
>> 
>> I'm a little confused.  What do you mean by "unseen"?  
>
> I mean an article that has the unseen mark next to it. The little '.'
> character, for reference, that's available in a fairly modern Gnus for
> nnml mail. :)
>

So that's the reason for the ".". That's interesting, I didn't know
this, too.

-- 
Martin Monsorno
mailto:monsorno@gmx.de



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

* Re: Select first *unseen* unread message in summary buffer?
  2001-12-05 10:37     ` Martin Monsorno
@ 2001-12-05 11:33       ` Daniel Pittman
  2001-12-05 16:51       ` Matt Armstrong
  1 sibling, 0 replies; 15+ messages in thread
From: Daniel Pittman @ 2001-12-05 11:33 UTC (permalink / raw)


On Wed, 05 Dec 2001, Martin Monsorno wrote:
> Daniel Pittman <daniel@rimspace.net> writes:
>> On Tue, 04 Dec 2001, Matt Armstrong wrote:
>>> Daniel Pittman <daniel@rimspace.net> writes:

[...]

>>> I'm a little confused.  What do you mean by "unseen"?  
>>
>> I mean an article that has the unseen mark next to it. The little '.' 
>> character, for reference, that's available in a fairly modern Gnus
>> for nnml mail. :)
> 
> So that's the reason for the ".". That's interesting, I didn't know
> this, too.

Yup, it's /very/ useful for me, because I use "marked" and "unread" as
two levels of importance in my groups. This works quite well...

...but is vaguely odd when reading. So, I want to /use/ this unseen mark
to aide in that and I am hoping (but less each hour) that someone else
has already done the work to make it possible for me. :)

        Daniel

-- 
This country has a deep fear and mistrust of strong, smart, accomplished,
outspoken women unless they are sexy 22-year-olds killing vampires on
television.
        -- Dennis Miller



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

* Re: Select first *unseen* unread message in summary buffer?
  2001-12-05 10:37     ` Martin Monsorno
  2001-12-05 11:33       ` Daniel Pittman
@ 2001-12-05 16:51       ` Matt Armstrong
  1 sibling, 0 replies; 15+ messages in thread
From: Matt Armstrong @ 2001-12-05 16:51 UTC (permalink / raw)


Martin Monsorno <monsorno@gmx.de> writes:

> Daniel Pittman <daniel@rimspace.net> writes:
>
>> I mean an article that has the unseen mark next to it. The little '.'
>> character, for reference, that's available in a fairly modern Gnus for
>> nnml mail. :)
>
> So that's the reason for the ".". That's interesting, I didn't know
> this, too.

So *that* is what that little dot means.  ;-)


-- 
matt



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

* Re: Select first *unseen* unread message in summary buffer?
  2001-12-05  5:39 Select first *unseen* unread message in summary buffer? Daniel Pittman
  2001-12-05  5:56 ` Matt Armstrong
  2001-12-05  8:57 ` Kai Großjohann
@ 2001-12-07 14:29 ` Simon Josefsson
  2001-12-08  8:56   ` Daniel Pittman
  2 siblings, 1 reply; 15+ messages in thread
From: Simon Josefsson @ 2001-12-07 14:29 UTC (permalink / raw)
  Cc: ding

Daniel Pittman <daniel@rimspace.net> writes:

> Hey y'all. I am curious to know if there is as (easy) way to get Gnus to
> put point on the first /unseen/ and unread article in a summary buffer.
>
> Basically, what I want is that when I enter the group, Gnus places point
> after the article that I have not read but have seen, by default.

Can you score up "unseen" (and possibly "recent" as well) articles and
then use ',' (`gnus-summary-best-unread-article')?




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

* Re: Select first *unseen* unread message in summary buffer?
  2001-12-07 14:29 ` Simon Josefsson
@ 2001-12-08  8:56   ` Daniel Pittman
  2001-12-29  1:32     ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 15+ messages in thread
From: Daniel Pittman @ 2001-12-08  8:56 UTC (permalink / raw)


On Fri, 07 Dec 2001, Simon Josefsson wrote:
> Daniel Pittman <daniel@rimspace.net> writes:
> 
>> Hey y'all. I am curious to know if there is as (easy) way to get Gnus
>> to put point on the first /unseen/ and unread article in a summary
>> buffer.
>>
>> Basically, what I want is that when I enter the group, Gnus places
>> point after the article that I have not read but have seen, by
>> default.
> 
> Can you score up "unseen" (and possibly "recent" as well) articles and
> then use ',' (`gnus-summary-best-unread-article')?

Not without losing some of the filtering I currently use to work out
what is and isn't worth reading.

I probably can, but I would rather implement a more flexible interface
to selecting the first article, I admit. :)

        Daniel

-- 
The string is a stark data structure and everywhere it is passed there
is much duplication of process. It is a perfect vehicle for hiding
information.
        -- Alan J. Perlis, _Epigrams in Programming_ (September, 1982)



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

* Re: Select first *unseen* unread message in summary buffer?
  2001-12-08  8:56   ` Daniel Pittman
@ 2001-12-29  1:32     ` Lars Magne Ingebrigtsen
  2001-12-29  1:57       ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 15+ messages in thread
From: Lars Magne Ingebrigtsen @ 2001-12-29  1:32 UTC (permalink / raw)


Daniel Pittman <daniel@rimspace.net> writes:

> I probably can, but I would rather implement a more flexible interface
> to selecting the first article, I admit. :)

`gnus-auto-select-first' is the variable that controls this, and it's
a bit of a mess.

----------
gnus-auto-select-first's value is 
gnus-summary-first-unread-subject

Documentation:
*If nil, don't select the first unread article when entering a group.
If this variable is `best', select the highest-scored unread article
in the group.  If t, select the first unread article.

This variable can also be a function to place point on a likely
subject line.  Useful values include `gnus-summary-first-unread-subject',
`gnus-summary-first-unread-article' and
`gnus-summary-best-unread-article'.

If you want to prevent automatic selection of the first unread article
in some newsgroups, set the variable to nil in
`gnus-select-group-hook'.
----------

So, it really controls two things at once.

1) It says what subject line to place point on
2) It says whether that article should be selected as well

That's nasty.

I suggest splitting this up into two variables.

1) gnus-auto-select-subject, which says what subject line point
   should be placed on
2) gnus-auto-select-article, which says whether the article should
   be selected

Better variable names should be selected, but I think I'll just go
ahead and make this change.  The variables can get their default
values from the obsolete `gnus-auto-select-first' variable, if that's
set.
   
-- 
(domestic pets only, the antidote for overdose, milk.)
   larsi@gnus.org * Lars Magne Ingebrigtsen



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

* Re: Select first *unseen* unread message in summary buffer?
  2001-12-29  1:32     ` Lars Magne Ingebrigtsen
@ 2001-12-29  1:57       ` Lars Magne Ingebrigtsen
  2002-01-14  6:17         ` Daniel Pittman
  0 siblings, 1 reply; 15+ messages in thread
From: Lars Magne Ingebrigtsen @ 2001-12-29  1:57 UTC (permalink / raw)


Lars Magne Ingebrigtsen <larsi@gnus.org> writes:

> I suggest splitting this up into two variables.
>
> 1) gnus-auto-select-subject, which says what subject line point
>    should be placed on
> 2) gnus-auto-select-article, which says whether the article should
>    be selected

I've now done this, but I kept `gnus-auto-select-first' as the name of
the latter variable to keep some easy semblance of
backwards-compatibility.  And I've added `unseen' as a value to the
former variable.

-- 
(domestic pets only, the antidote for overdose, milk.)
   larsi@gnus.org * Lars Magne Ingebrigtsen



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

* Re: Select first *unseen* unread message in summary buffer?
  2001-12-29  1:57       ` Lars Magne Ingebrigtsen
@ 2002-01-14  6:17         ` Daniel Pittman
  2002-01-19 22:34           ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 15+ messages in thread
From: Daniel Pittman @ 2002-01-14  6:17 UTC (permalink / raw)


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

On Sat, 29 Dec 2001, Lars Magne Ingebrigtsen wrote:
> Lars Magne Ingebrigtsen <larsi@gnus.org> writes:
> 
>> I suggest splitting this up into two variables.
>>
>> 1) gnus-auto-select-subject, which says what subject line point
>>    should be placed on
>> 2) gnus-auto-select-article, which says whether the article should
>>    be selected
> 
> I've now done this, but I kept `gnus-auto-select-first' as the name of
> the latter variable to keep some easy semblance of
> backwards-compatibility.  And I've added `unseen' as a value to the
> former variable.

Funky. Thank you for that.

The attached patch implements an additional option for
'gnus-auto-select-subject', 'unseen-or-unread'.

As the name suggests, this selects the first unseen article, but, if no
unseen articles exist, the first unread article.

It's probably not the cleanest way of implementing this but it works. :)

        Daniel


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 2274 bytes --]

--- working directory: /home/daniel/.xemacs/xemacs-packages/gnus/lisp/
% socksify cvs diff gnus-sum.el
Index: gnus-sum.el
===================================================================
RCS file: /usr/local/cvsroot/gnus/lisp/gnus-sum.el,v
retrieving revision 6.163
diff -u -r6.163 gnus-sum.el
--- gnus-sum.el	2002/01/12 00:10:55	6.163
+++ gnus-sum.el	2002/01/14 06:12:43
@@ -295,13 +295,16 @@
 first subject), `unread' (place point on the subject line of the first
 unread article), `best' (place point on the subject line of the
 higest-scored article), `unseen' (place point on the subject line of
-the first unseen article), or a function to be called to place point on
-some subject line.."
+the first unseen article), 'unseen-or-unread' (place point on the subject
+line of the first unseen article or, if all article have been seen, on the
+subject line of the first unread article), or a function to be called to
+place point on some subject line.."
   :group 'gnus-group-select
   :type '(choice (const best)
 		 (const unread)
 		 (const first)
-		 (const unseen)))
+		 (const unseen)
+	         (const unseen-or-unread)))
 
 (defcustom gnus-auto-select-next t
   "*If non-nil, offer to go to the next group from the end of the previous.
@@ -3326,6 +3329,8 @@
     (gnus-summary-first-unread-subject))
    ((eq gnus-auto-select-subject 'unseen)
     (gnus-summary-first-unseen-subject))
+   ((eq gnus-auto-select-subject 'unseen-or-unread)
+    (gnus-summary-first-unseen-or-unread-subject))
    ((eq gnus-auto-select-subject 'first)
     ;; Do nothing.
     )
@@ -6846,6 +6851,19 @@
       (when (gnus-summary-first-subject t t t)
 	(gnus-summary-show-thread)
 	(gnus-summary-first-subject t t t))
+    (gnus-summary-position-point)))
+
+(defun gnus-summary-first-unseen-or-unread-subject ()
+  "Place the point on the subject line of the first unseen article.
+Return nil if there are no unseen articles."
+  (interactive)
+  (prog1
+      (unless (when (gnus-summary-first-subject t t t)
+		(gnus-summary-show-thread)
+		(gnus-summary-first-subject t t t))
+	(when (gnus-summary-first-subject t)
+	  (gnus-summary-show-thread)
+	  (gnus-summary-first-subject t)))
     (gnus-summary-position-point)))
 
 (defun gnus-summary-first-article ()

Exit 1 17:11:40

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


-- 
If a voice inside tells you that you are not a painter, then by all means
paint! And that voice will be silenced...
        -- Vincent Van Gogh

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

* Re: Select first *unseen* unread message in summary buffer?
  2002-01-14  6:17         ` Daniel Pittman
@ 2002-01-19 22:34           ` Lars Magne Ingebrigtsen
  0 siblings, 0 replies; 15+ messages in thread
From: Lars Magne Ingebrigtsen @ 2002-01-19 22:34 UTC (permalink / raw)


Daniel Pittman <daniel@rimspace.net> writes:

> The attached patch implements an additional option for
> 'gnus-auto-select-subject', 'unseen-or-unread'.

Thanks for the patch; I've applied it to Oort Gnus v0.05 (i. e., CVS).

-- 
(domestic pets only, the antidote for overdose, milk.)
   larsi@gnus.org * Lars Magne Ingebrigtsen



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

end of thread, other threads:[~2002-01-19 22:34 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-12-05  5:39 Select first *unseen* unread message in summary buffer? Daniel Pittman
2001-12-05  5:56 ` Matt Armstrong
2001-12-05  9:11   ` Colin Marquardt
2001-12-05  9:20   ` Daniel Pittman
2001-12-05 10:37     ` Martin Monsorno
2001-12-05 11:33       ` Daniel Pittman
2001-12-05 16:51       ` Matt Armstrong
2001-12-05  8:57 ` Kai Großjohann
2001-12-05  9:22   ` Daniel Pittman
2001-12-07 14:29 ` Simon Josefsson
2001-12-08  8:56   ` Daniel Pittman
2001-12-29  1:32     ` Lars Magne Ingebrigtsen
2001-12-29  1:57       ` Lars Magne Ingebrigtsen
2002-01-14  6:17         ` Daniel Pittman
2002-01-19 22:34           ` Lars Magne Ingebrigtsen

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