GNU bug report logs - #12174
24.1.50; C-h f and non-symbol remap targets

Previous Next

Package: emacs;

Reported by: Christopher Schmidt <christopher <at> ch.ristopher.com>

Date: Fri, 10 Aug 2012 22:05:02 UTC

Severity: normal

Found in version 24.1.50

Fixed in version 24.3

Done: Glenn Morris <rgm <at> gnu.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 12174 in the body.
You can then email your comments to 12174 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 bug-gnu-emacs <at> gnu.org:
bug#12174; Package emacs. (Fri, 10 Aug 2012 22:05:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Christopher Schmidt <christopher <at> ch.ristopher.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 10 Aug 2012 22:05:02 GMT) Full text and rfc822 format available.

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

From: Christopher Schmidt <christopher <at> ch.ristopher.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.1.50; C-h f and non-symbol remap targets
Date: Fri, 10 Aug 2012 22:55:42 +0100 (BST)
[Message part 1 (text/plain, inline)]
    (global-set-key [remap write-file] (lambda () (interactive) 'rms))
    C-h f write-file RET

This yields in an error because help-fns--key-bindings expects
(command-remapping 'write-file) to be a symbol.

Here is a patch that abbreviates non-symbol remap targets with "??".
This is consistent with what describe-bindings displays.
[help-fns--key-bindings.diff (text/x-diff, inline)]
=== modified file 'lisp/ChangeLog'
--- lisp/ChangeLog	2012-08-10 21:03:10 +0000
+++ lisp/ChangeLog	2012-08-10 21:53:48 +0000
@@ -1,3 +1,8 @@
+2012-08-10  Christopher Schmidt  <christopher <at> ch.ristopher.com>
+
+	* help-fns.el (help-fns--key-bindings): Abbreviate non-symbol
+	remap targets with ?? (Bug#).
+
 2012-08-10  Stefan Monnier  <monnier <at> iro.umontreal.ca>
 
 	* emacs-lisp/rx.el (rx-constituents): Don't define as constant.

=== modified file 'lisp/help-fns.el'
--- lisp/help-fns.el	2012-08-06 21:05:48 +0000
+++ lisp/help-fns.el	2012-08-10 21:28:18 +0000
@@ -398,7 +398,7 @@
                   (push key non-modified-keys)))
             (when remapped
               (princ "Its keys are remapped to `")
-              (princ (symbol-name remapped))
+              (princ (if (symbolp remapped) (symbol-name remapped) "??"))
               (princ "'.\n"))
 
             (when keys

[Message part 3 (text/plain, inline)]
        Christopher

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#12174; Package emacs. (Tue, 14 Aug 2012 18:22:02 GMT) Full text and rfc822 format available.

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

From: Christopher Schmidt <christopher <at> ch.ristopher.com>
To: bug-gnu-emacs <at> gnu.org
Subject: Re: bug#12174: 24.1.50; C-h f and non-symbol remap targets
Date: Tue, 14 Aug 2012 19:12:38 +0100 (BST)
[Message part 1 (text/plain, inline)]
Christopher Schmidt <christopher <at> ch.ristopher.com> writes:
> Here is a patch that abbreviates non-symbol remap targets with "??".
> This is consistent with what describe-bindings displays.

A sobering thought - ?? does not need to be quoted.
[help-fns--key-bindings-2.diff (text/x-diff, inline)]
=== modified file 'lisp/ChangeLog'
--- lisp/ChangeLog	2012-08-14 12:38:11 +0000
+++ lisp/ChangeLog	2012-08-14 13:46:05 +0000
@@ -1,3 +1,8 @@
+2012-08-14  Christopher Schmidt  <christopher <at> ch.ristopher.com>
+
+	* help-fns.el (help-fns--key-bindings): Abbreviate non-symbol
+	remap targets with ?? (Bug#12174).
+
 2012-08-14  Dmitry Gutov  <dgutov <at> yandex.ru>
 
 	* progmodes/ruby-mode.el: Improve percent literals (bug#6286).

=== modified file 'lisp/help-fns.el'
--- lisp/help-fns.el	2012-08-06 21:05:48 +0000
+++ lisp/help-fns.el	2012-08-14 13:44:48 +0000
@@ -397,9 +397,11 @@
               (if (member (event-modifiers (aref key 0)) '(nil (shift)))
                   (push key non-modified-keys)))
             (when remapped
-              (princ "Its keys are remapped to `")
-              (princ (symbol-name remapped))
-              (princ "'.\n"))
+              (princ "Its keys are remapped to ")
+              (princ (if (symbolp remapped)
+			 (concat "`" (symbol-name remapped) "'")
+		       "??"))
+              (princ ".\n"))
 
             (when keys
               (princ (if remapped

[Message part 3 (text/plain, inline)]
Please commit and/or close this bug report.

        Christopher

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#12174; Package emacs. (Wed, 15 Aug 2012 02:47:02 GMT) Full text and rfc822 format available.

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

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: bug-gnu-emacs <at> gnu.org
Subject: Re: bug#12174: 24.1.50; C-h f and non-symbol remap targets
Date: Tue, 14 Aug 2012 22:38:10 -0400
>> Here is a patch that abbreviates non-symbol remap targets with "??".
>> This is consistent with what describe-bindings displays.
> A sobering thought - ?? does not need to be quoted.

Actually, ?? is a bad choice, since it seems to imply that Emacs doesn't
even know what it's remapped to, whereas Emacs does know very well, it
just doesn't want to print it out in full because it would be ugly and
too verbose.
So I suggest we replace "??" with something like "an anonymous command".


        Stefan




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#12174; Package emacs. (Wed, 15 Aug 2012 08:43:02 GMT) Full text and rfc822 format available.

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

From: Christopher Schmidt <christopher <at> ch.ristopher.com>
To: bug-gnu-emacs <at> gnu.org
Subject: Re: bug#12174: 24.1.50; C-h f and non-symbol remap targets
Date: Wed, 15 Aug 2012 09:33:41 +0100 (BST)
[Message part 1 (text/plain, inline)]
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:
> Actually, ?? is a bad choice, since it seems to imply that Emacs
> doesn't even know what it's remapped to, whereas Emacs does know very
> well, it just doesn't want to print it out in full because it would be
> ugly and too verbose.  So I suggest we replace "??" with something
> like "an anonymous command".
[help-fns--key-bindings-3.diff (text/x-diff, inline)]
=== modified file 'lisp/ChangeLog'
--- lisp/ChangeLog	2012-08-15 07:58:34 +0000
+++ lisp/ChangeLog	2012-08-15 08:26:41 +0000
@@ -1,3 +1,8 @@
+2012-08-15  Christopher Schmidt  <christopher <at> ch.ristopher.com>
+
+	* help-fns.el (help-fns--key-bindings): Abbreviate non-symbol
+	remap targets (Bug#12174).
+
 2012-08-15  Chong Yidong  <cyd <at> gnu.org>
 
 	* frame.el (set-frame-font): Accept font objects.

=== modified file 'lisp/help-fns.el'
--- lisp/help-fns.el	2012-08-06 21:05:48 +0000
+++ lisp/help-fns.el	2012-08-15 08:27:33 +0000
@@ -397,9 +397,11 @@
               (if (member (event-modifiers (aref key 0)) '(nil (shift)))
                   (push key non-modified-keys)))
             (when remapped
-              (princ "Its keys are remapped to `")
-              (princ (symbol-name remapped))
-              (princ "'.\n"))
+              (princ "Its keys are remapped to ")
+              (princ (if (symbolp remapped)
+			 (concat "`" (symbol-name remapped) "'")
+		       "an anonymous command"))
+              (princ ".\n"))
 
             (when keys
               (princ (if remapped

[Message part 3 (text/plain, inline)]
        Christopher

Reply sent to Glenn Morris <rgm <at> gnu.org>:
You have taken responsibility. (Wed, 22 Aug 2012 07:03:02 GMT) Full text and rfc822 format available.

Notification sent to Christopher Schmidt <christopher <at> ch.ristopher.com>:
bug acknowledged by developer. (Wed, 22 Aug 2012 07:03:03 GMT) Full text and rfc822 format available.

Message #19 received at 12174-done <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: 12174-done <at> debbugs.gnu.org
Subject: Re: bug#12174: 24.1.50; C-h f and non-symbol remap targets
Date: Wed, 22 Aug 2012 03:02:16 -0400
Version: 24.3

Thanks; applied to trunk.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#12174; Package emacs. (Wed, 22 Aug 2012 07:23:01 GMT) Full text and rfc822 format available.

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

From: Dani Moncayo <dmoncayo <at> gmail.com>
To: 12174 <at> debbugs.gnu.org, rgm <at> gnu.org
Subject: Re: bug#12174: 24.1.50; C-h f and non-symbol remap targets
Date: Wed, 22 Aug 2012 09:21:40 +0200
On Wed, Aug 22, 2012 at 9:02 AM, Glenn Morris <rgm <at> gnu.org> wrote:
> Version: 24.3

One question: If some other severe bug arises upon the (not yet)
released Emacs 24.2, so that a 24.3 release becomes necessary (from
the emacs-24 branch), then the above tag will be incorrect, won't it?

It seems that the current versioning pattern has this problem.  We
don't know beforehand the version under which the current trunk code
will be released.

So, what about switching to a different pattern which doesn't have this problem?

For example: Name the next trunk's branch as "emacs-24.3", and every
release made from that branch would be labeled "emacs 24.3.x".

This way, we would know for sure that the trunk code would be released
as version "24.4" (or "25.1" -- what the maintainer's decide).

-- 
Dani Moncayo




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#12174; Package emacs. (Wed, 22 Aug 2012 07:25:01 GMT) Full text and rfc822 format available.

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

From: Glenn Morris <rgm <at> gnu.org>
To: Dani Moncayo <dmoncayo <at> gmail.com>
Cc: 12174 <at> debbugs.gnu.org
Subject: Re: bug#12174: 24.1.50; C-h f and non-symbol remap targets
Date: Wed, 22 Aug 2012 03:24:05 -0400
Dani Moncayo wrote:

> On Wed, Aug 22, 2012 at 9:02 AM, Glenn Morris <rgm <at> gnu.org> wrote:
>> Version: 24.3
>
> One question: If some other severe bug arises upon the (not yet)
> released Emacs 24.2, so that a 24.3 release becomes necessary (from
> the emacs-24 branch), then the above tag will be incorrect, won't it?

Yes, it's a (minor) problem. I suggest discussing it on emacs-devel
rather than here though.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 19 Sep 2012 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 11 years and 242 days ago.

Previous Next


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