From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Newsgroups: gmane.emacs.bugs Subject: bug#59082: 28.2; Undocumented `intern-soft` feature with shorthands symbols Date: Sat, 12 Nov 2022 16:47:54 +0000 Message-ID: References: <875yfresq9.fsf@posteo.net> <831qq8ny2m.fsf@gnu.org> <87leog4018.fsf@posteo.net> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000413e6f05ed48c596" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18247"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , 59082@debbugs.gnu.org To: Thierry Volpiatto Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Nov 12 17:49:25 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1otth7-0004Xt-4q for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 12 Nov 2022 17:49:25 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ottgl-0003TA-Qe; Sat, 12 Nov 2022 11:49:03 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ottgk-0003T1-85 for bug-gnu-emacs@gnu.org; Sat, 12 Nov 2022 11:49:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ottgk-00037y-01 for bug-gnu-emacs@gnu.org; Sat, 12 Nov 2022 11:49:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ottgj-0007Be-Ry for bug-gnu-emacs@gnu.org; Sat, 12 Nov 2022 11:49:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 12 Nov 2022 16:49:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59082 X-GNU-PR-Package: emacs Original-Received: via spool by 59082-submit@debbugs.gnu.org id=B59082.166827169327571 (code B ref 59082); Sat, 12 Nov 2022 16:49:01 +0000 Original-Received: (at 59082) by debbugs.gnu.org; 12 Nov 2022 16:48:13 +0000 Original-Received: from localhost ([127.0.0.1]:48875 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ottfx-0007Ac-4Z for submit@debbugs.gnu.org; Sat, 12 Nov 2022 11:48:13 -0500 Original-Received: from mail-oo1-f44.google.com ([209.85.161.44]:38403) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ottfv-0007AF-Sv for 59082@debbugs.gnu.org; Sat, 12 Nov 2022 11:48:12 -0500 Original-Received: by mail-oo1-f44.google.com with SMTP id g15-20020a4a894f000000b0047f8e899623so1043907ooi.5 for <59082@debbugs.gnu.org>; Sat, 12 Nov 2022 08:48:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=8W27JJXOuv62YlrZI9jVUEFEzQwrm11l9kky9EeSqMQ=; b=X6c+ChSZ36tB98Hp1LHwk1bWDkFa0RbDHkFVyFBx1VgzofDoc1D4ZF9IzlGq6fugrW v6jfZ1BHKK9e3ujUqzdz+ZEheDOeRIU0XEe/fcut2ElO4/alGcRgwYotrQIMYhBXfOO0 92v+15WzJSHs5QDW6XWpj7oncdspF+PoQWHAtosiqQcwRXmG15PFkAIDJsqmSC6+sJAv +yjOrksLKqRRyOZLp815goVDTn0xFYhkocRyHMJk5thS7nmL9LzN686rWZpgwyoYxFSR MR9uYwGiI+WIp2k+BvUF43VJ9RXSiXQBolI61iKcp5tCqc7CpyNar9HGkLn7CCM9Cw12 iArg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=8W27JJXOuv62YlrZI9jVUEFEzQwrm11l9kky9EeSqMQ=; b=rlzA9TFR8uwFu0az5Or0ge+eAJzOvINqj83hh6+FH72pOiTF0Vv/pD+J6cifoRneVP fH4R6RcJV99vcbuLzmGRjAY1DUQb6YdTVH7VJrfQ/6srRTfq0WCvY4AYvBElpBDsowGA 14GBRo+t5JC9WJk8BjH9/AexCmn7h2SWX1wVyvQVX86kTsXMoUSbzFCXKUR19VbCXyA6 ln9Ddn+zAe1HeUnuHv3cQFqEM/r/pK3/9btzBhA5x/88iMJpirl3U0Fzc6j5Ci78X2fV Ou00jDYYXYJzcl2zAKtxDjzOS4aTbaZQNqjciYgmXtE0X/Pt2sLrkUFBThzmpoBXF4qy NWGQ== X-Gm-Message-State: ANoB5pkU6V4DgyDFLAuxDOczHU7O4kv2S66mC8th3Rqi3QMyf/VIdSLz GmxIr+dF7nftEs66vmHM8qWFFfxmGWyZMgAHibo= X-Google-Smtp-Source: AA0mqf7+WI4hh2Mz0cp+Z9DRkNNml2BFBky5pzNpSjmfXE6LFTmHC0ckiOtA3kmGqblCUSspS6a7A+Ff4KFOcxQfWu0= X-Received: by 2002:a4a:de96:0:b0:49f:c9c:5f3d with SMTP id v22-20020a4ade96000000b0049f0c9c5f3dmr2928536oou.41.1668271686367; Sat, 12 Nov 2022 08:48:06 -0800 (PST) In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:247668 Archived-At: --000000000000413e6f05ed48c596 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable We can/should of course document the decision that they aren't supported in rubbed in the manual though (if we make that decision)... Jo=C3=A3o On Sat, Nov 12, 2022, 16:46 Jo=C3=A3o T=C3=A1vora wr= ote: > Hmm, not sure we should be using shorthands in docstrings, which aren't > read by the Lisp reader, but by something else... This is what is at stak= e, > right? > > Maybe if good reasonable semantics can be found, but not sure. > > On Sat, Nov 12, 2022, 16:20 Thierry Volpiatto wrote: > >> >> Jo=C3=A3o T=C3=A1vora writes: >> >> > This is a feature of Lisp in general and the correct way to go from >> > strings to symbols. >> >> Great, thanks to confirm. >> >> > 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. >> >> `substitute-command-keys` at least doesn't handle this. >> >> Say you have the file foo.el with >> `read-symbol-shorthands` =3D=3D (("f-" . "foo-")) and containing definit= ions >> like `f-dothis`, `f-dothat` etc... and a var `f-help-string` containing >> string like >> "\\[f-dothis]: Description", if you define a function `f-help` >> containing (substitute-command-keys f-help-string) it will fail >> complaining `f-dothis` is void. >> >> -- >> Thierry >> > --000000000000413e6f05ed48c596 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
We can/should of course document the decision that they a= ren't supported in rubbed in the manual though (if we make that decisio= n)...

Jo=C3=A3o
On Sat, N= ov 12, 2022, 16:46 Jo=C3=A3o T=C3=A1vora <joaotavora@gmail.com> wrote:
Hmm, not sure we should be using shorthands in= docstrings, which aren't read by the Lisp reader, but by something els= e... This is what is at stake, right?

Maybe if good reasonable semantics can be found, but not sure.

On Sat, Nov 12, 2022, 16:20 Thierry Volpiatto <thievol@pos= teo.net> wrote:

Jo=C3=A3o T=C3=A1vora <joaotavora@gmail.com&= gt; writes:

> This is a feature of Lisp in general and the correct way to go from > strings to symbols.

Great, thanks to confirm.

> 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.
`substitute-command-keys` at least doesn't handle this.

Say you have the file foo.el with
`read-symbol-shorthands` =3D=3D (("f-" . "foo-")) and c= ontaining definitions
like `f-dothis`, `f-dothat` etc... and a var `f-help-string` containing str= ing like
"\<f-map>\[f-dothis]: Description", if you define a functio= n `f-help`
containing (substitute-command-keys f-help-string) it will fail
complaining `f-dothis` is void.

--
Thierry
--000000000000413e6f05ed48c596--