Subject: Feature request: expand IELM working buffer's read-symbol shorthands

From: Brandon Irizarry <[email-masked]>
Date: Mon, 11 Dec 2023 10:59:48 -0500

I'm currently running Emacs master branch (I just pulled and rebuilt a few
minutes ago).

I think it would be nice if IELM let you use the read-symbol shorthands you
first defined
in the buffer you now set as your IELM working buffer.

For example, say I edit /tmp/example.el, in the buffer "example.el". It
contains
the following:

(symbol-name 't-foo)

;; Local Variables:
;; read-symbol-shorthands: (("t-" . "tmp-"))
;; End:

If I evaluate the call to symbol-name, I get "tmp-foo", which is expected.
Now, let's say I open IELM, and
set my working buffer to "example.el". I can evaluate
read-symbol-shorthands:

ELISP> read-symbol-shorthands
(("t-" . "tmp-"))

This makes sense, since these are the shorthands for the working buffer.
But I can't actually use them! For example,
if I evaluate (symbol-name 't-foo) in the IELM session, I get "t-foo".
Unlike, say, in the minibuffer, the shorthand
isn't expanded in this context.

Ideally, the shorthand should be expanded, and I should be able to get
completion for things that use shorthands, just
as I would in the original buffer.

What do folks think here?

- Brandon