GNU bug report logs - #59082
28.2; Undocumented `intern-soft` feature with shorthands symbols

Previous Next

Package: emacs;

Reported by: Thierry Volpiatto <thievol <at> posteo.net>

Date: Sun, 6 Nov 2022 20:26:02 UTC

Severity: normal

Found in version 28.2

Full log


View this message in rfc822 format

From: João Távora <joaotavora <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: Thierry Volpiatto <thievol <at> posteo.net>, 59082 <at> debbugs.gnu.org
Subject: bug#59082: 28.2; Undocumented `intern-soft` feature with shorthands symbols
Date: Sat, 12 Nov 2022 13:22:28 +0000
[Message part 1 (text/plain, inline)]
Thierry is correct. Intern-soft is Emacs way to go from a string
representation to the symbol itself (or nowhere, if there's no match). This
is not new with shorthands.

Should we document this in the Elisp manual? Maybe, but where? Shorthand
section? Not sure. This is a feature of Lisp in general and the correct way
to go from strings to symbols. Before shorthands we got away without this
step for obvious reasons. Curiously, I was pleasantly surprised that much
code of key symbol processing facilities was already using this indirection
and shorthands automatically worked in those facilities because of that.

João

On Sat, Nov 12, 2022, 12:43 Eli Zaretskii <eliz <at> gnu.org> wrote:

> > From: Thierry Volpiatto <thievol <at> posteo.net>
> > Date: Sun, 06 Nov 2022 20:16:48 +0000
> >
> > after having hard time getting the longhand name of a shorthand symbol
> > at point (with regexp and the local value of read-symbol-shorthands) I
> > discover it is easy to get this information with:
> >
> >     (symbol-name (intern-soft (thing-at-point 'symbol)))
> >
> > Is this the right way to get this information and if so is it
> > possible to document it?
>
> João, any comments?
>
> Thanks.
>
[Message part 2 (text/html, inline)]

This bug report was last modified 2 years and 217 days ago.

Previous Next


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