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


View this message in rfc822 format

From: David Rosenbaum <djr7c4 <at> gmail.com>
To: João Távora <joaotavora <at> gmail.com>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 79485 <at> debbugs.gnu.org
Subject: bug#79485: 31.0.50; Loaded files inherit read-symbol-shorthands
Date: Mon, 22 Sep 2025 10:48:48 -0700
[Message part 1 (text/plain, inline)]
> 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.

> I see the problem and have reproduced it. It's a bug. And I don't
understand it.

Yeah. It's a strange one.

On Mon, Sep 22, 2025, 10:28 AM João Távora <joaotavora <at> gmail.com> wrote:

> On Mon, Sep 22, 2025 at 6:04 PM David Rosenbaum <djr7c4 <at> gmail.com> wrote:
> >
> > > Also they were designed to abbreviate prefixes, not full symbol names,
> so the db idea is probably not going to work. As far as I remember, these
> things were well explained in the manual...
> >
> > Intended or not, shorthands are being used this way by packages authors.
> For example, see cond-let and llama.
>
>
> Are these packages even in Emacs?
>
> > > By the way, I understand the problem easily now. The symbol 'dbus' has
> the prefix 'db' and when the example file is read 'dbus' becomes
> 'cl-destructuring-bindus'. This happens at read-time well before evaluation
> or byte-compilation.
> >
> > (require 'dbus) isn't in the example file though. It's in tramp-gvfs
> which was precompiled when emacs was built. It is tramp-gvfs that is
> required from the example file.
>
> I see the problem and have reproduced it.  It's a bug.  And I don't
> understand it.  The `tramp-gvfs` file should have been read long before the
> shorthand was established in in the example file.
>
[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.