Re: Jump to next mailbox with unread mail

2012-12-22 Thread Nikola Petrov
On Fri, Dec 21, 2012 at 05:34:13PM -0500, Patrick Shanahan wrote:
> * Nikola Petrov  [12-21-12 16:24]:
> > On Fri, Dec 21, 2012 at 03:45:06PM +, Chris Green wrote:
>  [...]
> > > Yes (not the OP here though), however it has always seemed odd to me
> > > that I can't get mutt to take me to all/any mailboxes which have
> > > *unread* mail in them.  I.e. I want 'c' to take me to the next mailbox
> > > with unread mail in it, *not* to the next mailbox with new mail in it.
> > > 
> > 
> > You can check the option 
> > 
> > mark_old
> > 
> > which when set to 'no' will always leave "seen" but not read messages as
> > old.
> 
> No, it leaves them marked "N", when set to "no".
> 
> 

Yep, my bad, that's why I meant actually. Then you can go to the next
unread message as the OP wanted.

-- 
Nikola


Re: Jump to next mailbox with unread mail

2012-12-22 Thread Chris Green
On Sat, Dec 22, 2012 at 07:03:23AM +1300, Chris Bannister wrote:
> On Fri, Dec 21, 2012 at 03:45:06PM +, Chris Green wrote:
> > Yes (not the OP here though), however it has always seemed odd to me
> > that I can't get mutt to take me to all/any mailboxes which have
> > *unread* mail in them.  I.e. I want 'c' to take me to the next mailbox
> > with unread mail in it, *not* to the next mailbox with new mail in it.
> 
> Good point. I agree. Not necessarily 'c' though.
> 
No it wouldn't need to be 'c' of course, I just wanted to make plain
what I meant.


> Weird, the documentation has (under pattern matching)
> 
> ~N New messages
> ~O Old messages
> ~U Unread messages
> 
> Just wondering, what is an Unread message if its not New or Old, unless
> its New AND Old together?
> 
> Just a quick grep through the docs reveals:
> 
> When changing folders, Mutt fills the prompt with the first folder from
> the mailboxes list containing new mail (if any), pressing  will cycle
> through folders with new mail. The (by default unbound) function
>  in the index can be used to immediately open the
> next folder with unread mail (if any).
> 
> Could you try that, and see what happens?
> 
I will, I have been playing with this quite a lot recently.  Currently
I have:-

set mail_check_recent=no
set mark_old=no

and 'c' doesn't seem to find N[ew] or [O]ld mail - so what *does* it do
that's remotely useful?  I'll try assigning a key to next-unread-mailbox
and see what that does for me.

-- 
Chris Green


Re: Jump to next mailbox with unread mail

2012-12-22 Thread Chris Green
On Sat, Dec 22, 2012 at 01:31:02PM +, Chris Green wrote:
> On Sat, Dec 22, 2012 at 07:03:23AM +1300, Chris Bannister wrote:
> > On Fri, Dec 21, 2012 at 03:45:06PM +, Chris Green wrote:
> > 
> > Just a quick grep through the docs reveals:
> > 
> > When changing folders, Mutt fills the prompt with the first folder from
> > the mailboxes list containing new mail (if any), pressing  will cycle
> > through folders with new mail. The (by default unbound) function
> >  in the index can be used to immediately open the
> > next folder with unread mail (if any).
> > 
> > Could you try that, and see what happens?
> > 
> I will, I have been playing with this quite a lot recently.  Currently
> I have:-
> 
> set mail_check_recent=no
> set mark_old=no
> 
> and 'c' doesn't seem to find N[ew] or [O]ld mail - so what *does* it do
> that's remotely useful?  I'll try assigning a key to next-unread-mailbox
> and see what that does for me.
> 
It does what I want (and have always wanted).

I have added:-
bindindex   n next-unread-mailbox

... and now I can find new mail in all my (mbox) mailboxes without any
stupid requirements for setting access times or whatever to the files.
I always thought it should be simple and it is!

Why isn't this the default set-up for mutt?

It is somewhat slower than 'c' but not really significantly so where
all my mail is in local mbox files.

-- 
Chris Green


Re: Jump to next mailbox with unread mail

