GNU bug report logs -
#7727
describe-key doesn't tell whole redirect sequence
Previous Next
Reported by: jidanni <at> jidanni.org
Date: Fri, 24 Dec 2010 15:17:01 UTC
Severity: normal
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
>> A cleaner could look like the following: add dynamic keymaps to Emacs,
>> where "dynamic keymaps" are represented as functions/objects a bit like
>> functional completion tables.
> Hm... how would that work?
> The complicated run-summary-commands-from-the-article-buffer thing is
> quite, er, complicated, because some commands need to keep the window
> conf, while others shouldn't, and stuff.
I haven't worked it out, so I can't really answer. In PCL-CVS I had
a similar situation, except that I used a prefix key, so <prefix> <key>
in a derived buffer would call the command bound to <prefix> in the main
buffer, so I didn't need to play tricks with the keymap. But I had to
make the commands themselves work in "any" buffer, and indeed, that had
to be done differently for each command.
How would the dynamic keymap enter the picture: rather than substitute
"undefined => gnus-article-read-summary-keys" and fool around
describe-key and friends, you'd set article-mode's parent keymap to
a dynamic keymap, i.e. a function that takes the current key as argument
and needs to return the command to which this key is bound (or nil), so
this function can lookup summary mode's keymap and return a command that
performs <summary-command> but that works from the article buffer.
You can do this last step either by making all summary command work in
the article buffer (as I did in PCL-CVS) or by dynamically wrapping the
command into a new command (which would do something similar to
gnus-article-read-summary-keys, except it takes the <summary-command>
as argument rather than a key-sequence).
The main benefit is that the keymapping is made clear to describe-key,
so you wouldn't need gnus-article-describe-key and friends. Of course,
all this is hypothetical since we don't have dynamic keymaps.
As for me, the main reason why I want dynamic keymaps is for use in
function-key-map where I'd move most of the "fallback" thingies from
read-key-sequence (e.g. A => a, double-mouse-2 => mouse-2, down-mouse-2
=> nil, ...) and where we could place generic remappings like "any
modifiers + mouse-4 => same modifiers + wheel-up".
Stefan
This bug report was last modified 14 years and 117 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.