On Sun, 26 Mar 2000, Mikko Hänninen wrote:
> Thomas Roessler <[EMAIL PROTECTED]> wrote on Sun, 26 Mar 2000:
> > His point is that he'd like to be able to use the new
> > unhook command in the beginning of each profile, and load
> > standard hooks at the right place from a different file.
>
> If you say so. :-)
Yep, I guess that was the problem: first I had send-hooks defined everywhere
(even in the profiles) and keeping loading profiles made it worse.
Sourcing the profiles work okay with the mutt variables, but send-
hooks should also be cleaned when loading a profile. That is, of
course, if the send-hook contains definitions that might overrule
the profile settings. Therefore, if there are send-hooks that
set same things as profiles, unhook should be performed for those
in order to make them work.
Of course, this was my own stupidity: I had some ridicilous send-hooks
in muttrc :-)
> > >> Known problems/questions: - Is there a way to include
> > >> a message on the status bar with a macro?
> >
> > > You can customise the status bar to your heart's
> > > content by setting the $status_format variable, so yes.
> > > :-)
> >
> > He's talking about the line with the error messages.
> > However, modifying the status bar should work, too.
>
> Hmmm, well I read "status bar" as really the status bar, not the message
> line, even though I did consider that. Also the reason he wanted to do
> this was that he wouldn't forget which profile was loaded, showing a
> single message once wouldn't accomplish that.
>
> Although I guess we'll hear soon enough if he's not happy with changing
> $status_format as a solution. :-)
I am indeed, adding this to profile.default (all in one line):
set status_format="-%r-Mutt: %f [Msgs:%?M?%M/?%m%?n? New:%n?%?o? Old:%o?%?d?
Del:%d?%?F? Flag:%F?%?t? Tag:%t?%?p? Post:%p?%?b? Inc:%b? %?l? %l?]---(%s/%S)
-default-%>-(%P)---"
and this to profile.personal:
set status_format="-%r-Mutt: %f [Msgs:%?M?%M/?%m%?n? New:%n?%?o? Old:%o?%?d?
Del:%d?%?F? Flag:%F?%?t? Tag:%t?%?p? Post:%p?%?b? Inc:%b? %?l? %l?]---(%s/%S)
-personal-%>-(%P)---"
gives me what I need: a way to remember which profile is active!
Sorry about the misleading term "status bar", mutt manual seems to use
"status line".
> > You can always do funny things with the shell - backtick
> > expansions are your friend.
> >
> > source ~/.mutt/colors.`if [ "$TERM" = "linux" ] ; then echo linux ; else echo
>default ; fi`
Excellent tip: if I store the profile setting in an environment variable,
I can test it and only load profile if it is not already active.
> I never thought of that, thanks for the tip. You still can't use
> this to do things based on the contents of a *Mutt* variable, only
> environment variables, which makes it not nearly so useful.
>
> You have to remember that this will use your default shell's syntax,
> not /bin/sh for expansion, right? So for me, using tcsh, it would
> instead end with an endif, etc.
Good point, I'm using zsh so the above example works for me.
I'll try this out and let you know if it works okay.
Thanks guys!
--
/Mara
Martti Rahkila
E-mail: [EMAIL PROTECTED]
Helsinki University of Technology
Department of Electrical Engineering and Communications
Laboratory of Acoustics and Audio Signal Processing