* On 03 Jun 2015, Cameron Simpson wrote: > On 31May2015 08:26, Xu Wang <xuwang...@gmail.com> wrote: > >Sometimes I would like to use 'push' in a macro, but I cannot figure > >out the way to achieve this. For example, I have: > > > >macro attach E "push > ><save-entry><kill-line>/home/xuwang/Downloads/<enter>y<enter>" "xu > >save" > > > >What would the correct syntax be? > > "push" is a command line command, which is accessed by typing ":". So you > need to prefix "push" with ":" to enter the command line. So you would start > your macro ":push" instead of "push".
There may be a misundertanding though. Hooks execute commands, so to make a hook trigger keyboard events you need "push". Macros are opposite: they do not execute commands, they execute keyboard events. So typically a macro would not use push -- it would be redundant. On the surface, it seems this should do what you want: macro attach E "<save-entry><kill-line>/home/xuwang/Downloads/<enter>y<enter>" "xu save" There may be reasons to have a push inside a macro, but it would be as part of some other command which the macro is executing via <enter-command> (same as Cameron's ":" above). So then it's a problem of using push with that command, not of using push with macro. -- David Champion • d...@bikeshed.us