Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Mutt always wants to open the wrong file/directory

29 views
Skip to first unread message

Anthony Campbell

unread,
Mar 10, 2005, 10:31:52 AM3/10/05
to
I like mutt but this one has annoyed me for years.

I have procmail to sort my mail into several different files. When a new
mail arrives it is shown, correctly, as appearing in a particular file.
However, if I point Mutt at that file, it nearly always opens the *last*
file I read, not the one I want it to open. The result is I nearly
always have to open the "wrong" file first. Is this a bug or a feature?
Anyway to configure it differently.

Anthony


--
Using Linux GNU/Debian - Windows-free zone
http://www.acampbell.org.uk (blog, book reviews,
Assassins, homeopathy, and skeptical articles).
Email: replace "www" with "ac@"

Sven Guckes

unread,
Mar 10, 2005, 2:47:48 PM3/10/05
to
* Anthony Campbell <a...@acampbell.org.uk> [2005-03-10]:

> I like mutt but this one has annoyed me for years.
>
> I have procmail to sort my mail into several
> different files. When a new mail arrives it is
> shown, correctly, as appearing in a particular file.

which view is that? buffy mode? mailboxes menu?

> However, if I point Mutt at that file,

*how*?

> ..it nearly always opens the *last* file


> I read, not the one I want it to open.

"nearly always" - so you cannot reproduce it?

> The result is I nearly always have to open the
> "wrong" file first. Is this a bug or a feature?

yes.

and, no, we won't try to guess your version number,
setup, commands, error messages, or anything else.

Sven

Anthony Campbell

unread,
Mar 11, 2005, 4:20:22 AM3/11/05
to

OK: this is version 1.5.6 as installed by Debian Sid, but the same
effect has been there in all versions for years. There are no error
messages. In case it wasn't clear:

I have several mailboxes defined in .muttrc, giving the following menu:

1 -rw------- 1 ac ac 941909 Mar 11 08:50 =debian-user
2 -rw------- 1 ac ac 413047 Mar 11 07:28 =vimlist
3 -rw------- 1 ac ac 1195283 Mar 11 04:34 =jesusmysteries
-> 4 -rw-rw---- 1 ac mail 0 Mar 11 03:00 /var/spool/mail/ac
5 -rw------- 1 ac ac 1868976 Mar 10 16:48 =ocd
6 -rw------- 1 ac ac 1422796 Mar 08 01:53 =spamprobestuff
7 -rw------- 1 ac ac 1104018 Feb 24 08:34 =shorewall-users

As here, I point the cursor at /var/spool/mail/ac but Return brings up a
different mailbox (usually debian-user). (I think it goes to whichever
mailbox last received mail but it's difficult to be sure.) I have to
exit that mailbox and go back again to /var/spool/mail/ac in order to
read the mail there. After that, everything works as expected.

Relevant section of .muttrc:


# Mailboxes to watch for new mail
mailboxes /var/spool/mail/ac ~/Mail/debian-user ~/Mail/vimlist \
~/Mail/spamprobestuff ~/Mail/shorewall-users ~/Mail/jesusmysteries \
~/Mail/ocd
# mailboxes <path1> [ <path2> ... ]
#
#mailboxes ! +mutt-dev +mutt-users +open-pgp +wmaker +hurricane +vim +ietf
#mailboxes `echo ~/Mail/Lists/*`

#mailboxes /var/spool/mail/ac ~/Mail/* `echo ~/News/*`

Sven Guckes

unread,
Mar 12, 2005, 4:30:54 PM3/12/05
to
* Anthony Campbell <a...@acampbell.org.uk> [2005-03-11]:

>>> I have procmail to sort my mail into several
>>> different files. When a new mail arrives it is
>>> shown, correctly, as appearing in a particular file.
>
> OK: this is version 1.5.6 as installed by Debian Sid, but
> the same effect has been there in all versions for years.
> There are no error messages. In case it wasn't clear:
>
> I have several mailboxes defined in .muttrc, giving the following menu:
>
> 1 ... 941909 Mar 11 08:50 =debian-user
> 2 ... 413047 Mar 11 07:28 =vimlist
> 3 ... 1195283 Mar 11 04:34 =jesusmysteries
> -> 4 ... 0 Mar 11 03:00 /var/spool/mail/ac
> 5 ... 1868976 Mar 10 16:48 =ocd
> 6 ... 1422796 Mar 08 01:53 =spamprobestuff
> 7 ... 1104018 Feb 24 08:34 =shorewall-users

>
> As here, I point the cursor at /var/spool/mail/ac but Return brings up a
> different mailbox (usually debian-user).

weird. such has never happened to me.

> I think it goes to whichever mailbox last
> received mail but it's difficult to be sure.

well.. can you set up a test user on your machine
and simply test this a little bit more?
you can probably simulate new mail in
folder by appending a message to them
(cat message >> folder).

> I have to exit that mailbox and go back again to
> /var/spool/mail/ac in order to read the mail there.
> After that, everything works as expected.

hmm.. *shrug*

> Relevant section of .muttrc:
># Mailboxes to watch for new mail
> mailboxes /var/spool/mail/ac ~/Mail/debian-user ~/Mail/vimlist \
> ~/Mail/spamprobestuff ~/Mail/shorewall-users ~/Mail/jesusmysteries \
> ~/Mail/ocd

this seems a lot easier to read:

set folder=~/Mail
mailboxes !
mailboxes +debian-user +vimlist +spamprobestuff \
+shorewall-users +jesusmysteries +ocd

but it all might be a mystery to jesus.. ;-)

