macro echo on error/editor bar? - Mutt
This is a discussion on macro echo on error/editor bar? - Mutt ; Can a macro echo a message on the mutt error/editor bar (at the very
bottom, not the status bar)? What command does that? Maybe a set
?my-variable or have I overlooked some obvious echo or print command?
Also can a ...
-
macro echo on error/editor bar?
Can a macro echo a message on the mutt error/editor bar (at the very
bottom, not the status bar)? What command does that? Maybe a set
?my-variable or have I overlooked some obvious echo or print command?
Also can a macro (or any :command) display the my_hdr settings?
Thanks.
- steve s.
-
Re: macro echo on error/editor bar?
S S <nomail@too.much.spam.com> wrote:
> Can a macro echo a message on the mutt error/editor bar (at the
> very bottom, not the status bar)? What command does that? Maybe a
> set ?my-variable or have I overlooked some obvious echo or print
> command?
Exactly, when you have my_*, use that. Otherwise you can abuse a
regular var which you aren't using functionally, like
print_command.
> Also can a macro (or any :command) display the my_hdr settings?
No.
--
© Rado S. -- You must provide YOUR effort for your goal!
EVERY effort counts: at least to show your attitude.
You're responsible for ALL you do: you get what you give.
-
Re: macro echo on error/editor bar?
Sorry for the delay, I just now had some time to experiment.
On Tue, 23 Oct 2007 10:41:39 -0400, Rado S <rado-news@spam-is.invalid>
wrote:
> S S <nomail@too.much.spam.com> wrote:
>> Can a macro echo a message on the mutt error/editor bar (at the
>> very bottom, not the status bar)? What command does that? Maybe a
>> set ?my-variable or have I overlooked some obvious echo or print
>> command?
>
> Exactly, when you have my_*, use that. Otherwise you can abuse a
> regular var which you aren't using functionally, like
> print_command.
>
Thanks for the encouragement Rado S, with the wonderful
flexibility of mutt I felt mired in the myriad of mutt
variables, :commands, :exec commands, and trying to sort
out macro syntax, I was really getting daunted. I didn't
realize that showing a message to the user was such a radical
expectation in the mutt language. Thanks for a pleasant nudge
in the right direction.
Wait, did I just say "the right direction"? Abuse is right,
Rado S! :set doesn't declare a new variable for me, so I looked
for some obscure variable to borrow. Then I gave up trying
to find a good string variable to borrow (at least one that
I could recommend to this audience), because they all have
important use to someone! Maybe the pgp_, smime_, pop_, and
(as Rado said) print_command are unused by some ONE person
out there, but I can't say that any variables are generally
rarely used, thereby making them a good choice to borrow. :-(
I do have an old pine/elm bias and mutt really does satisfy
my bias. I've never spoken in a dog's language before, now
that I'm beginning to I have to say that this is an unfriendly
dog by not giving macros a way to give friendly feedback to
the user. :-( This criticism is a small detail in the mountain
of successes that Michael R. Elkins and others have achieved
with mutt. :-) I'm getting to love mutt.
In the end I composed a little Hello, World! proof of concept
for everyone, but I warn you that it is abusive of a variable.
I chose to abuse the indent_string because that variable is
easy to see if something goes wrong. I think that the only
proper way to mis-appropriate a variable is to borrow it and
put it back when your macro is done with it. But that was
problematic: after using a variable to display a message with
set: ?indent_string, if after that the macro :set the variable
back to normal, then the message displayed gets erased from
the error/editor line so quickly that I can't even see it!
So, in the end, I made a Hello, World! (for all the new users
in the audience) with two macros, one to prove the concept,
and one to restore the abused variable.
macro index <ESC>% ":set indent_string=\"Hello, Mutt World!.\"<enter>:set
?indent_string<enter>" "Hello, world! demonstration."
macro index <ESC>> ":set indent_string=\"> \"<enter>" "Restore the reply
indentations."
>> Also can a macro (or any :command) display the my_hdr settings?
>
> No.
>
Ah, nutz! I guess that I expected too much, these a macros, not
a full language. This is my first mutt macro try. And don't
get me wrong, mutt is the only decent mail-user-agent available
that I know of. All the others are just such inflexible toys
with no imagination, that hide the email headers from you.
Good for mutt! :-)
But what I'm finding is that maybe the many unusual email headers
are so scrambled and useless that the other mail-user-agents
are right to hide all of them.
In the end here are the new macros for my mutt:
macro index <ESC>> ":set indent_string=\"> \"<enter>" "Restore the reply
indentations."
macro index <ESC>il ":my_hdr Importance: low<enter>:set
indent_string=\"New messages will be marked with low importance.\"<enter>"
"header: low importance message."
macro index <ESC>in ":my_hdr Importance: normal<enter>:set
indent_string=\"New messages will be marked with normal
importance.\"<enter>" "header: normal importance message."
macro index <ESC>ih ":my_hdr Importance: high<enter>:set
indent_string=\"New message will be marked with low importance.\"<enter>"
"header: high importance message."
macro index <ESC>id ":unmy_hdr Importance<enter>:set indent_string=\"New
messages not have an Importance: header.\"<enter>" "remove Importance
header."
- steve s.
-
Re: macro echo on error/editor bar?
S S <nomail@too.much.spam.com> wrote:
Please don't use potentially existing domains.
> I didn't realize that showing a message to the user was such a
> radical expectation in the mutt language. Thanks for a pleasant
> nudge in the right direction.
Unless it already has been considered and included in the latest
code, there was a patch to provide some "echo" cmd.
The "my_*" variables are definitely in, so you don't have to abuse
any existing functional var.
> All the others are just such inflexible toys with no imagination,
> that hide the email headers from you.
I guess every MUA lets you see all headers if you really try die
hard.
> But what I'm finding is that maybe the many unusual email headers
> are so scrambled and useless that the other mail-user-agents are
> right to hide all of them.
So can you with mutt, rtfm "ignore *; unignore ..."
Or see ConfigList (wiki) for samples.
--
© Rado S. -- You must provide YOUR effort for your goal!
EVERY effort counts: at least to show your attitude.
You're responsible for ALL you do: you get what you give.
-
Correction: Re: macro echo on error/editor bar?
Ooo, that was bad. Those last macros had mistakes, let me just post the
corrected macros:
macro index <ESC>> ":set indent_string=\"> \"<enter>" "Restore the reply
indentations."
macro index <ESC>il ":my_hdr Importance: low<enter>:set
indent_string=\"New messages will be marked with low
importance.\"<enter>:set ?indent_string<enter>" "header: low importance
message."
macro index <ESC>in ":my_hdr Importance: normal<enter>:set
indent_string=\"New messages will be marked with normal
importance.\"<enter>:set ?indent_string<enter>" "header: normal importance
message."
macro index <ESC>ih ":my_hdr Importance: high<enter>:set
indent_string=\"New message will be marked with high
importance.\"<enter>:set ?indent_string<enter>" "header: high importance
message."
macro index <ESC>id ":unmy_hdr Importance<enter>:set indent_string=\"New
messages will not have an Importance: header.\"<enter>:set
?indent_string<enter>" "remove Importance header."
- steve s.
-
Re: macro echo on error/editor bar?
On Mon, 29 Oct 2007 09:57:26 -0500, Rado S <rado-news@spam-is.invalid>
wrote:
>> I didn't realize that showing a message to the user was such a
>> radical expectation in the mutt language. Thanks for a pleasant
>> nudge in the right direction.
>
> Unless it already has been considered and included in the latest
> code, there was a patch to provide some "echo" cmd.
> The "my_*" variables are definitely in, so you don't have to abuse
> any existing functional var.
>
Ah, I guess that is my real obsticle. I'm running "Mutt 1.5.9i
(2005-03-13)" now-a-days. I'm preparing to migrate from Ubuntu
5.04 to Debian 4.0, which will bring mutt up to "1.5.13-1.1etch1",
though still not up to "Mutt 1.5.16 was released on June 9, 2007".
"my_*" variables? I have RTFM and only seen my_hdr mentioned. I'll
keep an eye out for them after my Ubuntu to Debian migration. Thank
you Rado. And the wiki faqs for mutt are very nicely done, thank you
for posting links to those here.
>> All the others are just such inflexible toys with no imagination,
>> that hide the email headers from you.
>
> I guess every MUA lets you see all headers if you really try die
> hard.
>
But, by default, normally, and while using them in the ordinary (rather
than the jumping-through-hoops) ways: they are made to hide reading and
writing most headers from the user. My point was that mutt is the
opposite in that it allows you to see (or ignore) and even write, the
email headers that you want. So in criticizing the other MUAs I
was only do that in comparison to what mutt can do; mutt being a
great example of a very nicely done MTA. :-)
- steve s.
Similar Threads
-
By Application Development in forum Python
Replies: 0
Last Post: 12-10-2007, 11:14 AM
-
By Application Development in forum Python
Replies: 1
Last Post: 12-10-2007, 09:38 AM
-
By Application Development in forum Python
Replies: 1
Last Post: 12-10-2007, 07:35 AM
-
By Application Development in forum lisp
Replies: 2
Last Post: 10-30-2007, 06:01 PM
-
By Application Development in forum xharbour
Replies: 1
Last Post: 05-16-2007, 03:19 AM