Re: 'N' indicator in folder list

2002-02-04 Thread Mike Schiraldi

 % However, one thing I have noticed is that when I am viewing my list of
 % mailboxes ('c' then 'tab'), there are no 'N' indicators next to mailboxes
 % which contain unread mail.
 
 Don't define new as 'contains unread mail', but instead as 'has been
 read from since it was last written to' and see if your display makes
 sense.

Is there a solution for those of us who -do- want to define new as
contains unread mail? I generally do not care whether a folder has been
read from since it was last written to. What i'm interested in is which
folders still have messages in them that i haven't yet read.

Perhaps another %-escape should be added to folder_format for this purpose.



msg24170/pgp0.pgp
Description: PGP signature


Re: 'N' indicator in folder list

2002-02-04 Thread David T-G

Mike, et al --

...and then Mike Schiraldi said...
% 
%  Don't define new as 'contains unread mail', but instead as 'has been
%  read from since it was last written to' and see if your display makes
%  sense.
% 
% Is there a solution for those of us who -do- want to define new as
% contains unread mail? I generally do not care whether a folder has been

Not yet.



% read from since it was last written to. What i'm interested in is which
% folders still have messages in them that i haven't yet read.

How could you tell that, though?  So far the only way is to open each
folder (whatever format) and read the whole thing to look for message
status headers.  That could take quite a long time on some of the folders
I have, and I've found out that mine are *small* compared to those of
others out there!



% 
% Perhaps another %-escape should be added to folder_format for this purpose.

The last suggestion that came up was for someone to write a feature patch
that implemented a $look_inside_folders_and_count_new_messages variable
of some sort, so that those of us who don't want to spend the time
reading the mailboxes don't have to.  I believe, however, that ME is
working on a caching patch which might also include a count of messages
and their stati.


:-D
-- 
David T-G  * It's easier to fight for one's principles
(play) [EMAIL PROTECTED] * than to live up to them. -- fortune cookie
(work) [EMAIL PROTECTED]
http://www.justpickone.org/davidtg/Shpx gur Pbzzhavpngvbaf Qrprapl Npg!




msg24174/pgp0.pgp
Description: PGP signature


Re: 'N' indicator in folder list

2002-02-04 Thread Mike Schiraldi

 How could you tell that, though?

When i call change-folder, the default is always the next folder which
contains unread messages. I haven't had a chance to look into how it does
it, but i'd imagine it would be really easy to use this preexisting
functionality to look at all mailboxes.




msg24180/pgp0.pgp
Description: PGP signature


Re: 'N' indicator in folder list

2002-02-04 Thread Rob 'Feztaa' Park


--UfEAyuTBtIjiZzX6
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Alas! Mike Schiraldi spake thus:
 Is there a solution for those of us who -do- want to define new as
 contains unread mail? I generally do not care whether a folder has been
 read from since it was last written to. What i'm interested in is which
 folders still have messages in them that i haven't yet read.

As david mentioned, some people are working on hacks and patches to do
this.

In the mean time, I use the mbox's filesize to tell me when there are
unread messages.

What I mean is, I use mbox-hooks to move all my read mail into a
seperate folder. Thus, any mbox with a nonzero size contains unread
mail.

HTH! ;)

--=20
Rob 'Feztaa' Park
[EMAIL PROTECTED]
--
And 1.1.81 is officially BugFree(tm), so if you receive any
bug-reports on it, you know they are just evil lies.
-- Linus Torvalds

--UfEAyuTBtIjiZzX6
Content-Type: application/pgp-signature
Content-Disposition: inline

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE8XtOJPTh2iSBKeccRAmIdAJ9DeCZcJVphQtv3bd8sWzEbBTUo1gCeNNYQ
xi8S2GwC0ehYtbteFnhjqQ8=
=UA3e
-END PGP SIGNATURE-

--UfEAyuTBtIjiZzX6--



Re: 'N' indicator in folder list

2002-02-04 Thread David T-G

Mike --

...and then Mike Schiraldi said...
% 
%  How could you tell that, though?

[that being whether or not there are actually 'N'-flagged messages in a
folder...]


% 
% When i call change-folder, the default is always the next folder which
% contains unread messages. I haven't had a chance to look into how it does

Ah -- but mutt isn't picking it because of that; it's picking it because
the mtime is later than the atime.


% it, but i'd imagine it would be really easy to use this preexisting
% functionality to look at all mailboxes.

