Re: batch mode mutt

2002-10-18 Thread René Clerc
* Chris Green <[EMAIL PROTECTED]> [17-10-2002 17:36]:

> > Apart from what would be the use of this, you shouldn't "exec" the
> > macro (because exec applies to functions only, as the error message
> > says), but you should "push" the key sequence.
> > 
> ... quote from manual - "``exec function'' is equivalent to ``push
> ''."  I certainly found this a bit confusing as it (at least
> initially) seems to imply that exec is an alias for push.  I now
> understand exec is specifically for functions.  However one then has
> to ask - what is the point of exec?

I agree that it might be confusing, initially. Push is more powerfull,
since you can execute both functions and keystroke (macro's)
sequences. Exec is limited to functions only. 

Quote from Michael Elkins on mutt-dev:


[...] the exec command is quite similar to the push command.  What
exec does is push a simulated keystroke onto the input stack.  To wit:

push ''
exec change-folder

Have exactly the same effect, both from a user perspective and from an
internal point of view.


My guess is that exec was present, and then the need for something
more powerfull arose, and push was introduced. But I may be mistaking.

-- 
René Clerc  - ([EMAIL PROTECTED])

There is a definite parallel between shots of tequila and a woman's breasts.
One is not enough and three are too many.



msg31886/pgp0.pgp
Description: PGP signature


Re: batch mode mutt

2002-10-18 Thread René Clerc
* Susan Kleinmann <[EMAIL PROTECTED]> [17-10-2002 17:08]:

> I am trying to figure out how to get mutt to execute some command specified
> on the command line and then quit.  This first effort is just to get mutt to
> provide an index listing of new messages in a folder and then quit.
> To do that, I defined the following macro in my muttrc:
> 
> macro index ,n "~N\n\n"
> 
> Then I invoked mutt with the command:
> 
> mutt -e "exec ,n"
> 
> This produces the message:
> ,n: no such function
> Error in command line: 
> Press any key to continue...

Apart from what would be the use of this, you shouldn't "exec" the
macro (because exec applies to functions only, as the error message
says), but you should "push" the key sequence.

-- 
René Clerc  - ([EMAIL PROTECTED])

No woman, no cry.
-Bob Marley 



msg31880/pgp0.pgp
Description: PGP signature


Re: batch mode mutt

2002-10-18 Thread Chris Green
On Thu, Oct 17, 2002 at 05:10:17PM +0200, Ren? Clerc wrote:
> * Susan Kleinmann <[EMAIL PROTECTED]> [17-10-2002 17:08]:
> 
> > I am trying to figure out how to get mutt to execute some command specified
> > on the command line and then quit.  This first effort is just to get mutt to
> > provide an index listing of new messages in a folder and then quit.
> > To do that, I defined the following macro in my muttrc:
> > 
> > macro index ,n "~N\n\n"
> > 
> > Then I invoked mutt with the command:
> > 
> > mutt -e "exec ,n"
> > 
> > This produces the message:
> > ,n: no such function
> > Error in command line: 
> > Press any key to continue...
> 
> Apart from what would be the use of this, you shouldn't "exec" the
> macro (because exec applies to functions only, as the error message
> says), but you should "push" the key sequence.
> 
... quote from manual - "``exec function'' is equivalent to ``push
''."  I certainly found this a bit confusing as it (at least
initially) seems to imply that exec is an alias for push.  I now
understand exec is specifically for functions.  However one then has
to ask - what is the point of exec?

-- 
Chris Green ([EMAIL PROTECTED])



Re: batch mode mutt

2002-10-18 Thread Michael Elkins
Susan Kleinmann wrote:
> To do that, I defined the following macro in my muttrc:
> 
> macro index ,n "~N\n\n"
> 
> Then I invoked mutt with the command:
> 
> mutt -e "exec ,n"
> 
> This produces the message:
> ,n: no such function
> Error in command line: 
> Press any key to continue...
> 
> What am I doing wrong?

You need use use the "push" command instead of exec.