2012-12-22 Thread Brandon Sandrowicz
On Fri, Dec 21, 2012 at 03:45:06PM +, Chris Green wrote:
> On Fri, Dec 21, 2012 at 11:28:09PM +1300, Chris Bannister wrote:
> > On Fri, Dec 21, 2012 at 02:01:47AM +0100, Marco wrote:
> > > On 2012–12–20 Patrick Shanahan wrote:
> > > 
> > > > You access the mail box and leave, then expect mutt to still show
> > > > new mail.
> > > 
> > > Yes, I do. If there is a new unread message in the mail box and I
> > > enter and leave it is still contains an unread message that resides
> > > in the .mailbox/new directory. I'm sorry that I still don't get it.
> > 
> > New mail is flagged with an N, old unread mail is flagged with an O, new
> > mail is mail that has appeared in the "mailbox" *since* it was last
> > opened/visited.
> > 
> > If you leave/close a "mailbox" where there is mail flagged with an N,
> > the flag will change to an O, this allows the distinction between New
> > unread mail, and old unread mail.
> > 
> > Is that any clearer?
> > 
> Yes (not the OP here though), however it has always seemed odd to me
> that I can't get mutt to take me to all/any mailboxes which have
> *unread* mail in them.  I.e. I want 'c' to take me to the next mailbox
> with unread mail in it, *not* to the next mailbox with new mail in it.
> 
> -- 
> Chris Green

Can't you just toggle mark_old then? Or am I missing something?

3.122. mark_old

Type: boolean
Default: yes

Controls whether or not mutt marks new unread messages as old if you
exit a mailbox without reading them. With this option set, the next
time you start mutt, the messages will show up with an “O” next to
them in the index menu, indicating that they are old.

There's also this:

3.117. mail_check_recent

Type: boolean
Default: yes

When set, Mutt will only notify you about new mail that has been
received since the last time you opened the mailbox. When unset,
Mutt will notify you if any new mail exists in the mailbox,
regardless of whether you have visited it recently.

When $mark_old is set, Mutt does not consider the mailbox to contain
new mail if only old messages exist.
-- 
Brandon Sandrowicz
:
: web   => http://brandon.sandrowicz.org
: email => bran...@sandrowicz.org
: phone => +1 647 960 3722


Re: Jump to next mailbox with unread mail

2012-12-22 Thread Chris Bannister
On Sat, Dec 22, 2012 at 01:47:24PM +, Chris Green wrote:
> 
> I have added:-
> bindindex   n next-unread-mailbox
> 
> ... and now I can find new mail in all my (mbox) mailboxes without any
> stupid requirements for setting access times or whatever to the files.
> I always thought it should be simple and it is!

Thanks for the heads up, it is handy to know.

> Why isn't this the default set-up for mutt?

Don't know. It could be the way people handle mail, e.g. Do you leave
all your snail mail in your letter box and just read the interesting
letters or do you bring in all your mail at once and deal with it in one
sitting, or do you ...

Can you see where I'm coming from?  mutt tends to be very conservative
with its defaults and has settings which seem most natural to the
majority of users, after all, it is fairly useless without some
customisation.

> It is somewhat slower than 'c' but not really significantly so where
> all my mail is in local mbox files.

If it is slower, then that might be a good reason why it is not the
default. In all honestly though, I think people may complain if it was
made the default, simply because the majority of people are only
interested in reading new mail. They are probably aware they have old
unread mail lying around but don't want to be consistently reminded all
the time. 

-- 
"If you're not careful, the newspapers will have you hating the people
who are being oppressed, and loving the people who are doing the 
oppressing." --- Malcolm X


Re: Jump to next mailbox with unread mail

2012-12-22 Thread Patrick Shanahan
* Chris Bannister  [12-22-12 09:58]:
> On Sat, Dec 22, 2012 at 01:47:24PM +, Chris Green wrote:
> > 
> > I have added:-
> > bindindex   n next-unread-mailbox
> > 
> > ... and now I can find new mail in all my (mbox) mailboxes without any
> > stupid requirements for setting access times or whatever to the files.
> > I always thought it should be simple and it is!

 [...]
 
> > It is somewhat slower than 'c' but not really significantly so where
> > all my mail is in local mbox files.
> 
> If it is slower, then that might be a good reason why it is not the
> default. In all honestly though, I think people may complain if it was
> made the default, simply because the majority of people are only
> interested in reading new mail. They are probably aware they have old
> unread mail lying around but don't want to be consistently reminded all
> the time. 

And, "n" is *normally*:
Table 2.7. Most common pager keys
   Key Description
   go down one line
   display the next page (or next message if at the end
 of a message)
  - go back to the previous page
/--   n search for next match
  S skip beyond quoted text
 

