On Wed, May 26, 2004 at 10:32:39PM EDT, TAKAHASHI Tamotsu wrote: > On Wed, May 26, 2004 at 11:17:05PM +0200, Alain Bench wrote: > > The current behaviour (unbind to unbound) seems to me consistent > > with the manual: A key you unbind then press does ??Key is not bound.?? > > error, not some generic operation. > > > > Also consistent with command syntax: "bind map key noop" binds noop > > to the key, and noop means "no operation", not back to whichever generic > > operation. And "bind generic key noop" confirms this scheme. > > Logically, "bind to noop" has to be "bind to noop" of course. > But then, we have no way to "bind to generic." Looking it as "binding to generic" leads to complexity. . . > So here is another patch. If this is approved, I and Pawel would > "set trygeneric." Others wouldn't. (default: unset) ...as reflected in your patch :-( > This works run-time. i.e. This patch does not modify > "bind" function, but modifies key-interpreting routine. It allows a lot less flexibility than what dgc's patch should've been, by forcing people to choose globally whether or not generics will be tried. IMHO, it makes far more sense to allow people to simply undo a bind operation (i.e., to do an unbind operation), rather than forcing them to play all sorts of games with more complexity that can't even do as much. (In other words, everything that can be done by your patch below can be done by what dgc's patch should've been, but the reverse doesn't hold.) > > > bug#1880 is really a bug. > > > > I see #1880 as a misunderstanding of the intended and documented > > behaviour, not as a bug. I would have closed it, but am surprised you > > are 3 to think the contrary (Pawel, you, and Dave). So I hesitate. > > Reading your post, I finally realize that the problem is just > "the word <unbind> is unclear." I don't think I misunderstood > the document. But I might have misunderstood the intended behaviour. The word "unbind" is not unclear by any stretch of the imagination, AFAICT. If "binding" creates a binding in Mutt's tables, "unbinding" should toss the binding out of Mutt's tables, not clobber it with some other binding that happens to do nothing. Put another way, an "unbind" operation should exactly undo a "bind" operation. IMHO, the current behavior of "bind noop" makes more sense than the documented behavior, since it's really _not_ a special case at all, and the behavior is quite useful :-) However, an "unbind" operation that exactly undoes a "bind" operation should really exist, IMHO. > > In last December, Final Approved Consensus(1) was: > > > > | wish (unbind to generic) seems legitimate, but not as a replacement of > > | current behaviour (unbind to unbound). > > > > IMHO we should not change the noop behaviour, to not unnecessarilly > > break existing muttrcs. I'd say we shouldn't change noop simply because it makes more sense to have a function that does nothing, and "bind noop" simply binds to that function. (In fact, I'd promote noop into a standard function, so you can use it directly from RC scripts for all sorts of fun.) > > So manual needs more precision. The added new > > unbind to generic feature would need another command. Perhaps "unbind" Yes, please :-) > > or something as "bind map key generic". No, please! > > The behaviour of special case > > when map == generic has to be defined (Error? Do nothing? Bind noop?) > > and documented. The "unbind" approach doesn't have this special case to deal with, so we can save complexity, save documentation, and save many headaches. > Here is one more patch, which implements "bind map key generic." Nooooooooooo :-( Just my pair of pennies, - Dave -- Uncle Cosmo, why do they call this a word processor? It's simple, Skyler. You've seen what food processors do to food, right? Please visit this link: http://rotter.net/israel
Attachment:
pgpSOsdK1G0rs.pgp
Description: PGP signature