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#50959: [PATCH] Re: bug#50959: 28.0.50; Shorthand symbols are unknown to Emacs Date: Sun, 10 Oct 2021 11:46:11 +0100 Message-ID: <877del6tu4.fsf@gmail.com> References: <16338bdc2497fc51c6fb6d54ab370bfb@webmail.orcon.net.nz> <83y27gijmz.fsf@gnu.org> <8335pmgnjy.fsf@gnu.org> <604da2cb10ac61f2b8b89a02c89056be@webmail.orcon.net.nz> <83a6jtff87.fsf@gnu.org> <5ac7a31cf2959c31c262a3377c736a5a@webmail.orcon.net.nz> <83ilygew7p.fsf@gnu.org> <83fstjdiwl.fsf@gnu.org> <837devdcz0.fsf@gnu.org> <93767e0236e7e85d27186293e38d3d25@webmail.orcon.net.nz> <8335pjd974.fsf@gnu.org> <87v92f3d15.fsf@gmail.com> <83y27bbs4d.fsf@gnu.org> <87mtnr3chk.fsf@gmail.com> <8735pj3amy.fsf@gmail.com> <83r1d3boeh.fsf@gnu.org> <874k9uwhxk.fsf_-_@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32768"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.60 (gnu/linux) Cc: Phil Sainty , 50959@debbugs.gnu.org, Stefan Monnier , rms@gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Oct 10 12:49:05 2021 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 1mZWO9-0008NO-6S for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 10 Oct 2021 12:49:05 +0200 Original-Received: from localhost ([::1]:49304 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mZWO8-0007F3-3M for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 10 Oct 2021 06:49:04 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56106) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mZWMB-0007EC-94 for bug-gnu-emacs@gnu.org; Sun, 10 Oct 2021 06:47:21 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:42987) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mZWMA-0008Ob-LG for bug-gnu-emacs@gnu.org; Sun, 10 Oct 2021 06:47:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mZWMA-0004CR-DI for bug-gnu-emacs@gnu.org; Sun, 10 Oct 2021 06:47:02 -0400 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: Sun, 10 Oct 2021 10:47:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50959 X-GNU-PR-Package: emacs Original-Received: via spool by 50959-submit@debbugs.gnu.org id=B50959.163386278016083 (code B ref 50959); Sun, 10 Oct 2021 10:47:02 +0000 Original-Received: (at 50959) by debbugs.gnu.org; 10 Oct 2021 10:46:20 +0000 Original-Received: from localhost ([127.0.0.1]:54532 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mZWLU-0004BL-4h for submit@debbugs.gnu.org; Sun, 10 Oct 2021 06:46:20 -0400 Original-Received: from mail-wr1-f52.google.com ([209.85.221.52]:44999) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mZWLQ-0004B3-5p for 50959@debbugs.gnu.org; Sun, 10 Oct 2021 06:46:19 -0400 Original-Received: by mail-wr1-f52.google.com with SMTP id e3so11948408wrc.11 for <50959@debbugs.gnu.org>; Sun, 10 Oct 2021 03:46:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=fxn6TEuh/t8sFzIhjpDyYNNzu4XrZaofuXxu0Y64Zb8=; b=SaZIN4RjvWK5uLlOJOaH4M1vlr6ed95Go5bMhMWUHV9FB747HebxUQSWL5eYrPFxJJ hWRIXajmG7MykLqDQAZEpWiCqBW6o3baV5tmRJ8VqnOjvmhwiztfEmCWGF7HPSTWPbQ9 /medqe1fkPdNpxVxyRlowbg18DSeDiGuaTLPJuDRgahHDbgIfJ0MblEOqtjSD2+W4B2X g8ySiq4am5J56y9oHKRM0XAMlj/fxrqlnvZFVXDP+Beknrc1/PR7lrNYSLHkWSL6aD3S QtbVE8u/5KTMzYxLbItpOn9ccGSFHjtCQvg3Gq958D1dxg547TukIo2Uza939FwHs+jS LtIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=fxn6TEuh/t8sFzIhjpDyYNNzu4XrZaofuXxu0Y64Zb8=; b=WXeN1yu5RJmk5df0v6NW81Gjy3yUH4IioXzMd8qtXPKoAuoDRY9kJLYKT15/3ToYkK Lz7MBjcoR4dnqUP2hxgBqjVvrrynYsiqHleSztYFp172wXPaFu+T9lRTpef9s9bVpzXM w17V+UIgmlfnIcmuasUaYFGwng7d5UNRKOabDcA752J+Swn9x8eYwJxBuJF1plLLMESW tYxaxnp2Uk5uy5Jx323aTTLrZV3E/oqfbVB6wWRITp6mmhVJ//lcbkwDAHLwONqIHWWG fFMY/bSzbNBi2f2GrTMicMQ2LXSI5ffgHmBozLZOdRBewjHl+666Vw06VHZfXnobdnzG tmRQ== X-Gm-Message-State: AOAM5337nWGPnBpNssBsGUC0gp5JYo2Cg/VEp676RuiB0hX3Ywq4IMMY UXuF0VfCxjsKtKgV2doII60= X-Google-Smtp-Source: ABdhPJycib9amtB6k5A8q/2eHoe+ZoS6XHFaMXtgFlKYdNnK7ZUVL1OrcHqt7UwoJAHAjBUEeTlXXw== X-Received: by 2002:a1c:9d97:: with SMTP id g145mr14551985wme.78.1633862770109; Sun, 10 Oct 2021 03:46:10 -0700 (PDT) Original-Received: from krug (a83-132-196-192.cpe.netcabo.pt. [83.132.196.192]) by smtp.gmail.com with ESMTPSA id v23sm4615433wmj.4.2021.10.10.03.46.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 10 Oct 2021 03:46:09 -0700 (PDT) In-Reply-To: <874k9uwhxk.fsf_-_@gmail.com> ("=?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?="'s message of "Wed, 06 Oct 2021 11:45:11 +0100") 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" Xref: news.gmane.io gmane.emacs.bugs:216801 Archived-At: Jo=C3=A3o T=C3=A1vora writes: > Jo=C3=A3o T=C3=A1vora writes: > >> On Sat, Oct 2, 2021 at 1:30 PM Eli Zaretskii wrote: > >>> > 0. no integration >>> > >>> > 1. This is the current integration. I.e. when C-h o is pressed on the >>> > symbol the global name is discovered and used as the default. This >>> > is how SLIME work with CL's namespacing system. SLIME is a very w= ell >>> > tested and widely appreciated Common Lisp IDE for Emcas. >>> > >>> > 2. The shorthands from the buffer where the minibuffer was entered are >>> > _not_ in the completions list, but typing one of them interns the >>> > symbol with those shorthands present, so you get the desired resul= t. >>> > This would fix Phil's visually-copy-and-type scenario. >>> > >>> > 3. The completion list would be augmented with the shorthands from >>> > the buffer where the minibuffer was entered from. > > Hello Eli, > > I've implemented a variation on 2 based on the later suggestion you > gave in emacs-devel: > >> That is, the user types "C-h o s-foo " and that >> replaces s-foo with the expansion, the "real" symbol. Is that >> feasible? > > Yes, it is. is, of course, TAB. Here is a patch > for people to try out which I will push in a few days time if there are > no objections. Cc-ing completion-style specialist Stefan. > > Patch just below, I've stashed this patch in branch scratch/bug-50959-fix. The reason is Stefan's strong objections to it. IIUC, Stefan, who originally designed the completion-style mechanism would seem to favour a scheme where a new completion table category 'symbol' is linked to a new 'abbrev' style (instead of a 'shorthand' style). The 'abbrev' style would then query the table for an appropriate source of abbreviations, which, in the case of table of the 'symbol' category, would be extracted from 'read-symbol-shorthands'. Stefan do you confirm this? If so, the end result would be the same and a functional level, and Phil's original request would be satisfied. I don't strongly object to the above more complex approach, but I don't have much time right now to implement those extra indirections either (not that they're rocket science, but they need at least good formats, good names, good docstrings, etc.), so I'll leave it up to you guys to figure out what to do here. Jo=C3=A3o