[OS X Emacs] Problem with key-description in Aquamacs 3.4

David Reitter david.reitter at gmail.com
Sun Mar 3 22:24:19 EST 2019


Hi,
Replying also on the mailing list.

It seems like you’ve diagnosed the problem.   I’m not comfortable changing key-description given that the error is, by and large, with SLIME.  Can we come up with a better solution for SLIME and submit a patch there?  Would `lookup-key’ work?

(The documentation says "For an approximate inverse of this, see ‘kbd’.”.   Your conclusion that key-description guarantees a certain format doesn’t follow, I would say, especially given that `kbd’ doesn’t nail down a representation either.)

> key-description is defined in C, and doesn't have any obvious conditioning context (like a dynamically-scoped variable) that would change its interpretation of lower case characters.


This could be added, and then one would patch SLIME if they were to accept such a patch.

David

> On Mar 3, 2019, at 8:28 PM, Robert Goldman <rpgoldman at sift.net> wrote:
> 
> This is the emacs on Mac OSX posting I sent, which seems to have gone into the bitbucket. I did some more research: the problem with SLIME is caused by the fact that they use key-description to generate a string that they then process.
> 
> This breaks badly on Aquamacs, because the Aquamacs version of key-description, unlike the stock one, translates, e.g. a to A and A to ⇧A.  I know why you do this, and I sort of sympathize. And I sort of think that the SLIME folks are doing the wrong thing, because they are using a description function to process input.
> 
> But, in their defense, the Emacs-lisp doc does say that key-description is supposed to be an approximate inverse of kbd, and this Aquamacs behavior violates that constraint.
> 
> So... any suggestions? I could send you the precise code snippet from slime.el if that would help. I had a long post to Aquamacs-devel, but that seems to be lost somehow. :-(
> 
> I'd dearly like to know why these mailing lists are shit-canning my messages....
> 
> Robert P. Goldman
> Research Fellow
> Smart Information Flow Technologies (d/b/a SIFT, LLC)
> 
> 319 N. First Ave., Suite 400
> Minneapolis, MN 55401
> 
> Voice: (612) 326-3934
> Email: rpgoldman at SIFT.net
> 
> Forwarded message:
> 
> From: Robert Goldman rpgoldman at sift.info
> To: Mac OSX Emacs mailing list macosx-emacs-request at email.esm.psu.edu
> Subject: Problem with key-description in Aquamacs 3.4
> Date: Fri, 01 Mar 2019 12:12:40 -0600
> 
> I am using Aquamacs 3.4, and I am having trouble with the function key-description, which is used in reading some characters in SLIME.
> 
> Briefly, the problem is that in Aquamacs (key-description "r") returns "R", which breaks SLIME's key lookup.
> 
> I have checked this against Emacs 25.2 on Linux, and there the same function call returns "r", which seems like The Right Thing.
> 
> key-description is defined in C, and doesn't have any obvious conditioning context (like a dynamically-scoped variable) that would change its interpretation of lower case characters.
> 
> Any suggestions you might have would be very much appreciated!
> 
> (And no, I have no idea why SLIME uses read-key-sequence filtered through key-description instead of using the raw key sequence.)
> 
> Thanks!
> 



More information about the MacOSX-Emacs mailing list