Re: generic bind q.

2000-02-26 Thread Mikko Hänninen

Hello,

Martin Keseg - Sun Slovakia - SE <[EMAIL PROTECTED]> wrote on Fri, 25 
Feb 2000:
> this works, but q. is why does not work "generic" ?

I just noticed that when you do "help" in the index, you get a listing
of "generic bindings" after the "index bindings".  But for the pager,
you don't get that.  I don't know why, but this would lead me to believe
that the generic bindings aren't looked up in the pager.  Strange.


Regards,
Mikko

Oh, a question:  How did you manage to send the email to both me
privately and the mailing list?  You must have set Mutt to *not* honour
the Mail-Followup-Header, which is a bad idea...  Or did you do "reply"
and then add the mutt-users address yourself, or otherwise change the
headers?  I'm on the mutt-users list so you don't need to send replies
to me.
-- 
// Mikko Hänninen, aka. Wizzu  //  [EMAIL PROTECTED]  //  http://www.iki.fi/wiz/
// The Corrs list maintainer  //   net.freak  //   DALnet IRC operator /
// Interests: roleplaying, Linux, the Net, fantasy & scifi, the Corrs /
"I think sex is better than logic, but I can't prove it."



Re: generic bind q.

2000-02-25 Thread Marius Gedminas

On Thu, Feb 24, 2000 at 10:48:44PM +0200, Mikko Hänninen wrote:
> Martin Keseg - Sun Slovakia - SE <[EMAIL PROTECTED]> wrote on Thu, 24 
>Feb 2000:
> > bind generic '?' search-opposite
> > bind generic '' help
> > 
> > but this does not work in pager.
> > 
> > generic does not match pager section ?
> 
> It should match, provided that there's no specific binding for the keys
> in that map (=the context, index/pager/etc.).  

"The generic menu is not a real menu, but specifies common functions
(such as movement) available in all menus except for pager and editor."
-- The Manual

Marius Gedminas
-- 
MCSE == Marginal Computer Software Enthusiast



Re: generic bind q.

2000-02-25 Thread Martin Keseg - Sun Slovakia - SE

Mikko Hänninen ([EMAIL PROTECTED]) wrote :

> Martin Keseg - Sun Slovakia - SE <[EMAIL PROTECTED]> wrote on Thu, 24 
>Feb 2000:

> 
> It should match, provided that there's no specific binding for the keys
> in that map (=the context, index/pager/etc.).  Ie. the map-specific
> bindings always override generic bindings.  So you can't make a generic
> binding and expect it to work immediately in all the different contexts,
> it only takes effect if those contexts don't have a definition in their
> map.

understant, but I have no map-specific bindings in pager bind to ?.
 
> So, I'm guessing that you have ? bound to help in the pager.

yes, but it's mutt default, but it's default for index too and there it works.


> 
> Possible solutions:
> 
> 1) bind ? in pager (and all the other maps where you want it to work)
> specifically to search, and do the same for 

this works, but q. is why does not work "generic" ?

Here are bindings and macros from my .muttrc

#some vi like bindings in pager
bind pager 'j' next-line
bind pager 'k' previous-line
bind pager \Cu half-up
bind pager \Cf half-down
bind pager \CU previous-page

bind index '{' previous-thread
bind index '}' next-thread


#go to first mail
bind index '+' first-entry
#go to last mail
bind index '=' last-entry

#opposite search
bind generic '?' search-opposite

#redefine help
bind generic '' help

#rebind alias
bind index 'A' create-alias
bind pager 'A' create-alias

#clear N flag from messages
macro index \eN T~N\n\;WN\;W*
#delete big messages need sync mailbox for sucess
macro index \eD T~z>1\n\;d
#macros for urlview(ctrl-b)
macro index \cb |urlview\n
macro pager \cb |urlview\n
#macro for jumping to flaged message
macro index a /~F\n

-- 
   Keso
  don't worry about glory



Re: generic bind q.

2000-02-24 Thread Mikko Hänninen

Martin Keseg - Sun Slovakia - SE <[EMAIL PROTECTED]> wrote on Thu, 24 
Feb 2000:
> bind generic '?' search-opposite
> bind generic '' help
> 
> but this does not work in pager.
> 
> generic does not match pager section ?

It should match, provided that there's no specific binding for the keys
in that map (=the context, index/pager/etc.).  Ie. the map-specific
bindings always override generic bindings.  So you can't make a generic
binding and expect it to work immediately in all the different contexts,
it only takes effect if those contexts don't have a definition in their
map.

So, I'm guessing that you have ? bound to help in the pager.

Possible solutions:

1) bind ? in pager (and all the other maps where you want it to work)
specifically to search, and do the same for 

2) un-bind ? in pager, so that the generic binding will take effect.
There's no un-bind command, you do it by binding the key to the special
function "noop" -- "bind pager ? noop"

I recommend approach 1.


If this doesn't help, please be more specific about your "this does not
work" -- which keys, both?  What happens when you press them: nothing,
some error, wrong function gets called?


Regards,
Mikko
(... who couldn't get "bind generic ? search" to work either, even
though ? was un-bound in pager -- Mutt said "key not bound" when I
pressed the ? key.  Also, does anyone know how can I view the current
generic key bindings?)
-- 
// Mikko Hänninen, aka. Wizzu  //  [EMAIL PROTECTED]  //  http://www.iki.fi/wiz/
// The Corrs list maintainer  //   net.freak  //   DALnet IRC operator /
// Interests: roleplaying, Linux, the Net, fantasy & scifi, the Corrs /
"HTML needs a rant tag."  -- Alan Cox



generic bind q.

2000-02-24 Thread Martin Keseg - Sun Slovakia - SE

Hi,

I have defined
#opposite search
bind generic '?' search-opposite

#redefine help
bind generic '' help

but this does not work in pager.

generic does not match pager section ?
-- 
   Keso
  don't worry about glory