Sven

Paul Walker

unread,
Mar 12, 2005, 4:58:34 PM3/12/05
to
On 12 Mar 2005 21:30:54 GMT, Sven Guckes wrote:

> but it all might be a mystery to jesus.. ;-)

He's not noted for his familiarity with mutt, as far as I'm aware...

Might be worth trying with a muttrc which is empty apart from the mailboxes
line, just to eliminate that. If it still happens, I'd be inclined to start
looking at slang/ncurses, but I'm just guessing.

--
Paul

I believe that I do not know whether I know, or not, that one can never be
certain whether one can prove that I do not know whether one cannot know
whether one can discover the existence or otherwise of god. -- Dan Sheppard

Chris

unread,
Mar 13, 2005, 7:21:59 AM3/13/05
to

You are not using procmail (or similar)?


> As here, I point the cursor at /var/spool/mail/ac but Return brings up a
> different mailbox (usually debian-user). (I think it goes to whichever
> mailbox last received mail but it's difficult to be sure.) I have to
> exit that mailbox and go back again to /var/spool/mail/ac in order to
> read the mail there. After that, everything works as expected.
> Relevant section of .muttrc:

Looks like you aren't using procmail.

> # Mailboxes to watch for new mail
> mailboxes /var/spool/mail/ac ~/Mail/debian-user ~/Mail/vimlist \
> ~/Mail/spamprobestuff ~/Mail/shorewall-users ~/Mail/jesusmysteries \
> ~/Mail/ocd
> # mailboxes <path1> [ <path2> ... ]
> #
> #mailboxes ! +mutt-dev +mutt-users +open-pgp +wmaker +hurricane +vim +ietf
> #mailboxes `echo ~/Mail/Lists/*`
>
> #mailboxes /var/spool/mail/ac ~/Mail/* `echo ~/News/*`

Something like this would be better, wouldn't it then it would get
mailboxes automatically.
------------------------- .muttrc ---------------
set folder=~/Mail

mailboxes ! `echo $HOME/Mail/*`

...
------------------------ end .muttrc ---------------------------

Suggest use procmail
Sorry if I am misunderstanding you.

> Anthony

--
Cheers
Chris.
======

Anthony Campbell

unread,
Mar 14, 2005, 6:57:33 AM3/14/05
to
On 2005-03-13, Chris <mocki...@ihug.co.nzd> wrote:
[snip]
>
> Looks like you aren't using procmail.
>
>> # Mailboxes to watch for new mail
>> mailboxes /var/spool/mail/ac ~/Mail/debian-user ~/Mail/vimlist \
>> ~/Mail/spamprobestuff ~/Mail/shorewall-users ~/Mail/jesusmysteries \
>> ~/Mail/ocd
>> # mailboxes <path1> [ <path2> ... ]
>> #
>> #mailboxes ! +mutt-dev +mutt-users +open-pgp +wmaker +hurricane +vim +ietf
>> #mailboxes `echo ~/Mail/Lists/*`
>>
>> #mailboxes /var/spool/mail/ac ~/Mail/* `echo ~/News/*`
>
> Something like this would be better, wouldn't it then it would get
> mailboxes automatically.
> ------------------------- .muttrc ---------------
> set folder=~/Mail
>
> mailboxes ! `echo $HOME/Mail/*`
>
> ...
> ------------------------ end .muttrc ---------------------------
>
> Suggest use procmail
> Sorry if I am misunderstanding you.
>

I am using procmail. The above suggestion produces a list of *all* the
mailboxes whereas I only want to watch 3 or 4 routinely (the ones that
procmail directs mail to). I'm coming to the conclusion that what I'm
complaining about is probably a feature (mutt wants to open the last
mailbox it read).

On a slightly different note, can someone enlighten me about the use of
the plus sign (+) before certain mailboxes? What is it supposed to do? I
tried to RTFM but Ican't find anything in the manual about it and a
search on google isn't very illuminating either.

Karl Billeter

unread,
Mar 14, 2005, 7:14:52 AM3/14/05
to
On 2005-03-14, Anthony Campbell <a...@acampbell.org.uk> wrote:
...

> On a slightly different note, can someone enlighten me about the use of
> the plus sign (+) before certain mailboxes? What is it supposed to do? I
> tried to RTFM but Ican't find anything in the manual about it and a
> search on google isn't very illuminating either.

From /usr/share/doc/mutt/manual.txt.gz on my system

These shortcuts can be used anywhere you are prompted for
a file or mailbox path.

! -- refers to your ``$spoolfile'' (incoming) mailbox

> -- refers to your ``$mbox'' file

< -- refers to your ``$record'' file

^ -- refers to the current mailbox

- or !! -- refers to the file you've last visited

~ -- refers to your home directory

= or + -- refers to your ``$folder'' directory

@alias -- refers to the ``default save folder'' as determined by
the address of the alias


Karl

Anthony Campbell

unread,
Mar 14, 2005, 8:15:02 AM3/14/05
to


What I was querying was the use of + as a prefix to a mailbox (e.g.
+mbox instead of mbox).

Christian Ebert

unread,
Mar 14, 2005, 9:32:02 AM3/14/05
to
* Anthony Campbell on Mon, Mar 14, 2005:

> On 2005-03-14, Karl Billeter <ka...@alphalink.com.au> wrote:
>> From /usr/share/doc/mutt/manual.txt.gz on my system
>>
>> These shortcuts can be used anywhere you are prompted for
>> a file or mailbox path.
>>
>> ! -- refers to your ``$spoolfile'' (incoming) mailbox
>>
>> > -- refers to your ``$mbox'' file
>>
>> < -- refers to your ``$record'' file
>>
>> ^ -- refers to the current mailbox
>>
>> - or !! -- refers to the file you've last visited
>>
>> ~ -- refers to your home directory
>>
>> = or + -- refers to your ``$folder'' directory
>>
>> @alias -- refers to the ``default save folder'' as determined by
>> the address of the alias
>
> What I was querying was the use of + as a prefix to a mailbox (e.g.
> +mbox instead of mbox).

Supposing you have

set folder=~/Mail

then

+mbox

refers to

~/Mail/mbox

c
--
--->> <http://www.blacktrash.org/>

Message has been deleted

Anthony Campbell

unread,
Mar 15, 2005, 4:18:50 AM3/15/05
to
On 2005-03-14, Peter H. Coffin <hel...@ninehells.com> wrote:

> On 14 Mar 2005 13:15:02 GMT, Anthony Campbell wrote:
>> On 2005-03-14, Karl Billeter <ka...@alphalink.com.au> wrote:
>>> From /usr/share/doc/mutt/manual.txt.gz on my system
>>>
>>> These shortcuts can be used anywhere you are prompted for
>>> a file or mailbox path.
>>>
>>> = or + -- refers to your ``$folder'' directory
>>
>> What I was querying was the use of + as a prefix to a mailbox (e.g.
>> +mbox instead of mbox).
>
> +mbox => $folder/mbox (usually, this is an absolute path, meaning it's
> always the same, regardless of what directory you're
> in when you start mutt)
>
> mbox => ./mbox (the file mbox in your current working directory,
> whatever that may be)
>

Thanks to all for replies. I think I've now solved the original problem
(mutt pointing to the wrong file initially) by including the following
lines:

set folder=~/Mail # where i keep my mailboxes
set spoolfile=/var/spool/mail/ac

Anthony

Sven Guckes

unread,
Mar 15, 2005, 2:14:46 PM3/15/05
to
* Anthony Campbell <a...@acampbell.org.uk> [2005-03-15]:

> I think I've now solved the original problem (mutt pointing to
> the wrong file initially) by including the following lines:
>
> set folder=~/Mail # where i keep my mailboxes
> set spoolfile=/var/spool/mail/ac

