GNU bug report logs - #7727
describe-key doesn't tell whole redirect sequence

Previous Next

Package: emacs;

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.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 7727 in the body.
You can then email your comments to 7727 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#7727; Package emacs. (Fri, 24 Dec 2010 15:17:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to jidanni <at> jidanni.org:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 24 Dec 2010 15:17:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: jidanni <at> jidanni.org
To: yamaoka <at> jpl.org
Cc: bug-gnu-emacs <at> gnu.org, ding <at> gnus.org
Subject: describe-key doesn't tell whole redirect sequence
Date: Fri, 24 Dec 2010 23:22:56 +0800
>>>>> "KY" == Katsumi Yamaoka <yamaoka <at> jpl.org> writes:
KY> jidanni <at> 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?




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#7727; Package emacs. (Sun, 02 Jan 2011 06:09:01 GMT) Full text and rfc822 format available.

Message #8 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
To: bug-gnu-emacs <at> gnu.org
Cc: ding <at> gnus.org
Subject: Re: describe-key doesn't tell whole redirect sequence
Date: Sun, 02 Jan 2011 06:58:21 +0100
jidanni <at> 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 <at> gnus.org * Lars Magne Ingebrigtsen





Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#7727; Package emacs. (Sat, 22 Jan 2011 23:55:02 GMT) Full text and rfc822 format available.

Message #11 received at 7727 <at> debbugs.gnu.org (full text, mbox):

From: Chong Yidong <cyd <at> stupidchicken.com>
To: jidanni <at> jidanni.org
Cc: yamaoka <at> jpl.org, 7727 <at> debbugs.gnu.org, ding <at> gnus.org
Subject: Re: bug#7727: describe-key doesn't tell whole redirect sequence
Date: Sat, 22 Jan 2011 19:02:29 -0500
jidanni <at> 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.




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#7727; Package emacs. (Sun, 23 Jan 2011 01:14:02 GMT) Full text and rfc822 format available.

Message #14 received at 7727 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Chong Yidong <cyd <at> stupidchicken.com>
Cc: yamaoka <at> jpl.org, 7727 <at> debbugs.gnu.org, ding <at> gnus.org, jidanni <at> jidanni.org
Subject: Re: bug#7727: describe-key doesn't tell whole redirect sequence
Date: Sun, 23 Jan 2011 02:19:48 +0100
Chong Yidong <cyd <at> 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 <at> gnus.org * Lars Magne Ingebrigtsen




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#7727; Package emacs. (Mon, 24 Jan 2011 00:57:01 GMT) Full text and rfc822 format available.

Message #17 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: jidanni <at> jidanni.org
Cc: 7727-close <at> debbugs.gnu.org, yamaoka <at> jpl.org, bug-gnu-emacs <at> gnu.org,
	ding <at> gnus.org
Subject: Re: describe-key doesn't tell whole redirect sequence
Date: Sun, 23 Jan 2011 17:04:22 -0800
jidanni <at> 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 <at> gnus.org * Lars Magne Ingebrigtsen




Reply sent to Lars Ingebrigtsen <larsi <at> gnus.org>:
You have taken responsibility. (Mon, 24 Jan 2011 00:57:02 GMT) Full text and rfc822 format available.

Notification sent to jidanni <at> jidanni.org:
bug acknowledged by developer. (Mon, 24 Jan 2011 00:57:02 GMT) Full text and rfc822 format available.

Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#7727; Package emacs. (Mon, 24 Jan 2011 01:17:01 GMT) Full text and rfc822 format available.

Message #25 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: jidanni <at> jidanni.org
Cc: 7727-close <at> debbugs.gnu.org, yamaoka <at> jpl.org, bug-gnu-emacs <at> gnu.org,
	ding <at> gnus.org
Subject: Re: describe-key doesn't tell whole redirect sequence
Date: Sun, 23 Jan 2011 17:24:07 -0800
Lars Ingebrigtsen <larsi <at> 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 <at> gnus.org * Lars Magne Ingebrigtsen




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#7727; Package emacs. (Mon, 24 Jan 2011 16:24:01 GMT) Full text and rfc822 format available.

Message #29 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 7727-close <at> debbugs.gnu.org, yamaoka <at> jpl.org, bug-gnu-emacs <at> gnu.org,
	ding <at> gnus.org, jidanni <at> jidanni.org
Subject: Re: bug#7727: describe-key doesn't tell whole redirect sequence
Date: Mon, 24 Jan 2011 11:31:31 -0500
>> 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




Message #31 received at 7727-close <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 7727-close <at> debbugs.gnu.org, yamaoka <at> jpl.org, bug-gnu-emacs <at> gnu.org,
	ding <at> gnus.org, jidanni <at> jidanni.org
Subject: Re: bug#7727: describe-key doesn't tell whole redirect sequence
Date: Mon, 24 Jan 2011 14:01:36 -0800
Stefan Monnier <monnier <at> 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 <at> gnus.org * Lars Magne Ingebrigtsen




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#7727; Package emacs. (Mon, 24 Jan 2011 22:34:01 GMT) Full text and rfc822 format available.

Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#7727; Package emacs. (Tue, 25 Jan 2011 03:02:01 GMT) Full text and rfc822 format available.

Message #37 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 7727debbugs.gnu.org <at> pastel.home, bug-gnu-emacs <at> gnu.org, yamaoka <at> jpl.org,
	ding <at> gnus.org, jidanni <at> jidanni.org
Subject: Re: bug#7727: describe-key doesn't tell whole redirect sequence
Date: Mon, 24 Jan 2011 22:09:10 -0500
>> 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




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#7727; Package emacs. (Tue, 25 Jan 2011 09:36:02 GMT) Full text and rfc822 format available.

Message #40 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: bug-gnu-emacs <at> gnu.org
Cc: ding <at> gnus.org
Subject: Re: bug#7727: describe-key doesn't tell whole redirect sequence
Date: Tue, 25 Jan 2011 01:31:33 -0800
Stefan Monnier <monnier <at> 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 <at> gnus.org * Lars Magne Ingebrigtsen





bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 22 Feb 2011 12:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 14 years and 116 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.