<<< Date Index >>>     <<< Thread Index >>>

Re: define mailbox shortcut?



On Wednesday, 16 August 2006 at 10:37, Moritz Barsnick wrote:
> Hi,
> 
> quick question (more mutt-users-like), or feature request ;-).
> 
> How do I define a new mailbox shortcut? Sometimes I want to quickly
> copy some (really ugly) emails, or even news postings (using the NNTP
> patch), to my Outlook IMAP server.
> 
> So I have to do a 'C' (<copy-message>), enter folder name
> imaps://DOM\myuserid@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/Foldername
> hit return, enter the password, and watch it happen. I know I have to
> enter the password every time of course. :) And I know next time round,
> the mailbox name is in the command line history. But is there any way
> to create a shortcut to the long folder name?
> 
> I saw someone's .sig here, suggesting
> "ln -s 'imaps://DOM\myuserid@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/Foldername' \
>   ~/Mail/imapshortcut"
> and showing an error message, so I assume that does _not_ work. ;-))))
> 
> So, any suggestions? Patches?

One handy trick in recent mutts is to define those mailboxes in
'mailboxes' directives (they won't normally be polled until you
connect):

mailboxes 'imaps://DOM\myuserid@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/'

then you should be able to use tab-completion after the imaps: part to
save yourself a lot of typing. I use this technique myself fairly
often.

It's tempting to update symlink handling so that if the destination
doesn't exist, mutt attempts to resolve it as a folder URL too.