It already does :-)


:-D
-- 
David T-G  * It's easier to fight for one's principles
(play) [EMAIL PROTECTED] * than to live up to them. -- fortune cookie
(work) [EMAIL PROTECTED]
http://www.justpickone.org/davidtg/Shpx gur Pbzzhavpngvbaf Qrprapl Npg!




msg24190/pgp0.pgp
Description: PGP signature


Re: 'N' indicator in folder list

2002-02-04 Thread Mike Schiraldi

 % it, but i'd imagine it would be really easy to use this preexisting
 % functionality to look at all mailboxes.
 
 It already does :-)

I guess we're talking about different things here. I'll try to be more
specific:

I come into work in the morning and go into my =mutt folder. There are, say,
50 unread messages that have arrived since yesterday. I don't feel like
reading them now, so i go to the next mailbox. In some mailboxes, i read the
unread messages. In other mailboxes i leave them for later.

Now i want to go back and read the unread messages that i skipped. I can
press the change-folder key and go to whatever mailbox is the
default. This is great, because the default is always takes me to the next
mailbox containing unread messages. If no mailboxes contain unread messages,
there is no default.

However, sometimes i want to see a list of all mailboxes containing unread
messages. But the folder list's %N escape does not show this. It shows which
folders have had new mail placed in them since the last time i visited
them. I'd like to add an escape sequence that marks any folders that contain
unread mail. 

You're saying that processing such an escape sequence would require a lot of
new code in mutt and take a lot of time, because looking for unread messages
is slow and hard. But i find that strange because mutt already has a way of
identifying folders with unread messages, and it uses it to pick a default
for the change-folders command.

I use maildir -- perhaps that is why your results differ from mine?



msg24193/pgp0.pgp
Description: PGP signature


Re: 'N' indicator in folder list

2002-02-04 Thread Nicolas Rachinsky

* On Mon, Feb 04, 2002 at 04:18:05PM -0500,
* Mike Schiraldi [EMAIL PROTECTED] wrote:
 I guess we're talking about different things here. I'll try to be more
 specific:
 
 I come into work in the morning and go into my =mutt folder. There are, say,
 50 unread messages that have arrived since yesterday. I don't feel like
 reading them now, so i go to the next mailbox. In some mailboxes, i read the
 unread messages. In other mailboxes i leave them for later.
 
 Now i want to go back and read the unread messages that i skipped. I can
 press the change-folder key and go to whatever mailbox is the
 default. This is great, because the default is always takes me to the next
 mailbox containing unread messages. If no mailboxes contain unread messages,
 there is no default.
 
 However, sometimes i want to see a list of all mailboxes containing unread
 messages. But the folder list's %N escape does not show this. It shows which
 folders have had new mail placed in them since the last time i visited
 them. I'd like to add an escape sequence that marks any folders that contain
 unread mail. 
 
 You're saying that processing such an escape sequence would require a lot of
 new code in mutt and take a lot of time, because looking for unread messages
 is slow and hard. But i find that strange because mutt already has a way of
 identifying folders with unread messages, and it uses it to pick a default
 for the change-folders command.
 
 I use maildir -- perhaps that is why your results differ from mine?

Look for mark_old in the manual.
Perhaps unsetting mark_old and something like the old2new.pl script
from my homepage are what you want.

Nicolas




Re: 'N' indicator in folder list

2002-02-04 Thread Will Yardley

Nicolas Rachinsky wrote:
 * Mike Schiraldi [EMAIL PROTECTED] wrote:

  However, sometimes i want to see a list of all mailboxes containing
  unread messages. But the folder list's %N escape does not show this.
  It shows which folders have had new mail placed in them since the
  last time i visited them. I'd like to add an escape sequence that
  marks any folders that contain unread mail. 
 
 Look for mark_old in the manual.  Perhaps unsetting mark_old and
 something like the old2new.pl script from my homepage are what you
 want.

no.. you're not reading the question.

