On Mon, Nov 29, 1999 at 08:57:42PM +0200, Mikko Hänninen wrote:
> Chris Green <[EMAIL PROTECTED]> wrote on Mon, 29 Nov 1999:
> > So, for example, the following macros in my .muttrc file *don't*
> > work (though they all appear OK on the help screen):-
> >
> > macro generic ,s "s{mailandnews.co.uk}"
> > macro generic ,c "c{mailandnews.co.uk}"
>
> Don't know about these two... I'm not sure about the generic bindings,
> never played around with them. I've always used just index/pager
> macros, they work well enough for me.
>
> > macro generic ^X ":source ~/.mutt/"
> > macro index ^X ":source ~/.mutt/"
>
> But here, I suspect you want to use \cX instead. When I try the above
> commands, they work fine for me -- when I first type ^ followed by an X.
>
Yes, you're right '\cX' works, for me '^X' definitely doesn't work, I
just tried it again. Ah, I see what you mean, the '^X' case produces
a macro which is actually the two character sequence '^' and 'X'.
The manual however says:- "key and sequence are expanded by the same
rules as the key bindings, with the addition that control characters
in sequence can also be specified as ^x. In order to get a caret
(``^'') you need to use ^^. " This is just plain wrong, the ^
character doesn't appear to have any special effect at all.
> > This all seems a bit unsatisfactory and vague to me, is there any way
> > to decide whether a particular macro will work or not other than
> > just trying it?
>
> I've never had any problems with macros that I've not been able to
> (finally) determine a specific cause for, but admittedly finding the
> reason has not been easy in some places.
>
Yes, I think this is basically what I've been saying, one can beat
one's way to success in the end but it's confusing. The two main
problems seem to be that:-
1 - "generic" macros rarely seem to work as expected, this may well be
for valid (but obscure) reasons. Maybe it would be a good idea for
the manual to point out that index and pager macros are more likely to
get the required effect.
2 - The manual is wrong about using ^ to indicate control characters.
--
Chris Green ([EMAIL PROTECTED])
Home: [EMAIL PROTECTED] Work: [EMAIL PROTECTED]
WWW: http://www.isbd.co.uk/