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:46:51 +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="00000000000084517705ed48c180" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="13159"; 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:48:20 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 1ottg3-0003F7-Ga for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 12 Nov 2022 17:48:19 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ottfo-0003G1-Dr; Sat, 12 Nov 2022 11:48:04 -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 1ottfn-0003Ft-9M for bug-gnu-emacs@gnu.org; Sat, 12 Nov 2022 11:48:03 -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 1ottfm-0002ya-Qo for bug-gnu-emacs@gnu.org; Sat, 12 Nov 2022 11:48:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ottfm-00079j-Gl for bug-gnu-emacs@gnu.org; Sat, 12 Nov 2022 11:48:02 -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:48:02 +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.166827163127324 (code B ref 59082); Sat, 12 Nov 2022 16:48:02 +0000 Original-Received: (at 59082) by debbugs.gnu.org; 12 Nov 2022 16:47:11 +0000 Original-Received: from localhost ([127.0.0.1]:48871 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ottew-00076e-KL for submit@debbugs.gnu.org; Sat, 12 Nov 2022 11:47:11 -0500 Original-Received: from mail-ot1-f51.google.com ([209.85.210.51]:41973) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ottev-00076R-Cu for 59082@debbugs.gnu.org; Sat, 12 Nov 2022 11:47:09 -0500 Original-Received: by mail-ot1-f51.google.com with SMTP id p27-20020a056830319b00b0066d7a348e20so452722ots.8 for <59082@debbugs.gnu.org>; Sat, 12 Nov 2022 08:47:09 -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=W9YPrQgDm3fybi+cIYOFAB+lWd3/TYQriPdkv7zXWs0=; b=OGjU8++FWAU89p1/1RBCtB0af/aXQ24MQTp7LjEygCcKWJ5u8c0p8qnC3J8cXKOtmg /Ui8aGHQ+TBVMUkJVDt9wG2IczpxcGjEF8uEwS56uzlfM3JBanrzPjvAgcdaPy82f/qW vDfy5dfsUiSm/Xc8SL7zzkA/Q2Wns7WXWzvqV+2qq5G+TO1mVbWseEzJgBn/RDvQlxD0 Krwz6rLn8hX5wwEZ+yfOhJ5SJTmezt69wsMF3fQKJkr3ai+NwYxGIJTduy+IrcbWEPL/ Lpx1oodfVZHe+xdnFYwuHkzQQhOkEwLLUSyQbHjcYhxkWJb7jCaS4lfuoVcoi6F1Wi4Y Z+Cg== 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=W9YPrQgDm3fybi+cIYOFAB+lWd3/TYQriPdkv7zXWs0=; b=Ac/NfuJE9YhMrYilP18AIvse95aFCRNwc9P6fs4vXuDb7GQel8jEkwUS1eW7q/tfLE DSVEdnmfhAVQP2wiQlJ9T2kEhTZ5j+Zky7qHjDGX+yjHGy11hWIHJQq+qldO7o94FBKw jq1/xeZ6MoqT6GU0t0HHA4gi2hLvQbnFC45mCKNLhESAJXrJmrjM2g806XMOxb773fo5 bvoEbdCPntZE4k/ee2+aRskzi3C2nhrbqiiajXr7B0rHRLpPXBNs8Fvkw1mIKV0kPFw/ QaKzYrzy2lXbsRYCbJgdVM0D7mDTkUuja2Thc1x37KS/jogV1NuthJad4UIWA9HWGYc3 ef8A== X-Gm-Message-State: ANoB5pmWAMMDl5Z//2WFM9BUemZAwheowPs8st2HF8cRcQ6j2TZe7lO4 5RCYDTu7SNbop5OUDl7BXS46MerrpFrPk7AeCXI= X-Google-Smtp-Source: AA0mqf592JcXL0L6ptohi36Sd3V2XpmeIPgQl66OLA6i4iJ1F1Cx6gYjh8T2q1QzRNLzq6W8RAPP81GXLt9nFvUrVws= X-Received: by 2002:a05:6830:124d:b0:66c:64d6:1bb4 with SMTP id s13-20020a056830124d00b0066c64d61bb4mr3551184otp.201.1668271623654; Sat, 12 Nov 2022 08:47:03 -0800 (PST) In-Reply-To: <87leog4018.fsf@posteo.net> 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:247667 Archived-At: --00000000000084517705ed48c180 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 stake, 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 definiti= ons > 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 > --00000000000084517705ed48c180 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hmm, not sure we should be using shorthands in docstrings= , which aren't read by the Lisp reader, but by something else... This i= s what is at stake, right?

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

=
On Sat, No= v 12, 2022, 16:20 Thierry Volpiatto <thievol@posteo.net> wrote:

Jo=C3=A3o T=C3=A1vora <joaotavora@gmail.com> 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
--00000000000084517705ed48c180--