the point is that with Maildir, mutt DOES recognize mailboxes that still
have new mail in them (ie if you hit change-folder, mutt will go to a
Maildir that still has new mail in it.

however in the file browser, mailboxes with new mail in them don't have
an N next to them.

w




Re: 'N' indicator in folder list

2002-02-04 Thread Mike Schiraldi

 Look for mark_old in the manual.

I already unset mark_old .. so none of my messages are ever marked
O. They're marked N until i read them. 

I should probably wade into the buffy code before this thread gets any
longer.



msg24196/pgp0.pgp
Description: PGP signature


Re: 'N' indicator in folder list

2002-02-04 Thread Mike Schiraldi

 however in the file browser, mailboxes with new mail in them don't have
 an N next to them.

Okay, it looks like the problem is as follows:

Using maildir (i have no experience with other folder types), when the
folder_format string contains %N, every folder that contains unread mail
will be marked with N, __unless it is the currently selected folder__.

This is because the buffy struct for the current folder has its new flag
set to 0 even if it would be 1 were it not the current folder.

Is there a reason for this?

(Replies to mutt-dev only, please)


-- 
Mike Schiraldi
VeriSign Applied Research



msg24197/pgp0.pgp
Description: PGP signature


Re: 'N' indicator in folder list

2002-02-04 Thread David T-G

Mike, et al --

...and then Mike Schiraldi said...
% 
%  % it, but i'd imagine it would be really easy to use this preexisting
%  % functionality to look at all mailboxes.
%  
%  It already does :-)
% 
% I guess we're talking about different things here. I'll try to be more
% specific:
--8--
...
--8--
% 
% You're saying that processing such an escape sequence would require a lot of
% new code in mutt and take a lot of time, because looking for unread messages

Right.  That's been the argument before.  The general way (remember that
we don't want to have to write any folderformat-specific code high up but
instead use a generic function call interface) to check for new (unread,
not-old) mail is to open the folder and look at every message.


% is slow and hard. But i find that strange because mutt already has a way of
% identifying folders with unread messages, and it uses it to pick a default
% for the change-folders command.
% 
% I use maildir -- perhaps that is why your results differ from mine?

I read your explanation before pruning it away, and I *would* say in every
case that mutt is behaving as expected and showing 'N' for folders whose
mtime has been updated since you were in them in your morning overview --
and that the method that it uses to pick a default for change-folder
is the same, not different, and not dependent on actual new mail.

However, in light of your followup elsewhere in this thread, I'd have to
agree that Maildir is somehow a different beast.  Good luck :-)

So tell me a bit about Maildir...  When new mail arrives, it is written
to tmp/ and then atomically moved to new/, right?  Does it stay in new/
until you read it and it moves to cur/?  If that's the usual behavior,
when you e'x'it or otherwise don't sync your changes (like changing from
'n'ew to read) do they stay in new/ instead of moving?  I had thought
that all mail gets moved to cur/ as a final part of the delivery and that
the MUA was not expected to find things in new/ ...


HAND!

:-D
-- 
David T-G  * It's easier to fight for one's principles
(play) [EMAIL PROTECTED] * than to live up to them. -- fortune cookie
(work) [EMAIL PROTECTED]
http://www.justpickone.org/davidtg/Shpx gur Pbzzhavpngvbaf Qrprapl Npg!




msg24201/pgp0.pgp
Description: PGP signature


Re: 'N' indicator in folder list

2002-02-04 Thread Jeremy Blosser

On Feb 04, David T-G [[EMAIL PROTECTED]] wrote:
 So tell me a bit about Maildir...  When new mail arrives, it is written
 to tmp/ and then atomically moved to new/, right?  Does it stay in new/
 until you read it and it moves to cur/?  If that's the usual behavior,

Yes.

 when you e'x'it or otherwise don't sync your changes (like changing from
 'n'ew to read) do they stay in new/ instead of moving?  I had thought

Yes.  And Mutt will move them back to new/ if you toggle the N flag to true
again and sync.

 that all mail gets moved to cur/ as a final part of the delivery and that
 the MUA was not expected to find things in new/ ...

No... the MTA is responsible for getting it to new/.  The MUA is
responsible for it after that.

From the maildir(5) man page:

HOW A MESSAGE IS DELIVERED
...
   Files in cur are just like files in new.  The big  differ­
   ence  is  that  files  in cur are no longer new mail: they
   have been seen by the user's mail-reading program.
...
HOW A MESSAGE IS READ
   A mail reader operates as follows.

   It  looks through the new directory for new messages.  Say
   there is a new message, new/unique.  The reader may freely
   display  the contents of new/unique, delete new/unique, or
   rename new/unique as cur/unique:info.  See
   http://pobox.com/~djb/proto/maildir.html  for  the meaning
   of info.

   The reader is also expected to look through the tmp direc­
   tory and to clean up any old files found there.  A file in
   tmp may be safely removed if it has not been  accessed  in
   36 hours.

   It is a good idea for readers to skip all filenames in new
   and cur starting with a dot.   Other  than  this,  readers
   should not attempt to parse filenames.



