Re: Difference between 'push' and 'exec', is there any?
On Wed, Aug 08, 2007 at 08:17:59PM +0200, Christian Brabandt wrote:
> Hi Chris!
>
> On Wed, 08 Aug 2007, Chris G wrote:
> > On Wed, Aug 08, 2007 at 06:38:33PM +0100, Chris G wrote:
> > > Would a sourced file containing a series of 'push' commands execute
> > > them in the order expected (i.e. sort of backwards). For example if I
> > > source the following:-
> > >
> > > push ":set mbox_type=mbox"
> > > push save-message
> > > push ":set mbox_type=maildir"
> > >
> > > Will it switch to maildir, save a message and then switch back to
> > > mbox?
> > >
> > No it won't, pity! It takes the ":set mbox_type=mbox" as the name of
> > the file to save to. (Of course the above needs ^M in the set
> > commands but still).
>
> Well, you are almost there. It should work this way:
>
> push "<enter-command>set mbox_type=mbox<enter><save-message>\
> <kill-line>~/saved_message<enter><enter-command>set mbox_type=maildir<enter>"
>
Ah, I hadn't seen that there is an <enter-command> function which
effectively takes one to the : prompt, thank you. I'll experiment
some more.
--
Chris Green