all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "João Távora" <joaotavora@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: Thierry Volpiatto <thievol@posteo.net>, 59082@debbugs.gnu.org
Subject: bug#59082: 28.2; Undocumented `intern-soft` feature with shorthands symbols
Date: Sat, 12 Nov 2022 13:22:28 +0000	[thread overview]
Message-ID: <CALDnm51ij3BvBjB39Ej8+xU_z0CaiqHsVMpJ=LSn=NuHjbvgGw@mail.gmail.com> (raw)
In-Reply-To: <831qq8ny2m.fsf@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 1222 bytes --]

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@gnu.org> wrote:

> > From: Thierry Volpiatto <thievol@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.
>

[-- Attachment #2: Type: text/html, Size: 1728 bytes --]

  reply	other threads:[~2022-11-12 13:22 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-06 20:16 bug#59082: 28.2; Undocumented `intern-soft` feature with shorthands symbols Thierry Volpiatto
2022-11-12 12:42 ` Eli Zaretskii
2022-11-12 13:22   ` João Távora [this message]
2022-11-12 16:06     ` Thierry Volpiatto
2022-11-12 16:46       ` João Távora
2022-11-12 16:47         ` João Távora
2022-11-12 17:01         ` Eli Zaretskii
2022-11-12 17:18           ` João Távora
2022-11-12 17:49             ` Eli Zaretskii
2022-11-12 18:14               ` João Távora
2022-11-14  3:13                 ` Richard Stallman
2022-11-14  6:39                   ` João Távora
2022-11-14 13:11                     ` Eli Zaretskii
2022-11-14 13:38                       ` João Távora
2022-11-14 13:05                   ` Eli Zaretskii
2022-11-14 13:36                     ` João Távora
2022-11-14 13:56                       ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CALDnm51ij3BvBjB39Ej8+xU_z0CaiqHsVMpJ=LSn=NuHjbvgGw@mail.gmail.com' \
    --to=joaotavora@gmail.com \
    --cc=59082@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=thievol@posteo.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.