you have solved your problem
by using the *deafult* values?
congratulations!

Sven

Message has been deleted
Message has been deleted
Message has been deleted

Paul Walker

unread,
Mar 16, 2005, 2:01:10 PM3/16/05
to
On Wed, 16 Mar 2005 00:36:27 -0600, Peter H. Coffin wrote:

> configs, *and* any of those can include other sources, I'd love to see
> that a standard display was available in many that did something like:

I did have a patch which would dump out all variable values, although
without tracking which file they came from. Can't remember whether I still
have it or whether I chucked it, though.

--
Paul

Brain: Are you pondering what I'm pondering?
Pinky: Well, I think so, Brain, but I can't memorize a whole opera in Yiddish.

Sven Guckes

unread,
Mar 16, 2005, 10:45:11 PM3/16/05
to
* Paul Walker <use...@blacksun.org.uk> [2005-03-16]:

> I did have a patch which would dump out all
> variable values, although without tracking which
> file they came from. Can't remember whether I
> still have it or whether I chucked it, though.

um... and your point *is*? ;-)

Sven

Message has been deleted

Sven Guckes

unread,
Mar 17, 2005, 11:58:41 AM3/17/05
to
* Peter H. Coffin <hel...@ninehells.com> [2005-03-17]:
> Soliciting for "Yes, please re-do this patch" requests?

