Re: set alias for mail folder
- To: mutt-users@xxxxxxxx
- Subject: Re: set alias for mail folder
- From: Kyle Wheeler <kyle-mutt@xxxxxxxxxxxxxx>
- Date: Mon, 13 Oct 2008 13:42:58 -0500
- Comment: DomainKeys? See http://domainkeys.sourceforge.net/
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed; d=memoryhole.net; h=date :from:to:subject:message-id:references:mime-version:content-type :in-reply-to; s=default; bh=FcHPaW8DFhIypfkEu7va4mPxC80=; b=nQsw wE83fltjKbaczDcrfv46Wy4gcED5dQMpfm/x/yHX6ZLMK6C0WZwei1jPOBgLYHCo yjDETmRIxEuAgzmxb+bFPWuWXllyv1R0Bf2eIiLkVuocJmDmo9KZus3cBcYqAC32 IgBq4vQaqYU7swV+bExILiZBQ1SGyrPYjcaHv7s=
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=memoryhole.net; b=F2VKox5aeRf746b9SaoowVHGfvLxaw2f0wGm63gNyhrO3xcTOdLwlK471IfNAUXRXoNxIZk0LDo/XjMlZil9RPmSWqUoWteOcGVvlfybezWXvjx8S0kFE0Y5tZdDP1mAdx38G+NXuUpGop8MleK63YxUzx4U1bZ4BnxBe6wtGvc=; h=Received:Received:Date:From:To:Subject:Message-ID:Mail-Followup-To:References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To:OpenPGP:User-Agent;
- In-reply-to: <20081013200542.20721tzk8pa0g3k0@xxxxxxxxxxxxxxx>
- List-post: <mailto:mutt-users@mutt.org>
- List-unsubscribe: send mail to majordomo@mutt.org, body only "unsubscribe mutt-users"
- Mail-followup-to: mutt-users@xxxxxxxx
- Openpgp: id=CA8E235E; url=http://www.memoryhole.net/~kyle/kyle-pgp.asc; preference=signencrypt
- References: <20081013200542.20721tzk8pa0g3k0@xxxxxxxxxxxxxxx>
- Sender: owner-mutt-users@xxxxxxxx
- User-agent: Mutt/1.5.18 (2008-09-25)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Monday, October 13 at 08:05 PM, quoth Percy Foreman:
> I'm trying to figure out how to alias a mail folder so I can type
> '@folder' instead of '/home/test/mail/inbox' when trying to change.
>
> I tried putting
> alias folder '/home/test/mail/inbox'
> into muttrc, but mutt responds with
> opening _home_test_mail_inbox
> Of course he can't find it, so I don't know.
I think you're misunderstanding the documentation. I'm guessing that
you looked in the manual under "Mailbox Shortcuts" and found:
@alias -- refers to the default save folder as determined by the
address of the alias
But that doesn't mean you specify '@folder' to mean some folder.
Here's how it works: let's say you have a friend named Bob. So you
establish an alias for him:
alias bob Bob <bob@xxxxxxxxxxx>
Then, because you want to keep email from him in a folder, you set up
a save-hook:
save-hook '~f bob@xxxxxxxxxxx' +BobMail
Thereafter, you can use "@bob" as an alias for "+BobMail" (do you know
what the + in front of that means?).
To be a bit more explicit: the "@alias" notation relies on save-hooks
(and fcc-save-hooks). The "alias" keyword in your muttrc is (if you
check your manual) exclusively for defining names for email addresses.
It is not a general-purpose shorthand mechanism.
So, strictly speaking, you *could* achieve what you want by making a
"folder" alias for a garbage email address and then establishing a
save-hook for that garbage email address, like so:
alias folder <folder-12345678909@xxxxxxxxxxx>
save-hook '~f folder-12345678909@xxxxxxxxxxx' /home/test/mail/inbox
Thereafter, "@folder" will be considered a shortcut for
"/home/test/mail/inbox". That's going a little out of your way, I
think, but you *can* do that.
Generally, though, you *usually* don't need to specify full paths. The
easiest thing to do is to specify a $folder:
set folder=/home/test/mail/inbox
Once you do that, you can use + or = to refer to
"/home/test/mail/inbox". Your sub-folders can even be easily referred
to when you do that. For example, with the above setting, "+BobMail"
would refer to "/home/test/mail/inboxBobMail" (note that there's no
separator between "inbox" and "BobMail", so if you want one, you need
to insert it, either at the end of $folder or in your use of the +
shortcut, like so: "+/BobMail").
~Kyle
- --
What progress we are making. In the Middle Ages they would have burned
me. Now they are content with burning my books.
-- Sigmund Freud
-----BEGIN PGP SIGNATURE-----
Comment: Thank you for using encryption!
iEYEARECAAYFAkjzlrIACgkQBkIOoMqOI17GZgCfas5uwJp1rjKXkdlUV/FdlAWZ
tIUAnA4ZEv4yJZIflqXnB0V/8b4Z4O65
=YyVp
-----END PGP SIGNATURE-----