* describe-key doesn't tell whole redirect sequence
[not found] <b4maajvl6t0.fsf@jpl.org>
@ 2010-12-24 15:22 ` jidanni
2011-01-02 5:58 ` Lars Magne Ingebrigtsen
` (3 more replies)
0 siblings, 4 replies; 10+ messages in thread
From: jidanni @ 2010-12-24 15:22 UTC (permalink / raw)
To: yamaoka; +Cc: ding, bug-gnu-emacs
>>>>> "KY" == Katsumi Yamaoka <yamaoka@jpl.org> writes:
KY> jidanni@jidanni.org wrote:
>> Gentlemen, in http:///jidanni.org/comp/configuration/.gnus.el
>> I do (put 'gnus-summary-edit-article 'disabled t)
>> That works in the *Summary* buffer, but not the *Article* buffer,
>> despite in both places describe-key saying
>> "e runs the command gnus-summary-edit-article".
>> What gives?
>> gnus-version "Gnus v5.13"
KY> The real command that the "e" key is bound to in the article
KY> buffer is `gnus-article-read-summary-keys', which is used to
KY> invoke the summary commands from the article buffer and will
KY> interpret it into:
KY> (call-interactively 'gnus-summary-edit-article)
KY> But it doesn't work for the `disabled' flag as if the command is
KY> actually and directly invoked interactively. I'm not capable to
KY> improve it, sorry.
I see. So the real bug is in the describe-key function, not telling the
user all the details! I'll Cc bug-gnu-emacs!
I also note one sees Describe Key: e-
in the minibuffer, with a "-" added.
Anyway, how can I disable it in the *Article* buffer too?
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: describe-key doesn't tell whole redirect sequence
2010-12-24 15:22 ` describe-key doesn't tell whole redirect sequence jidanni
@ 2011-01-02 5:58 ` Lars Magne Ingebrigtsen
2011-01-23 0:02 ` bug#7727: " Chong Yidong
` (2 subsequent siblings)
3 siblings, 0 replies; 10+ messages in thread
From: Lars Magne Ingebrigtsen @ 2011-01-02 5:58 UTC (permalink / raw)
To: ding; +Cc: bug-gnu-emacs
jidanni@jidanni.org writes:
> Anyway, how can I disable it in the *Article* buffer too?
Bind "e" to undefined.
--
(domestic pets only, the antidote for overdose, milk.)
larsi@gnus.org * Lars Magne Ingebrigtsen
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#7727: describe-key doesn't tell whole redirect sequence
2010-12-24 15:22 ` describe-key doesn't tell whole redirect sequence jidanni
2011-01-02 5:58 ` Lars Magne Ingebrigtsen
@ 2011-01-23 0:02 ` Chong Yidong
[not found] ` <87r5c4bi7e.fsf@stupidchicken.com>
2011-01-24 1:04 ` Lars Ingebrigtsen
3 siblings, 0 replies; 10+ messages in thread
From: Chong Yidong @ 2011-01-23 0:02 UTC (permalink / raw)
To: jidanni; +Cc: yamaoka, 7727, ding
jidanni@jidanni.org writes:
> KY> The real command that the "e" key is bound to in the article
> KY> buffer is `gnus-article-read-summary-keys'
>
> I see. So the real bug is in the describe-key function, not telling the
> user all the details! I'll Cc bug-gnu-emacs!
It's not a bug in describe-key, because that's apparently not the
command run by `C-h k' in Gnus article buffers:
C-h k runs the command gnus-article-describe-key, which is an
interactive compiled Lisp function in `gnus-art.el'.
It is bound to C-h k.
Indeed, doing `M-x describe-key' instead of `C-h k' returns
gnus-article-read-summary-keys, as expected. Dunno what the purpose of
gnus-article-describe-key is.
Bouncing back to the Gnus developers.
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#7727: describe-key doesn't tell whole redirect sequence
[not found] ` <87r5c4bi7e.fsf@stupidchicken.com>
@ 2011-01-23 1:19 ` Lars Ingebrigtsen
0 siblings, 0 replies; 10+ messages in thread
From: Lars Ingebrigtsen @ 2011-01-23 1:19 UTC (permalink / raw)
To: Chong Yidong; +Cc: yamaoka, 7727, ding, jidanni
Chong Yidong <cyd@stupidchicken.com> writes:
> Indeed, doing `M-x describe-key' instead of `C-h k' returns
> gnus-article-read-summary-keys, as expected. Dunno what the purpose of
> gnus-article-describe-key is.
It tries to determine what the command really being called (in the
summary buffer) is.
--
(domestic pets only, the antidote for overdose, milk.)
larsi@gnus.org * Lars Magne Ingebrigtsen
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: describe-key doesn't tell whole redirect sequence
2010-12-24 15:22 ` describe-key doesn't tell whole redirect sequence jidanni
` (2 preceding siblings ...)
[not found] ` <87r5c4bi7e.fsf@stupidchicken.com>
@ 2011-01-24 1:04 ` Lars Ingebrigtsen
2011-01-24 1:24 ` Lars Ingebrigtsen
3 siblings, 1 reply; 10+ messages in thread
From: Lars Ingebrigtsen @ 2011-01-24 1:04 UTC (permalink / raw)
To: jidanni; +Cc: yamaoka, 7727-close, bug-gnu-emacs, ding
jidanni@jidanni.org writes:
> KY> (call-interactively 'gnus-summary-edit-article)
>
> KY> But it doesn't work for the `disabled' flag as if the command is
> KY> actually and directly invoked interactively. I'm not capable to
> KY> improve it, sorry.
>
> I see. So the real bug is in the describe-key function, not telling the
> user all the details! I'll Cc bug-gnu-emacs!
I don't think this is a bug. None of the commands in the article buffer
are regular commands, and you can't disable them with
(put 'gnus-summary-edit-article 'disabled t)
If you want to redefine commands in the article buffer, you have to bind
their keys.
--
(domestic pets only, the antidote for overdose, milk.)
larsi@gnus.org * Lars Magne Ingebrigtsen
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: describe-key doesn't tell whole redirect sequence
2011-01-24 1:04 ` Lars Ingebrigtsen
@ 2011-01-24 1:24 ` Lars Ingebrigtsen
2011-01-24 16:31 ` bug#7727: " Stefan Monnier
0 siblings, 1 reply; 10+ messages in thread
From: Lars Ingebrigtsen @ 2011-01-24 1:24 UTC (permalink / raw)
To: jidanni; +Cc: 7727-close, yamaoka, bug-gnu-emacs, ding
Lars Ingebrigtsen <larsi@gnus.org> writes:
> I don't think this is a bug. None of the commands in the article buffer
> are regular commands, and you can't disable them with
>
> (put 'gnus-summary-edit-article 'disabled t)
On the other hand, the article mode key translation thingie could just
check for 'disabled itself. Now fixed.
--
(domestic pets only, the antidote for overdose, milk.)
larsi@gnus.org * Lars Magne Ingebrigtsen
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: bug#7727: describe-key doesn't tell whole redirect sequence
2011-01-24 1:24 ` Lars Ingebrigtsen
@ 2011-01-24 16:31 ` Stefan Monnier
2011-01-24 22:01 ` Lars Ingebrigtsen
0 siblings, 1 reply; 10+ messages in thread
From: Stefan Monnier @ 2011-01-24 16:31 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: jidanni, 7727-close, yamaoka, bug-gnu-emacs, ding
>> I don't think this is a bug. None of the commands in the article buffer
>> are regular commands, and you can't disable them with
>> (put 'gnus-summary-edit-article 'disabled t)
> On the other hand, the article mode key translation thingie could just
> check for 'disabled itself. Now fixed.
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.
Stefan
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: bug#7727: describe-key doesn't tell whole redirect sequence
2011-01-24 16:31 ` bug#7727: " Stefan Monnier
@ 2011-01-24 22:01 ` Lars Ingebrigtsen
2011-01-25 3:09 ` Stefan Monnier
0 siblings, 1 reply; 10+ messages in thread
From: Lars Ingebrigtsen @ 2011-01-24 22:01 UTC (permalink / raw)
To: Stefan Monnier; +Cc: jidanni, 7727-close, yamaoka, bug-gnu-emacs, ding
Stefan Monnier <monnier@iro.umontreal.ca> writes:
> 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.
--
(domestic pets only, the antidote for overdose, milk.)
larsi@gnus.org * Lars Magne Ingebrigtsen
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: bug#7727: describe-key doesn't tell whole redirect sequence
2011-01-24 22:01 ` Lars Ingebrigtsen
@ 2011-01-25 3:09 ` Stefan Monnier
2011-01-25 9:31 ` Lars Ingebrigtsen
0 siblings, 1 reply; 10+ messages in thread
From: Stefan Monnier @ 2011-01-25 3:09 UTC (permalink / raw)
To: Lars Ingebrigtsen
Cc: jidanni, 7727debbugs.gnu.org, yamaoka, bug-gnu-emacs, ding
>> 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
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: bug#7727: describe-key doesn't tell whole redirect sequence
2011-01-25 3:09 ` Stefan Monnier
@ 2011-01-25 9:31 ` Lars Ingebrigtsen
0 siblings, 0 replies; 10+ messages in thread
From: Lars Ingebrigtsen @ 2011-01-25 9:31 UTC (permalink / raw)
To: ding; +Cc: bug-gnu-emacs
Stefan Monnier <monnier@iro.umontreal.ca> writes:
> 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.
Sounds good to me. The `gnus-article-read-summary-keys' thing doesn't
work perfectly anyway, with some prefixed complex key bindings, if I
remember correctly.
--
(domestic pets only, the antidote for overdose, milk.)
larsi@gnus.org * Lars Magne Ingebrigtsen
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2011-01-25 9:31 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <b4maajvl6t0.fsf@jpl.org>
2010-12-24 15:22 ` describe-key doesn't tell whole redirect sequence jidanni
2011-01-02 5:58 ` Lars Magne Ingebrigtsen
2011-01-23 0:02 ` bug#7727: " Chong Yidong
[not found] ` <87r5c4bi7e.fsf@stupidchicken.com>
2011-01-23 1:19 ` Lars Ingebrigtsen
2011-01-24 1:04 ` Lars Ingebrigtsen
2011-01-24 1:24 ` Lars Ingebrigtsen
2011-01-24 16:31 ` bug#7727: " Stefan Monnier
2011-01-24 22:01 ` Lars Ingebrigtsen
2011-01-25 3:09 ` Stefan Monnier
2011-01-25 9:31 ` Lars Ingebrigtsen
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.