GNU bug report logs - #79485
31.0.50; Loaded files inherit read-symbol-shorthands

Previous Next

Package: emacs;

Reported by: "David J. Rosenbaum" <djr7c4 <at> gmail.com>

Date: Sun, 21 Sep 2025 23:59:01 UTC

Severity: normal

Found in version 31.0.50

Full log


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

From: João Távora <joaotavora <at> gmail.com>
To: David Rosenbaum <djr7c4 <at> gmail.com>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 79485 <at> debbugs.gnu.org
Subject: Re: bug#79485: 31.0.50; Loaded files inherit read-symbol-shorthands
Date: Mon, 22 Sep 2025 18:56:54 +0100
[Message part 1 (text/plain, inline)]
On Mon, Sep 22, 2025 at 6:49 PM David Rosenbaum <djr7c4 <at> gmail.com> wrote:

> > Are these packages even in Emacs?
>
> IMO using shorthands in this way is a natural way to abbreviate long
> symbols. AFAICT, there is no other way to do so without polluting the
> global namespace. I'm open to alternatives if there's another preferred way
> to handle this use case. defalias is an obvious option but of course that
> pollutes the global namespace.
>

Polluting the global namespace is the name of the game in Elisp (and C).
Shorthands are just lipstick on a pig.  Prior to shorthands, there was
namespacing etiquette, and there still us. This means you should pick a
`consistent-longish-prefix-` for your consistent-longish-prefix.el
library.  This still holds. But it's a pain to type and read for some of
us. Shorthands are just to summarize that prefix to 'clp-'.  Any other use
is haphazard (opens the door to shadowing etc).

But what you reported is a bug, no doubt.  And fairly serious.  I never
intended for things to work like that.

João
[Message part 2 (text/html, inline)]

This bug report was last modified today.

Previous Next


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