Re: Difference between 'push' and 'exec', is there any?

2007-08-09 Thread Christoph Berg
Re: Chris G 2007-08-08 <[EMAIL PROTECTED]>
> Is there any actual difference between the 'push' and 'exec' commands?

push takes a key sequence, exec a single function. That is, the
following are the same:

exec foo
push 

Christoph
-- 
[EMAIL PROTECTED] | http://www.df7cb.de/


signature.asc
Description: Digital signature


Re: push/enter and my earlier questions

2007-08-09 Thread Rado S
=- Chris G wrote on Wed  8.Aug'07 at 22:35:02 +0100 -=

> macro index S ":push ^Mset 
> mbox_type=maildir^M" 
> macro index s ":push ^Mset mbox_type=mbox^M" 
>   

a) Don't put trailing spaces :)
b) Don't use ^M but 
c) You don't need "push" for this, make it a simple macro.

> (OK, I need the same macro defined in a couple of other modes as
> well but the above is the essence of what I need, hurrah!)

Latest mutt lets you define for several modes at once.

=- Chris G wrote on Wed  8.Aug'07 at 22:06:09 +0100 -=

> Ah, I hadn't seen that there is an  function which
> effectively takes one to the : prompt, thank you. I'll experiment
> some more.

Hit '?', there you see all function names and current keybindings.

-- 
© 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: push/enter and my earlier questions

2007-08-09 Thread Chris G
On Thu, Aug 09, 2007 at 06:54:37PM +0200, Rado S wrote:
> =- Chris G wrote on Wed  8.Aug'07 at 22:35:02 +0100 -=
> 
> > macro index S ":push ^Mset 
> > mbox_type=maildir^M" 
> > macro index s ":push ^Mset 
> > mbox_type=mbox^M"   
> 
> a) Don't put trailing spaces :)

There aren't any in my muttrc, I suspect they may result from my cut
and paste into the message.


> b) Don't use ^M but 

I did try  but it didn't appear to work as I wanted, it might
have been 'finger trouble' but I don't think so.


> c) You don't need "push" for this, make it a simple macro.
> 
How would I do this?


> > (OK, I need the same macro defined in a couple of other modes as
> > well but the above is the essence of what I need, hurrah!)
> 
> Latest mutt lets you define for several modes at once.
> 
> =- Chris G wrote on Wed  8.Aug'07 at 22:06:09 +0100 -=
> 
> > Ah, I hadn't seen that there is an  function which
> > effectively takes one to the : prompt, thank you. I'll experiment
> > some more.
> 
> Hit '?', there you see all function names and current keybindings.
> 
Er, yes, but there are over 100 of them and while I'm familiar with
quite a few of them I just hadn't noticed the .

-- 
Chris Green


Re: push/enter and my earlier questions

2007-08-09 Thread Rado S
=- Chris G wrote on Thu  9.Aug'07 at 21:32:32 +0100 -=

> > > macro index s ":push ^Mset 
> > > mbox_type=mbox^M"   
> > 
> > b) Don't use ^M but 
> 
> I did try  but it didn't appear to work as I wanted, it
> might have been 'finger trouble' but I don't think so.

It might have something to do with your useless use of "push",
adding another input + quoting level.
BTW you don't need it after enter-command anyway.

> > c) You don't need "push" for this, make it a simple macro.
>
> How would I do this?

Recall what "push" and "macro" do: in your case pretty much the
same, so "push" is redundant.

> > > Ah, I hadn't seen that there is an  function
> > > which effectively takes one to the : prompt, thank you. I'll
> > > experiment some more.
> > 
> > Hit '?', there you see all function names and current
> > keybindings.
> 
> Er, yes, but there are over 100 of them and while I'm familiar
> with quite a few of them I just hadn't noticed the
> .

_Every_ key is bound to a function, so whatever key you use (like
":") you can find the name there whenever it crosses your path.

-- 
© 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: push/enter and my earlier questions

2007-08-09 Thread Kyle Wheeler
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Thursday, August  9 at 09:32 PM, quoth Chris G:
>>> macro index S ":push ^Mset 
>>> mbox_type=maildir^M" 
>>> macro index s ":push ^Mset 
>>> mbox_type=mbox^M" 

>> c) You don't need "push" for this, make it a simple macro.
>> 
> How would I do this?

macro index S 'set mbox_type=maildir'
macro index s 'set mbox_type=mbox'

>>> Ah, I hadn't seen that there is an  function which 
>>> effectively takes one to the : prompt, thank you. I'll experiment 
>>> some more.
>> 
>> Hit '?', there you see all function names and current keybindings.
>> 
> Er, yes, but there are over 100 of them and while I'm familiar with 
> quite a few of them I just hadn't noticed the .

You don't need to "notice" them all, you just need to recognize that 
it's better to use the function that a key is bound to rather than the 
key itself when writing macros. Thus, you just need to say "okay, so I press 
the colon key to bring up the : prompt; what function is the colon key 
bound to?" Then it's a simple matter to use that keybinding display to 
look up : and discover that it is bound to the  
function.

~Kyle
- -- 
The sacred rights of mankind are not to be rummaged for, among old 
parchments, or musty records. They are written, as with a sun beam in 
the whole volume of human nature, by the hand of the divinity itself; 
and can never be erased or obscured by mortal power.
-- Alexander Hamilton, 1775
-BEGIN PGP SIGNATURE-
Comment: Thank you for using encryption!

iD8DBQFGu32+BkIOoMqOI14RAsiYAJ91RcnPI68boIp89LXb1FSBeSNcqQCfVFJW
fUKZfVcIz+z/rRjsfwKgp4Q=
=kssd
-END PGP SIGNATURE-