-- 
(paka)Patrick Shanahan   Plainfield, Indiana, USA  HOG # US1244711
http://wahoo.no-ip.orgPhoto Album: http://wahoo.no-ip.org/gallery2
http://en.opensuse.org   openSUSE Community Member
Registered Linux User #207535@ http://linuxcounter.net


Re: Sidebar not updated when in pager

2012-12-22 Thread Brandon Sandrowicz
On Fri, Dec 21, 2012 at 10:46:37PM +0100, Marco wrote:
> Hi,
> 
> I'm not sure if this is the right list for patched versions of mutt.
> I use the Debian version mutt-patched which includes the sidebar,
> which is what my question is about.
> 
> Whenever I display a message in the pager, the sidebar does not
> update any longer. With updating I mean to show new mails. When I
> hit “q” to quit the pager the sidebar is instantly updated and the
> number of new mails appears next to the corresponding folders.
> 
> Is there a way to configure the sidebar to update regardless of the
> pager showing a mail or not?
> 
> Marco

Took a look into the sidebar patch, and it redraws itself while in the
pager, but it seems to rely on Mutt's current functionality with respect
to updating mailbox info (buffy lists). So, if Mutt hasn't updated that
info, then the redraw doesn't change anything. I didn't bother to trace
all of the places that Mutt decides to update the buffy lists from
though. You might try pager_index_lines and see if Mutt decides to keep
up-to-date when your pager is displaying the partial index.
-- 
Brandon Sandrowicz


Re: Jump to next mailbox with unread mail

2012-12-22 Thread Chris Green
On Sun, Dec 23, 2012 at 03:41:58AM +1300, Chris Bannister wrote:
> On Sat, Dec 22, 2012 at 01:47:24PM +, Chris Green wrote:
> > 
> > I have added:-
> > bindindex   n next-unread-mailbox
> > 
> > ... and now I can find new mail in all my (mbox) mailboxes without any
> > stupid requirements for setting access times or whatever to the files.
> > I always thought it should be simple and it is!
> 
> Thanks for the heads up, it is handy to know.
> 
> > Why isn't this the default set-up for mutt?
> 
> Don't know. It could be the way people handle mail, e.g. Do you leave
> all your snail mail in your letter box and just read the interesting
> letters or do you bring in all your mail at once and deal with it in one
> sitting, or do you ...
> 
Either way, unless I get a particular sort of letterbox with a
particularly helpful postman, I never get to *know* if there's any new
mail with the equivalent of 'c' (the default) whereas I will always find
new mail with 'n', even though I'll occasionally find old circulars I
should have thrown away.

> If it is slower, then that might be a good reason why it is not the
> default. In all honestly though, I think people may complain if it was
> made the default, simply because the majority of people are only
> interested in reading new mail. They are probably aware they have old
> unread mail lying around but don't want to be consistently reminded all
> the time. 
> 
*I'm* interested in reading new mail, 'c' doesn't find it all except
with certain types of mailboxes and/or certain other specific settings.

-- 
Chris Green


Re: Jump to next mailbox with unread mail

2012-12-22 Thread Chris Green
On Sat, Dec 22, 2012 at 10:08:25AM -0500, Patrick Shanahan wrote:
> * Chris Bannister  [12-22-12 09:58]:
> > On Sat, Dec 22, 2012 at 01:47:24PM +, Chris Green wrote:
> > > 
> > > I have added:-
> > > bindindex   n next-unread-mailbox
> > > 
> > > ... and now I can find new mail in all my (mbox) mailboxes without any
> > > stupid requirements for setting access times or whatever to the files.
> > > I always thought it should be simple and it is!
> 
>  [...]
>  
> > > It is somewhat slower than 'c' but not really significantly so where
> > > all my mail is in local mbox files.
> > 
> > If it is slower, then that might be a good reason why it is not the
> > default. In all honestly though, I think people may complain if it was
> > made the default, simply because the majority of people are only
> > interested in reading new mail. They are probably aware they have old
> > unread mail lying around but don't want to be consistently reminded all
> > the time. 
> 
> And, "n" is *normally*:
> Table 2.7. Most common pager keys
>Key Description
>go down one line
>display the next page (or next message if at the end
>  of a message)
>   - go back to the previous page
> /--   n search for next match
>   S skip beyond quoted text
>  
Yes, I know I have hijacked 'n', I might change it but that doesn't
affect the argument about whether using next-unread-mailbox is better
than change-folder for seeing new mail.

-- 
Chris Green


Re: Jump to next mailbox with unread mail