msg24205/pgp0.pgp
Description: PGP signature


Re: 'N' indicator in folder list

2002-02-04 Thread David T-G

Jeremy, et al --

...and then Jeremy Blosser said...
% 
% On Feb 04, David T-G [[EMAIL PROTECTED]] wrote:
%  So tell me a bit about Maildir...  When new mail arrives, it is written
%  to tmp/ and then atomically moved to new/, right?  Does it stay in new/
%  until you read it and it moves to cur/?  If that's the usual behavior,
% 
% Yes.

Aha.  Gotcha.


% 
%  when you e'x'it or otherwise don't sync your changes (like changing from
%  'n'ew to read) do they stay in new/ instead of moving?  I had thought
% 
% Yes.  And Mutt will move them back to new/ if you toggle the N flag to true
% again and sync.

So, for Maildir, there is a quick way to see if there are any new
messages in the folder.  Good enough.

Now for someone who wants to write up a patch to take advantage of
this :-)


% 
%  that all mail gets moved to cur/ as a final part of the delivery and that
%  the MUA was not expected to find things in new/ ...
% 
% No... the MTA is responsible for getting it to new/.  The MUA is
% responsible for it after that.
% 
% From the maildir(5) man page:

[snip]

Thanks for the details!


HAND

:-D
-- 
David T-G  * It's easier to fight for one's principles
(play) [EMAIL PROTECTED] * than to live up to them. -- fortune cookie
(work) [EMAIL PROTECTED]
http://www.justpickone.org/davidtg/Shpx gur Pbzzhavpngvbaf Qrprapl Npg!




msg24208/pgp0.pgp
Description: PGP signature


'N' indicator in folder list

2002-01-28 Thread Peter R. Wood - Lists

Greetings,

I'm trying out mutt v. 1.3.27i and am finding it to be quite nice so far.
However, one thing I have noticed is that when I am viewing my list of
mailboxes ('c' then 'tab'), there are no 'N' indicators next to mailboxes
which contain unread mail. Is this a feature that I need to toggle on in this
version? Or has this ability been eliminated?

Thanks,

Peter



Re: 'N' indicator in folder list

2002-01-28 Thread David T-G

Peter --

...and then Peter R. Wood - Lists said...
% 
% Greetings,

Hello!


% 
% I'm trying out mutt v. 1.3.27i and am finding it to be quite nice so far.

Good to hear.


% However, one thing I have noticed is that when I am viewing my list of
% mailboxes ('c' then 'tab'), there are no 'N' indicators next to mailboxes
% which contain unread mail. Is this a feature that I need to toggle on in this

Don't define new as 'contains unread mail', but instead as 'has been
read from since it was last written to' and see if your display makes
sense.  In particular, even if you think you haven't been in those
folders, make sure nothing else (biff, your shell, etcetc) has checked
'em for mail).


% version? Or has this ability been eliminated?

Oh, no.


% 
% Thanks,

HTH  HAND


% 
% Peter


:-D
-- 
David T-G  * It's easier to fight for one's principles
(play) [EMAIL PROTECTED] * than to live up to them. -- fortune cookie
(work) [EMAIL PROTECTED]
http://www.justpickone.org/davidtg/Shpx gur Pbzzhavpngvbaf Qrprapl Npg!




msg23926/pgp0.pgp
Description: PGP signature


Re: 'N' indicator in folder list

2002-01-28 Thread alpha

On Mon, Jan 28, 2002 at 02:36:31PM -0500, Peter R. Wood - Lists wrote:
 However, one thing I have noticed is that when I am viewing my list of
 mailboxes ('c' then 'tab'), there are no 'N' indicators next to mailboxes

I'm not sure, I use version .25, but maybe the default $folder_format
has changed? You should check it in your muttrc. Mine looks like:

set folder_format=%N %8sb - %d %f

where %N stands for new mail indicator ('N')

HTH

-- 

   _.|._ |_  _.  |  Adam Byrtek, [EMAIL PROTECTED]
  (_|||_)| |(_|  |  gg 1802819
  |