;-)

> If that's the intent, add my name
> to the "that might be handy" list.

"a peter might be handy".. done.

if you find that patch then maybe
the maintainer of mutt-ng finds
it interesting enough to add it.
although i'd like it more if it
worked like the debug info with vim.
there is much good in this!

Sven

Rocco Rutte

unread,
Mar 16, 2005, 1:40:55 PM3/16/05
to
* Peter H. Coffin wrote:

>My Favorite MTA has a
>wonderfully useful function that dumps out ALL the configuration
>settings, all the defaults or all the settings that are *not* the
>defaults. That's pretty good, but that program only reads a single
>config file, and therefore it's pretty easy to guess where something is
>being set.

Finding out the values is not the only thing one could want. For
example, a bug report could include such a listing instead of just the
user's config file. For us, it's easier to look at different values than
starting to search which are different at all.

Since I consider mutt dead (see <http://www.muttng.org/>), I have
concrete plans on doing this "right" or at least improving it. The -Q
command line option is nice to have but fully insufficient, somehow.

bye, Rocco
--
:wq!

Paul Walker

unread,
Mar 17, 2005, 2:04:05 PM3/17/05
to
On 17 Mar 2005 03:45:11 GMT, Sven Guckes wrote:

> um... and your point *is*? ;-)

I have no point, I just ramble... (oops)

--
Paul

Paul Walker

unread,
Mar 19, 2005, 10:06:05 AM3/19/05
to
On Thu, 17 Mar 2005 10:34:38 -0600, Peter H. Coffin wrote:

> Soliciting for "Yes, please re-do this patch" requests?

That was the general idea.

> If that's the intent, add my name to the "that might be handy" list.

I've managed to find a copy, and update it to apply to CVS head. You can
download it from http://www.black-sun.demon.co.uk/tmp/patch-1.5.9.pw.dumpvar.1

(It's small enough to easily review, but there's a signature at
http://www.black-sun.demon.co.uk/tmp/patch-1.5.9.pw.dumpvar.1.asc for the
cautious.)

I'll send it in for the next release; any comments appreciated.

Cheers,

--
Paul

0 new messages