2012-12-22 Thread Patrick Shanahan
* Chris Green  [12-22-12 12:14]:
> Yes, I know I have hijacked 'n', I might change it but that doesn't
> affect the argument about whether using next-unread-mailbox is better
> than change-folder for seeing new mail.

It is apparently not in *your* use case, but I have been using mutt since
~1998 and do *not* have a problem finding new mail.  Perhaps you should
re-examine your usage/habits, instead of branding the evolved default
settings of mutt as illogical and unusable and instead try to determine
*why* they are the way that they are.

-- 
(paka)Patrick Shanahan   Plainfield, Indiana, USA  HOG # US1244711
http://wahoo.no-ip.orgPhoto Album: http://wahoo.no-ip.org/gallery2
http://en.opensuse.org   openSUSE Community Member
Registered Linux User #207535@ http://linuxcounter.net


New mails not updated in index view when pager open

2012-12-22 Thread Marco
On 2012–12–22 Brandon Sandrowicz wrote:

> Took a look into the sidebar patch, and it redraws itself while in the
> pager, but it seems to rely on Mutt's current functionality with respect
> to updating mailbox info (buffy lists). So, if Mutt hasn't updated that
> info, then the redraw doesn't change anything. I didn't bother to trace
> all of the places that Mutt decides to update the buffy lists from
> though. You might try pager_index_lines and see if Mutt decides to keep
> up-to-date when your pager is displaying the partial index.

Thanks for the tip. I just checked and the index (visible when
pager_index_lines is set) does not show new mail either. I may
assume that this behaviour is unrelated to the sidebar patch and
vanilla Mutt behaves the same. When I exit the pager, new mail shows
up instantly (in the pager and the sidebar). So this seems like a
bug in Mutt itself (I can't see any use-case that might benefit from
this). Or maybe it is just a configuration issue.

Marco


signature.asc
Description: Digital signature


Mutt+Abook: questions about addresses and multiple addressees

2012-12-22 Thread leo
Hi mutters,
I have started using mutt few days ago. 
I have two small problems with the relationship between mutt and abook.

::First question::
When I write an e-mail and I choose the addressee, abook automatically always 
insert into the field To (or Cc or Bcc) the name and the e-mail address 
(example: name surname . I would like that in the field 
To (or Cc or Bcc) appears only the e-mail address without name and surname.
Is it possible?
In my muttrc I recall abook with this command:

set query_command= "abook --mutt-query '%s'"


::Second question::
I'm not able to select more than one addressee in a single field (To or Cc or 
Bcc). Are there any key bindings or something like this to do that?

Thanks a lot,
cheers
leo

-- 
GPG key ID: 972734BB
web: http://leo.noblogs.org 


signature.asc
Description: Digital signature


Re: Jump to next mailbox with unread mail

2012-12-22 Thread Andre Klärner
Hi Patrick,

On Sat, Dec 22, 2012 at 12:45:59PM -0500, Patrick Shanahan wrote:
> * Chris Green  [12-22-12 12:14]:
> > Yes, I know I have hijacked 'n', I might change it but that doesn't
> > affect the argument about whether using next-unread-mailbox is better
> > than change-folder for seeing new mail.
> 
> It is apparently not in *your* use case, but I have been using mutt since
> ~1998 and do *not* have a problem finding new mail.  Perhaps you should
> re-examine your usage/habits, instead of branding the evolved default
> settings of mutt as illogical and unusable and instead try to determine
> *why* they are the way that they are.

if you do know where this exactly comes from please tell me. I am still no
getting why it is behaving the way it is - from my point of view I think
the browser-view should be usable with the limit functionality.

Can you tell me what way to find new mail you use? I resorted to having
three calls for the mailboxes-command, one with all mailboxes, one with
"only mailboxes with unread mail" and one with IMAP only (some misc
accounts, not my main one)..

Thanks and kind regards,

Andre

-- 
Andre Klärner


smime.p7s
Description: S/MIME cryptographic signature


Re: Mutt+Abook: questions about addresses and multiple addressees

2012-12-22 Thread Andre Klärner
Hi Leo,

On Sat, Dec 22, 2012 at 07:09:25PM +0100, leo wrote:
> ::First question::
> When I write an e-mail and I choose the addressee, abook automatically
> always insert into the field To (or Cc or Bcc) the name and the e-mail
> address (example: name surname . I would like
> that in the field To (or Cc or Bcc) appears only the e-mail address
> without name and surname.
> Is it possible?

Well, from the manpage of abook I guess that is not possible. But from my
perspective it is the right way to do it as it is. I think of it as a
properly written address is better than just the technical declaration of
the receipient (like on an official invitation the sometimes handwritten
address on the envelope), but this is just me.

I guess you can do this my modifying abook's source itself and maybe
adding a new option for this. Maybe publish the patch back.

> ::Second question::
> I'm not able to select more than one addressee in a single field (To or
> Cc or Bcc). Are there any key bindings or something like this to do that?

I usually seperate them by a simple comma. But I can't say how it works
when you work with abook. I for myself use just plain mutt aliases and
they get expanded properly if I name multiple aliases with comma seperation.

Regards,
Andre

-- 
Andre Klärner


smime.p7s
Description: S/MIME cryptographic signature


Re: Mutt+Abook: questions about addresses and multiple addressees

2012-12-22 Thread Christoph Möbius
> ::Second question:: I'm not able to select more than one addressee in a single
> field (To or Cc or Bcc). Are there any key bindings or something like this to
> do that?

in muttrc I have
set query_command = "abook --mutt-query '%s'"

typing Q in the index lets you query names and addresses
( C-a lets you add more queries to previous ones )

you can select several entries by pressing t (tagging) and then
;m

This adds all tagged adresses to the To: field:


-- 
Dipl.-Inf. Christoph Möbius
wissenschaftlicher Mitarbeiter

Technische Universität Dresden
Fakultät Informatik
Professur Rechnernetze
01062 Dresden
Tel.: +49 (351) 463-38002
E-Mail: christoph.moeb...@tu-dresden.de

GPG-Key ID: 0x42828A3B
GPG Fingerprint:
D0E2 CBDF E5F4 CA57 AA0F  D8FD 3199 B501 4282 8A3B


Re: Jump to next mailbox with unread mail

2012-12-22 Thread Patrick Shanahan
* Andre Klärner  [12-22-12 14:12]:
 [...] 
> if you do know where this exactly comes from please tell me. I am still no
> getting why it is behaving the way it is - from my point of view I think
> the browser-view should be usable with the limit functionality.
> 
> Can you tell me what way to find new mail you use? I resorted to having
> three calls for the mailboxes-command, one with all mailboxes, one with
> "only mailboxes with unread mail" and one with IMAP only (some misc
> accounts, not my main one)..

I have a persistant screen of mutt in a tmux (similar to screen) session
with "set mail_check_recent".  I use fetchmail thru procmail and read my
mail by sorted directory (set in ~/.muttrc) in an order of *my* choice.  I
read new mail by advancing to the upper-most directory with mail newer
than my last access to *that* directory using "c".  Mutt positions me to
the oldest "new" mail in that directory.  I read what I wish and move on.

One thing about the above, I use mbox so "directory" equates to "file".

Mail marked "new" or "N" that is in a directory that I have visited since
invoking mutt is *not* recognized as new as far as the directory/file
containing new mail unless I close and reopen mutt, except by the "N"
notation.  And that is how *I* like it,re: "set mail_check_recent".

What is there that you do not understand or cannot make work the way you
wish?  Remember that mutt is *very* configurable and your configuration,
what-ever it is, is *not* know by me so you must explain.  Remember that
what you do not state is not seen or recognized by me.

Everyone has different wishes/likes/desires and it may just be that mutt
does not suit you.  It does for me and many others.

-- 
(paka)Patrick Shanahan   Plainfield, Indiana, USA  HOG # US1244711
http://wahoo.no-ip.orgPhoto Album: http://wahoo.no-ip.org/gallery2
http://en.opensuse.org   openSUSE Community Member
Registered Linux User #207535@ http://linuxcounter.net


Re: Mutt+Abook: questions about addresses and multiple addressees

2012-12-22 Thread Marco
On 2012–12–22 Andre Klärner wrote:

> Well, from the manpage of abook I guess that is not possible. But from my
> perspective it is the right way to do it as it is. I think of it as a
> properly written address is better than just the technical declaration of
> the receipient (like on an official invitation the sometimes handwritten
> address on the envelope), but this is just me.

I totally agree with you. However, I think it can be useful at
times, especially for mailing lists. I have some mailing lists that
have a quite long name, but in abook I stored them with a custom
abbreviation, instead of the official one.

mailing list for users of foo 
mailing list for foo development 
mailing list for foo announcements 

I store them in abook as

foo 
foodev 
spam from foo 

In this case I surely don't want to post to the list as “foodev” or
“spam from foo”. In this case it might be a nice feature to not use
the full name by default. For mailing lists the recipient name is
mostly irrelevant.

Marco


signature.asc
Description: Digital signature