From unknown Thu Jun 19 13:53:14 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#68568 <68568@debbugs.gnu.org> To: bug#68568 <68568@debbugs.gnu.org> Subject: Status: transient.el interns potentially enormous symbols as commands Reply-To: bug#68568 <68568@debbugs.gnu.org> Date: Thu, 19 Jun 2025 20:53:14 +0000 retitle 68568 transient.el interns potentially enormous symbols as commands reassign 68568 emacs submitter 68568 Jo=C3=A3o T=C3=A1vora severity 68568 normal tag 68568 wontfix thanks From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 18 06:50:39 2024 Received: (at submit) by debbugs.gnu.org; 18 Jan 2024 11:50:39 +0000 Received: from localhost ([127.0.0.1]:54489 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rQQus-0006oW-PR for submit@debbugs.gnu.org; Thu, 18 Jan 2024 06:50:39 -0500 Received: from lists.gnu.org ([2001:470:142::17]:43568) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rQQuq-0006oI-QR for submit@debbugs.gnu.org; Thu, 18 Jan 2024 06:50:37 -0500 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 1rQQuh-000302-U0 for bug-gnu-emacs@gnu.org; Thu, 18 Jan 2024 06:50:28 -0500 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rQQue-0006ij-5f for bug-gnu-emacs@gnu.org; Thu, 18 Jan 2024 06:50:27 -0500 Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-40e7e2e04f0so36343745e9.1 for ; Thu, 18 Jan 2024 03:50:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1705578620; x=1706183420; darn=gnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to; bh=TT8B81mnV9s8hx0xXzsjDh0SGHT27cG1N2sjoHu0KEY=; b=g5HF2I2a0Iyw2RbBGZ5X65w2xdA7CstoV98GgYKsfhq2lkhN6fJRpRI/oRI70rMOva 3D4CX+ELWKiKrul7jEM5GV7vXW8KzF4Mq2orN/VxF/orVgpXrMWgJDblfrhiUHOhzIKZ BzBhL249ZZ/tnPeLYr+Vm2NmSgg+rz9uCmcqO41Wol7kQnMY28Ao3C7ku17hifKlI0kc y384WhUtYjIrLjAujrkG5qjMhneBD5vYcRTriSL6yAj6KNukutEYn7WFFVTyASxTiLiJ uSbPGpp9ok9JYX0v4cbaSoS8oEl/q1MntbqTA1ycGvlM3D+29GqSwQRIGoXRjdWNOsj4 Wl1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705578620; x=1706183420; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=TT8B81mnV9s8hx0xXzsjDh0SGHT27cG1N2sjoHu0KEY=; b=w8USwmNYd2gBvZi9xAGWEhXFevLdFbnS+rL3Xg8KcGq8VVHYCsnidjfeiiRrFOBzTe dE7lEYXetV+kZoCyiDzCI4Xvh3M2WlE41UuDK6ZeFIP+aBT5NXeI49R2ed/pZJTHZMxM VpcJoc0TFOXQGQORZl8Eww5SdiETOE1W6LHtNdqTOygbcx0u9kWKAqpOJ71AbC9QKlkt KiGS4aTBuwGiSal2LgLYjuGQHb7PhulSUi5ewjaeG+JHcTT6M8LoQH/7JKDDBRPTSTSP LwJsZRHAEit4hJ8D7CWjEIv5UAf0jvfJUG8jsXxBnjr9kdv+2WNFfNFjNSbQTtDVF1be a3oQ== X-Gm-Message-State: AOJu0YxZoF+SIAVwLpsRJE3hqphWS6VO4KEybbQIdjXvcz+CPl++mCHC JGpcHwnQTFZppspsNApPRulb5tgFOXlLdgsqQiakGieaBDL9wxpgVv4VbDM6 X-Google-Smtp-Source: AGHT+IHdNoP/A8nB8My0q6/2Q8lO+zEnYNNW6DRRk3Yt1m49/YnoYWAoaEgFSkJr5R0Gdd7jKvVqRg== X-Received: by 2002:a05:600c:154c:b0:40e:52f4:81bb with SMTP id f12-20020a05600c154c00b0040e52f481bbmr401801wmg.146.1705578620112; Thu, 18 Jan 2024 03:50:20 -0800 (PST) Received: from krug ([87.196.72.99]) by smtp.gmail.com with ESMTPSA id z10-20020a05600c0a0a00b0040e486bc0dfsm29777328wmp.27.2024.01.18.03.50.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Jan 2024 03:50:19 -0800 (PST) From: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= To: bug-gnu-emacs@gnu.org, Jonas Bernoulli Subject: transient.el interns potentially enormous symbols as commands Date: Thu, 18 Jan 2024 11:50:19 +0000 Message-ID: <87r0ieeu84.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2a00:1450:4864:20::330; envelope-from=joaotavora@gmail.com; helo=mail-wm1-x330.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) Hello, I'd never used a package that made use of "transient.el" before. I have now, via gptel.el Takes a bit of getting used to, but I like it (and can see why people like it in Magit). Now, immediately after using it, I start noticing that the completion that Fido mode offers on M-x starts to get weirdly contaminated by these symbols with enormous symbols names. This makes my Emacs almost unusable. I'd think other completion packages would be similarly affected unless they special case transient symols some how. Peeping into the transient source code, we can see that it uses a lot of 'eval' to define some commands just in time as a user navigates the menus and submenus. All these commands seem point to the same actual command, and do not seem to be meant to be called with M-x at all. They are generated at lazily at runtime and only for the submenus being visited. So they're just temporary artefacts of implementation. Who know if this is where the library gets its name. It's curious, but not going to argue much on this approach. Anyway, transient uses 'intern' when I think it could just use 'make-symbol' to avoid polluting the obarray and this whole problem. It seems to keep functioning and solves my problem. Here's the trivial patch. Would you look at it, Jonas? diff --git a/lisp/transient.el b/lisp/transient.el index f9060f5ba85..249c25262ea 100644 --- a/lisp/transient.el +++ b/lisp/transient.el @@ -1127,7 +1127,7 @@ transient--parse-suffix ((and (commandp car) (not (stringp car))) (let ((cmd pop) - (sym (intern + (sym (make-symbol (format "transient:%s:%s" prefix (let ((desc (plist-get args :description))) @@ -1156,7 +1156,7 @@ transient--parse-suffix (when-let ((shortarg (transient--derive-shortarg arg))) (setq args (plist-put args :shortarg shortarg))) (setq args (plist-put args :argument arg)))) - (setq sym (intern (format "transient:%s:%s" prefix arg))) + (setq sym (make-symbol (format "transient:%s:%s" prefix arg))) (setq args (plist-put args :command `(prog1 ',sym If some kind of persistent storage for these symbols IS needed I recommend a separate obarray. Also, why does the full and potentially very long description in plain text have to be a part of the symbol name? This doesn't matter with the 'make-symbol' approach, but I still find it curious. Jo=C3=A3o From debbugs-submit-bounces@debbugs.gnu.org Sat Jan 20 23:27:40 2024 Received: (at 68568) by debbugs.gnu.org; 21 Jan 2024 04:27:40 +0000 Received: from localhost ([127.0.0.1]:36294 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rRPQq-0003X4-0P for submit@debbugs.gnu.org; Sat, 20 Jan 2024 23:27:40 -0500 Received: from mail-yw1-x112f.google.com ([2607:f8b0:4864:20::112f]:58619) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rRPQn-0003Wq-BK for 68568@debbugs.gnu.org; Sat, 20 Jan 2024 23:27:38 -0500 Received: by mail-yw1-x112f.google.com with SMTP id 00721157ae682-5ff84214fc7so18923387b3.0 for <68568@debbugs.gnu.org>; Sat, 20 Jan 2024 20:27:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=positron.solutions; s=google; t=1705811248; x=1706416048; darn=debbugs.gnu.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=Tkq6a7gkcSHo3/NJSN4AIV1+XuSTRm9X93R7Xkzp9Ms=; b=MZHUS8/vzRLrANcEj4Jjtz13G33WgC7fxNPpyaSCjvPUAxj2QxGMIWDNcJgac7F4hJ NFfsRJk3KjBrBIbXvN9XB3zEm9xsP6UzJ4o8SADBVE5dvQncEPQjjizFsmmhvrGSGteH AkLPPSAuI85j8yYZ4iZTRcBXd4npGuyX3idSKNJK/2RfwIU+CJlceciK94ZXXNa7aHbg 9n3OGlhVYsfkDOltigW7Mv6/AKOlVeoLFG94rZeaSSnjk5+9SxMFropsFXs0IJKDd9O/ mPyZNmctUbTS8HQc07cSbDQSvKIAKgSxl8lThi1ZoLGTl/cB8ACvd+2DbCoDxEN8RYiT B0mA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705811248; x=1706416048; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=Tkq6a7gkcSHo3/NJSN4AIV1+XuSTRm9X93R7Xkzp9Ms=; b=jLi5J0eFkeYDWaVc7uop0NKIioYZfKU1s8xoax1phUzwpSfm9SovlRrt0yhsrhruLv 3FwXlfc+ucTUW7sDBrfiCStb1qYD00Sqd4m5lnkmerQ8lYVKvtWqxIBuqL7DMVZVefkH jboqmcZYBsM6SVd5BCap+pVY1+2qgd2NDdYftDPdczVRl4pJA75HFvicWC4wXHP9ciUv 2yarM/4hFsfJEhB/AgKJlaP4jHE1FCK/Qiu6op15Ge0ulXds7/TxTgKIBtZK4UlQMqlB OA0WFLnW6lO/XVygSrG0lJ1loD5WpJCgLgoaAZLZFyDtTC2314QDxZkV8/4k7aoZCJ5b 6RhA== X-Gm-Message-State: AOJu0Yx02aHd+OzmX3Osh4Vw0U7OxK6efbZcIb/yFAyznA2PiKJ9gEhj jgS3wsswTXPc0hDiQ3Gs5V2VhSZKYbH67V/KaJ7OsZ6hz5tvbo3e2fosCgzoe4XphKCSY1eqy7r qRgv1/0i9n4B9q+4kkQ4S33yqir6fKZAnpdtCZg== X-Google-Smtp-Source: AGHT+IG4ejcGYCdV4xB1VEV5OVUxazn4RcGwYijymFFQOmtW0OpNF6r5DvFFzoeji3hnslNXrn37Wcmvd/0WAF9Doxg= X-Received: by 2002:a0d:d40f:0:b0:5d7:1941:2c29 with SMTP id w15-20020a0dd40f000000b005d719412c29mr1621719ywd.86.1705811248347; Sat, 20 Jan 2024 20:27:28 -0800 (PST) MIME-Version: 1.0 From: Psionic K Date: Sun, 21 Jan 2024 13:27:17 +0900 Message-ID: Subject: bug#68568: transient.el interns potentially enormous symbols as commands To: joaotavora@gmail.com, 68568@debbugs.gnu.org Content-Type: text/plain; charset="UTF-8" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 68568 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) There's an option mentioned in the Transient change log: https://github.com/magit/transient/blob/main/CHANGELOG#v042----2023-08-25 Enormous is not quite what I would call these symbols since they are on the same order of magnitude as regular symbol lengths. If you get the option set and are satisfied, you should consider where you would have found this in the user manual and make the appropriate edits. The texi file is generated from an org file. From debbugs-submit-bounces@debbugs.gnu.org Sun Jan 21 02:16:05 2024 Received: (at 68568) by debbugs.gnu.org; 21 Jan 2024 07:16:05 +0000 Received: from localhost ([127.0.0.1]:36426 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rRS3p-0005TC-B9 for submit@debbugs.gnu.org; Sun, 21 Jan 2024 02:16:05 -0500 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]:54432) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rRS3j-0005SZ-Jg for 68568@debbugs.gnu.org; Sun, 21 Jan 2024 02:16:03 -0500 Received: by mail-wr1-x42f.google.com with SMTP id ffacd0b85a97d-3392b12dd21so656539f8f.0 for <68568@debbugs.gnu.org>; Sat, 20 Jan 2024 23:15:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1705821350; x=1706426150; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=tmw3frqa06wCZgJwQSoVLUdzuid4Xt9hooVZ/4m9vtQ=; b=WBQ4alCH3Wvik5BGyUjFKaqMwJFEeAXUPYg5addKwyQV0T3aiOItyP0XuVZfH2CSxA zJxY49q1ID19YpSGK91XRTu39Qs64xY9VqijshovO7EGZRfZMc72nYyLTqBB9Ekz/amH jgGVxCWqytRoxbKy10pG80dvuayRvsE4d/AKOSEI8Sxzg9OFICs2SzSKdFUOYq2Bxqk+ ClIgYC8O71LL9o0h+J2QVjqZUBPxyNNVaERrMKCmRidNbT0BF8R3ZmQ5CnAaOnfSTA5N 80xK6CiIozC8aUplMzHGb35F6EtQJMGyaRCPoL4CfdRYnEsefCGiOH1/KKnQpiWL9BJm 8msA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705821350; x=1706426150; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=tmw3frqa06wCZgJwQSoVLUdzuid4Xt9hooVZ/4m9vtQ=; b=b/U4iOnpVUn1R+Coq54AGJE6NzT3j4D+xbrrwt/9Frr/kEXlK+vXdaDf4nBcTCkPzh vZu1jQWdqmmIB0PRSUI23KTD/YWDWwq1EOa2Ny3r3hM1lC+hHKAuCSs27ZubghXfzUlm Oh0CDjNH/zRYR2Xlsw01lyroyvaLtMQ+7Kp1J04ZAMtdiLsDOtQ3T1QZ5l87BpCZRWmL BI9Y93WaN7ywxb5H4IadO85FBThD9SQdc394WLdb3x9c4yS87B9vRmHb9OqKlLOqs3F1 8E+wCURDqRoLL6XU61WgJQ3LQYe3wlBEodQRjvnzMExzuBkJ6hhMU40AEFQf7PN6xy6X pjtA== X-Gm-Message-State: AOJu0YzD2BO6XJ+/DigC9njjO48i3OUdPUvoPfpFdQjmGm63v9TN49cN A8br7j8yh0BguaLxTZJPO2cNFtH1pjYnedlngze9RDqUbBwOu+7n X-Google-Smtp-Source: AGHT+IGNW3jMlgWvvaEPoHOMmZUg/LwF+IorQfw9EsckAelDzRGhioYHdkeNEow3wdObo2g2EULA5w== X-Received: by 2002:adf:dd8d:0:b0:337:68a7:9563 with SMTP id x13-20020adfdd8d000000b0033768a79563mr1158912wrl.18.1705821349952; Sat, 20 Jan 2024 23:15:49 -0800 (PST) Received: from krug ([87.196.72.99]) by smtp.gmail.com with ESMTPSA id q9-20020adfcb89000000b0033931b609ddsm554341wrh.43.2024.01.20.23.15.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 20 Jan 2024 23:15:49 -0800 (PST) From: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= To: Psionic K Subject: Re: bug#68568: transient.el interns potentially enormous symbols as commands In-Reply-To: (Psionic K.'s message of "Sun, 21 Jan 2024 13:27:17 +0900") References: Date: Sun, 21 Jan 2024 07:15:50 +0000 Message-ID: <87r0ibrwbd.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 3.5 (+++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: On Sun, Jan 21, 2024 at 4:27 AM Psionic K wrote: > > There's an option mentioned in the Transient change log: > > https://github.com/magit/transient/blob/main/CHANGELOG#v042----2023-08-25 Thanks, but user options to get out of common bugs isn't what's wanted. Setting this "recommended option" has other effects I don't want to incur in (which is why, for good reason, it isn't the defaul [...] Content analysis details: (3.5 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (joaotavora[at]gmail.com) -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:42f listed in] [list.dnswl.org] 3.6 RCVD_IN_SBL_CSS RBL: Received via a relay in Spamhaus SBL-CSS [87.196.72.99 listed in zen.spamhaus.org] -0.0 T_SCC_BODY_TEXT_LINE No description available. X-Debbugs-Envelope-To: 68568 Cc: 68568@debbugs.gnu.org, Jonas Bernoulli X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 2.5 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: On Sun, Jan 21, 2024 at 4:27 AM Psionic K wrote: > > There's an option mentioned in the Transient change log: > > https://github.com/magit/transient/blob/main/CHANGELOG#v042----2023-08-25 Thanks, but user options to get out of common bugs isn't what's wanted. Setting this "recommended option" has other effects I don't want to incur in (which is why, for good reason, it isn't the defaul [...] Content analysis details: (2.5 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 3.6 RCVD_IN_SBL_CSS RBL: Received via a relay in Spamhaus SBL-CSS [87.196.72.99 listed in zen.spamhaus.org] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:42f listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (joaotavora[at]gmail.com) -0.0 T_SCC_BODY_TEXT_LINE No description available. -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager On Sun, Jan 21, 2024 at 4:27=E2=80=AFAM Psionic K wrote: > > There's an option mentioned in the Transient change log: > > https://github.com/magit/transient/blob/main/CHANGELOG#v042----2023-08-25 Thanks, but user options to get out of common bugs isn't what's wanted. Setting this "recommended option" has other effects I don't want to incur in (which is why, for good reason, it isn't the default) Either there is a good reason for those transient symbols to be interned in the obarray or there isn't. Right now, it seems there isn't. transient.el works just fine with make-symbol instead of intern. Intern is for persisting a symbol long-term and referencing back to it by name, which is what M-x execute-extended-command and the Lisp reader do, to name two examples. transient.el doesn't need that, it seems. Or do you have reasons to believe it does? > Enormous is not quite what I would call these symbols since they are > on the same order of magnitude as regular symbol lengths. GPTel, which I am planning on using, uses long descriptions of infix commands (pretty reasonably). I have a number of symbols nearing 200 characters, all transient's. The mean length is 17. That's above one full decimal order of magnitude above. So yes, "enormous" in my book. Jo=C3=A3o From debbugs-submit-bounces@debbugs.gnu.org Sun Jan 21 02:29:32 2024 Received: (at 68568) by debbugs.gnu.org; 21 Jan 2024 07:29:32 +0000 Received: from localhost ([127.0.0.1]:36431 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rRSGp-0005oc-Tm for submit@debbugs.gnu.org; Sun, 21 Jan 2024 02:29:32 -0500 Received: from mail-yw1-x1136.google.com ([2607:f8b0:4864:20::1136]:50328) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rRSGl-0005oE-5N for 68568@debbugs.gnu.org; Sun, 21 Jan 2024 02:29:30 -0500 Received: by mail-yw1-x1136.google.com with SMTP id 00721157ae682-5ffd5620247so2098037b3.0 for <68568@debbugs.gnu.org>; Sat, 20 Jan 2024 23:29:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=positron.solutions; s=google; t=1705822158; x=1706426958; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=qkYUKQ2hU0p7vB9H/w3AAFq4s9JB4nclTQIOK3dLtAQ=; b=V2znYMShptKNNxgaK2lKuxwpiLPTrvex6NKvUTdxuFF+b9rF1VCiThEOKU3/WTSc/f nXc78XC8G/XwABA7Ztdw6w3nBO8qbb7H/gac7zt+xLpdPF+q1U8sngT5Ds3dUuIticXR oiSlhRwducH8ZLHz4NNa/GJw18ZZbQEcsaODNaof+OFV3E33ha1qDVkKHCegUO/Ddj3m R5N9iv0h9O/uFp0HyNZW63jkjbM0OuO5pnJojqfdsyZD+ftt1/d1qWxFVcmYvp23+6SI Iio9Db1BRAFSdzvdDN+5NDMOnjrAUohWXHnSTVyIyxhzDe2N33TXXuwFVVsjmDA9335X uqZg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705822158; x=1706426958; 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=qkYUKQ2hU0p7vB9H/w3AAFq4s9JB4nclTQIOK3dLtAQ=; b=sPKqelHe9n1d54W9D1Y0ioNbcaq42glZiQLCuZc7g6OOm0Rc0d+tig7H/ykhswZ7co L/Az5Mc1uGtQHU3vHX5ObcQfMG4CaPN2rzHMtlFA8e5PM6/qy5CBf28FnnGRbQ0BMgvl OQ+j1IjCmPxWTGEi1gU4HNGGNsZ4kdceXBXJk5hVsZMrQFPG5j5HFXuqGmPPJw9jzOOz 1rS82mZc0M1cnCqEbolJ0Fdm97QIecqZMT26EW3sCVUNQQeQP5xdXYPPpKDGduvzihWL BnYU3AleDsnhLA6W+08M91c55wF1AtHZxKlqu3eylB9vF6vLKzO9LJpu0n/dB3Y470Jn fQnA== X-Gm-Message-State: AOJu0Yw9SvhENkHxc6jvGY8l5Y9QvxfIQoHueg25vk50HsHyIY+NfznC eJVQJ2w//BQU1B+XcbO/9oD8Ss2u40yTAxdgwa57UVlmivE5HOi05YB8q9gP/CvfnUXAb/75fq3 TeaCpNEDsQrg4jyKjovJCkvbqqxDI77Iq2ju4uw== X-Google-Smtp-Source: AGHT+IGdlVIB/BIdaxUTt5yD3LgFh4ZKXOx/lNsN/dO6gyEG+KilUfvzeXJj4+j6Sn58klHomLl1+Cpr7LWkyeY5XMU= X-Received: by 2002:a81:52c5:0:b0:5f6:f903:7067 with SMTP id g188-20020a8152c5000000b005f6f9037067mr2637814ywb.32.1705822158178; Sat, 20 Jan 2024 23:29:18 -0800 (PST) MIME-Version: 1.0 References: <87r0ibrwbd.fsf@gmail.com> In-Reply-To: <87r0ibrwbd.fsf@gmail.com> From: Psionic K Date: Sun, 21 Jan 2024 16:29:07 +0900 Message-ID: Subject: Re: bug#68568: transient.el interns potentially enormous symbols as commands To: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= Content-Type: text/plain; charset="UTF-8" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 68568 Cc: 68568@debbugs.gnu.org, Psionic K , Jonas Bernoulli X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > long descriptions of infix commands That's a user choice btw. Anyone can make long symbols through a variety of means that are out of control of any package. They can definitely take alternative routes to avoid creating long symbols in transient. 200 and how many instances? > transient.el works just fine with make-symbol instead of intern. It sounds like you have a patch ready for the upstream. Bon appetit: https://github.com/magit/transient From debbugs-submit-bounces@debbugs.gnu.org Sun Jan 21 03:10:56 2024 Received: (at 68568) by debbugs.gnu.org; 21 Jan 2024 08:10:56 +0000 Received: from localhost ([127.0.0.1]:36491 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rRSuu-00071K-01 for submit@debbugs.gnu.org; Sun, 21 Jan 2024 03:10:56 -0500 Received: from mail-lf1-x12a.google.com ([2a00:1450:4864:20::12a]:47255) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rRSup-000711-Jz for 68568@debbugs.gnu.org; Sun, 21 Jan 2024 03:10:54 -0500 Received: by mail-lf1-x12a.google.com with SMTP id 2adb3069b0e04-50e72e3d435so1968000e87.2 for <68568@debbugs.gnu.org>; Sun, 21 Jan 2024 00:10:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1705824642; x=1706429442; darn=debbugs.gnu.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=gr75J8qnS1kfeRpL4VGA8Z9pZvnxjuKa4JseAYFYX5Y=; b=N5/iogZf18EXPSUsBQIK1f+ZLWXL4UmUjaKs0KUN1Ks62CdsqmDG6RObKKr7wgqehz hnfSgYn2smEaObYpI1xaGUEx99TJ21vqEpK0YETzRZEqerkJX0YgvsZY6u6Wos7hIn45 SXXGCHZf17M3Zq4FpM7fKsVhlnkTFdWMUJrsH6VBxXda8S10FNqc9cGVAW9AZRHjlh9B qpzvjmc3l49IvP0BqXj01TfhOXjQSoUujzJNWQT6n0o1C9FqKVdEY4qLgkemoZHbM0c5 KMSfXEADm+mGUP9jplWWFBV9RFKOs4xt5mUxcuKbWkrvbyy/cqd94MarVEijK+r35YgX Mysg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705824642; x=1706429442; h=content-transfer-encoding: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=gr75J8qnS1kfeRpL4VGA8Z9pZvnxjuKa4JseAYFYX5Y=; b=gAJfAYSSdBea7nutiPANZ5xB36uW2FTiKDL2VHmBRqMstBoIZ5pujVR5gLDKv2m7up vSHfmFMk3Uwsx6NDNYb0QFxnD9cs1EEGeO4Es73+2M+BzRyOBaq6zA/5RQ6D0hDGMDi+ 6ucA8zaW7biSTD3o5ooi0lAFIt5U6U+ak7APjcJ7cl+fz73CPcN4TYqrF2qESxwmQz/t eAKYXQXkOHcYOUQb43vh7aFlpu3GiD2eES9FWGuQnFJaYgemT4GDCaLT7tgxipK0hKaD 5XHKcgakiS56EtiePvO3sNLPDwYvH4LKeB7hBAOG91hsFezucO+rod2Oz5An9nRyeMuE x1tw== X-Gm-Message-State: AOJu0YyCTDferQF/GA/K292x10wzwUEBui+/mP4K3+Yp2aLmVpCzq/Eg t+aFS0+cZ56AhD37/ia9nJKnGsgKHyAS0yzgxE06ovSWzRnP7nmLn6bgHulIGju5lkR2Uw5QqfE av/hH+MeD2FzArJAVc1phqyfiuxhhP4/V X-Google-Smtp-Source: AGHT+IFcQUY/snfXNxdBAJMIim6fZd/gbLObL/SLTDmH45GarjshmO2kn/mgxop0TyY7RMgdHfNrQT3QS1Riz5aXdHM= X-Received: by 2002:a05:6512:2112:b0:50e:3fbb:e5e4 with SMTP id q18-20020a056512211200b0050e3fbbe5e4mr555888lfr.164.1705824641942; Sun, 21 Jan 2024 00:10:41 -0800 (PST) MIME-Version: 1.0 References: <87r0ibrwbd.fsf@gmail.com> In-Reply-To: From: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= Date: Sun, 21 Jan 2024 08:10:33 +0000 Message-ID: Subject: Re: bug#68568: transient.el interns potentially enormous symbols as commands To: Psionic K Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 68568 Cc: 68568@debbugs.gnu.org, Jonas Bernoulli X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On Sun, Jan 21, 2024 at 7:29=E2=80=AFAM Psionic K wrote: > > > long descriptions of infix commands > > That's a user choice btw. Anyone can make long symbols through a Not sure what you mean by "user". I'm a "user" of GPTel, but I didn't make those long description. GPTel uses those descriptions and, I think, reasonably. > variety of means that are out of control of any package. Sure, but that package shouldn't gratuitously have that choice (questionable as it may be -- I think it's not) wreak havoc everywhere else in Emacs. This is what happens with transient's interning of such symbols > definitely take alternative routes to avoid creating long symbols in > transient. I'd rather not bother transient-using packages with code complications. GPTel's interface is fine as it is. > 200 and how many instances? About 8 or 9, all transient's. Doesn't matter because the greediness of th= e flex matching algorithm, which was designed for short symbols, eventually picks up on a pattern which is highly likely to appear in the extremely long tail of the enormous symbol So my usual searches like M-x vc SPC always where I expect to see "vc" commands turn up some silly transient command, useless and unwanted in that context. > > transient.el works just fine with make-symbol instead of intern. > > It sounds like you have a patch ready for the upstream. Bon appetit: > https://github.com/magit/transient I take it you still can't think of a good reason why those symbols should be internet. OK. Created a PR. I hope this gets fixed quickly over here at the downstream. This is not something easy to monkey-patch around. Jo=C3=A3o From debbugs-submit-bounces@debbugs.gnu.org Sun Jan 21 03:26:59 2024 Received: (at 68568) by debbugs.gnu.org; 21 Jan 2024 08:26:59 +0000 Received: from localhost ([127.0.0.1]:36531 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rRTAR-0007Rj-27 for submit@debbugs.gnu.org; Sun, 21 Jan 2024 03:26:59 -0500 Received: from mail-qt1-x833.google.com ([2607:f8b0:4864:20::833]:53396) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rRTAN-0007RT-29 for 68568@debbugs.gnu.org; Sun, 21 Jan 2024 03:26:57 -0500 Received: by mail-qt1-x833.google.com with SMTP id d75a77b69052e-429fc7a1eacso23596991cf.2 for <68568@debbugs.gnu.org>; Sun, 21 Jan 2024 00:26:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=positron.solutions; s=google; t=1705825606; x=1706430406; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=dloEBZj3KdJzBPlHlMJA6ULDFy87atEumofpcuuYTa8=; b=IY4WE/v1/fj/pyhrSVkJyVU+towUfPm+dXeUZnPWTaLOXZzaklKKO2kXOtEahz6e1k 4yL2hKv381JBm8qS1lTGPBCJQUyQzTtssOne27OSPtQiZXIYEmryuqmBaHrzTaxy0ao0 dTCp/W1o57427GqZNgBvxi0Dq3hKnlbDcKltqhGoP56Lntf5srB6eX9MOUMPyzEyWaPz qtsNVNki8p+ALwpEBW748JolDxuy1bSErGg+zwd7/WwLevEwDxBwBORFvFuq3P5ZSsEU tYuQX78yjPg7aBsjF7r/yehFAc/YnYW+WNEVI7/nggJ/uCTGU8mtjLGFnqFQEnPeHy3c xRLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705825606; x=1706430406; 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=dloEBZj3KdJzBPlHlMJA6ULDFy87atEumofpcuuYTa8=; b=dQ7QFyeFGAQBI7qAx9a5gjW/ufs4uG4mJ2osHFos2pO3nikwlKo2TWS7TvLbNnwMRw P1RhxYp+TzK3dOjuShsTrQhzQdAKjw8V5v4vxYLM8Khi2k5bviUlfQgAJ42QrNBNFvFs TrzHqqq5+y1Vyb+ATgpV280mBhsHjdVxydDzjPALfmmk5nZuJqYtiixMZaXNHlW1o8eN aCJ3kIDPx/zUF//EH6UFQGGPwsNESIOenj4FzorusH1pn9f7OvH7zNemCWGvB1Ahsw7A mEh7H1g+EBcmASLXuW2q8IusovFaNBHt9wA5bEcwzI/OaOjC62ZzHoeSgKBZK4NWRS8d I/Kg== X-Gm-Message-State: AOJu0Yzwto5ahU1TaEm8hNy+dUJ/7m4I4C8ya4BSDa2sADcD/HbawMJE WFZgw6hCGZyQrqROvdNIjnV3dzcI3iB2e8s6JE59ZtISi+I4LCC/7YXkHQkhMF3jxgFZhILxJ6v shnDV2RoDcVUnKvYF5i8DvlAK+gXkbtypo5axAw== X-Google-Smtp-Source: AGHT+IHq/r9lpx7MW5ah7e1m5P1wHo1UV/XEGtAj/lyRuB773W7EKPJNp6yMUTJpwkWqeHxSxjrZvpKr4pxVIaiuWVk= X-Received: by 2002:a05:622a:353:b0:42a:2a3b:12c5 with SMTP id r19-20020a05622a035300b0042a2a3b12c5mr3959341qtw.101.1705825606131; Sun, 21 Jan 2024 00:26:46 -0800 (PST) MIME-Version: 1.0 References: <87r0ibrwbd.fsf@gmail.com> In-Reply-To: From: Psionic K Date: Sun, 21 Jan 2024 17:26:35 +0900 Message-ID: Subject: Re: bug#68568: transient.el interns potentially enormous symbols as commands To: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= Content-Type: multipart/alternative; boundary="0000000000004d75d8060f7079d4" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 68568 Cc: 68568@debbugs.gnu.org, Psionic K , Jonas Bernoulli X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --0000000000004d75d8060f7079d4 Content-Type: text/plain; charset="UTF-8" > Not sure what you mean by "user" GPTel is on the user side of transient. Karthink or another contributor wrote GPTel to use transient that way. Perhaps they need to create new suffixes dynamically, but even that can be done with `define-suffix' etc. If someone calls `define-suffix' with a really long name, there's nothing transient can or should do about it. Actually, I recommend taking this to GPTel. You can ping me on their Github @psionic-k and I'll help Karthink or others consider an alternative approach that has sensible symbol names. > is highly likely to appear in the extremely long tail of the enormous symbol True, but the symbols in question contain "transient:" and ":--" strings that should be easy to filter out. Lots of completion packages can filter those. --0000000000004d75d8060f7079d4 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
> Not sure what you mean by "user"<= /div>

GPTel is on the user side of transient.=C2=A0 Kart= hink or another contributor wrote GPTel to use transient that way.=C2=A0 Pe= rhaps they need to create new suffixes dynamically, but even that can be do= ne with `define-suffix' etc.=C2=A0 If someone calls `define-suffix'= with a really long name, there's nothing transient can or should do ab= out it.

Actually, I recommend taking this to GPTel.=C2=A0 You can pi= ng me on their Github @psionic-k and I'll help Karthink or others consi= der an alternative approach that has sensible symbol names.

> is highly likely to appear in the extremely long tail of the enormous symbol

Tru= e, but the symbols in question contain "transient:" and ":--= " strings that should be easy to filter out.=C2=A0 Lots of completion = packages can filter those.
--0000000000004d75d8060f7079d4-- From debbugs-submit-bounces@debbugs.gnu.org Sun Jan 21 03:33:20 2024 Received: (at 68568) by debbugs.gnu.org; 21 Jan 2024 08:33:21 +0000 Received: from localhost ([127.0.0.1]:36540 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rRTGa-0007cd-LT for submit@debbugs.gnu.org; Sun, 21 Jan 2024 03:33:20 -0500 Received: from mail-lj1-x22f.google.com ([2a00:1450:4864:20::22f]:43498) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rRTGY-0007cR-TJ for 68568@debbugs.gnu.org; Sun, 21 Jan 2024 03:33:19 -0500 Received: by mail-lj1-x22f.google.com with SMTP id 38308e7fff4ca-2cd04078ebeso32056691fa.1 for <68568@debbugs.gnu.org>; Sun, 21 Jan 2024 00:33:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1705825989; x=1706430789; darn=debbugs.gnu.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=Q16ZapkQCKLYmVO1+qHegvq5wD7rIFKFxhZASsvGB/A=; b=He+oqHhGp82RceyCpise/5/7WFtpj2O9qfAEl/jYeMWk0lJjh3gx85eAQ/MxS4QBA6 jPs3qJf6JSNoDCg+pbIqf7LxQ5NreNjmpVWld1gXqarwW394ZH/gPpdnE0S/RbTwjy6e 8keWxGRnahh6RtgAez9EOY5hiWCo09XPTxPnk4cdpiP/bvHaIBWFYHz1mTAJh9PQqafg IcChdQcyH3bxjAe6fQBn05vhbbOaJDkVLEm2HPbQjmaUdpoQgqEALgB8TcrkJM3BaP92 EEMCk6OKzY2qDGDg8o7C/L2K4WcVpPnbXtfEyhN9g4Iuw/DgOBo53I8HDSboH+SLY+Cd E/uQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705825989; x=1706430789; h=content-transfer-encoding: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=Q16ZapkQCKLYmVO1+qHegvq5wD7rIFKFxhZASsvGB/A=; b=LBwul3xwjejCVWxslZGCURZhIZ6ecAABl7Dr8qd3kucWzZ8FtYLuyHVr4ppByh2v1C sP7BBGbc8afdTF0iOWNPb0GxFjVhvQX2KTQLyjsSyE5GQYYSUGsMTggCp/AlEePFmHNY vWVdl7THWtFCEmkPtjgedtoNclOCD60ZWJfzsFFeFQaLu7rLjvLLq82mBW8lRexgd7bZ vWi5iMiObUeR1uENw7Ruk/OlcMlNToml+gXcDXI+TuSo46sHFJvK+SfalppPieiAo1DL fMkGXsTNNljQIKM2nUoGy9mOVJ4f+pstdRqayt+yRrp1I8khR4XqK5HKDHazjthSGaIw u4WQ== X-Gm-Message-State: AOJu0Yxur+t0zAK6IHz3SjfO8eL0BQIsJd7iZUhTJFCe3Vi8yFqyGIFR 6bFb6GjSYvR3BxfUjnP9THp+XtebDRzIheO6w4b2pJlABWH29yaMPOdCw46lsy/8WbK1kPUvFYU TNom3X0fGCCiAWRaH7qTssvyovF4= X-Google-Smtp-Source: AGHT+IFrpyCjnut6Fg4Ln97zi+im05RZcaFQRk6NdkFk1dwHc+AwDbP7V4BhISqUt8t4JpEs+GziovywjRTNc/Abxao= X-Received: by 2002:a05:651c:1a21:b0:2cd:fb12:88e2 with SMTP id by33-20020a05651c1a2100b002cdfb1288e2mr1440408ljb.12.1705825989321; Sun, 21 Jan 2024 00:33:09 -0800 (PST) MIME-Version: 1.0 References: <87r0ibrwbd.fsf@gmail.com> In-Reply-To: From: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= Date: Sun, 21 Jan 2024 08:33:00 +0000 Message-ID: Subject: Re: bug#68568: transient.el interns potentially enormous symbols as commands To: Psionic K Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 68568 Cc: 68568@debbugs.gnu.org, Jonas Bernoulli X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Sun, Jan 21, 2024 at 8:26=E2=80=AFAM Psionic K = wrote: > GPTel is on the user side of transient. Karthink or another contributor = wrote GPTel to use transient that way. Perhaps they need to create new suf= fixes dynamically, but even that can be done with `define-suffix' etc. If = someone calls `define-suffix' with a really long name, there's nothing tran= sient can or should do about it. It should probably not intern that stuff in the obarray. UNLESS you know of a reason to. Do you? > True, but the symbols in question contain "transient:" and ":--" strings = that should be easy to filter out. Lots of completion packages can filter = those. Why should a completion package know about "transient" or this :-- and be slowed down by this crud? From debbugs-submit-bounces@debbugs.gnu.org Sat Jan 27 04:15:29 2024 Received: (at 68568) by debbugs.gnu.org; 27 Jan 2024 09:15:30 +0000 Received: from localhost ([127.0.0.1]:53464 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rTemf-0006Gz-EP for submit@debbugs.gnu.org; Sat, 27 Jan 2024 04:15:29 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:52786) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rTemd-0006Gl-Nn for 68568@debbugs.gnu.org; Sat, 27 Jan 2024 04:15:28 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rTemP-0001Ka-L9; Sat, 27 Jan 2024 04:15:13 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=NBSsreI29jpLRvCNrmzsB46+GQLx76vjMAvJ0W2hHe8=; b=UPh6k1FFijC6RAnL+tct Ug2bpep2eD6+m4YuTF6pXGW+13BNSrp9TzChFvFOWesANs2wCFqP+Vps8jNBowMg3dVb3xdyMH4ml ldvVnk/wazbzRA4WoAfou6Ju3EDVvRDyZ45Yzib+BrYsO1w2t51id6jevZFsWreliBh38oqz6WdOz YnLCnc35OsudmgXb0hLMqG7+MNFpfU7yAPMUsOCDy/rJojVtVxpUBRWkVeaW/oCkIlQPns4Q43Bis xxSKFBjH+w2Rbj+r/1XMz9Ze+9rODgYeUxkXgF5xTZmTKAD8WNJRFfkiEhxbbt18/E7UkJtPwZwwx VclPqoTjxjCoWQ==; Date: Sat, 27 Jan 2024 11:15:11 +0200 Message-Id: <86v87f87ds.fsf@gnu.org> From: Eli Zaretskii To: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= , jonas@bernoul.li In-Reply-To: <87r0ieeu84.fsf@gmail.com> (message from =?utf-8?B?Sm/Do28g?= =?utf-8?B?VMOhdm9yYQ==?= on Thu, 18 Jan 2024 11:50:19 +0000) Subject: Re: bug#68568: transient.el interns potentially enormous symbols as commands References: <87r0ieeu84.fsf@gmail.com> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 68568 Cc: 68568@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Ping! Jonas, any comments or suggestions? > From: João Távora > Date: Thu, 18 Jan 2024 11:50:19 +0000 > > Hello, > > I'd never used a package that made use of "transient.el" before. > I have now, via gptel.el Takes a bit of getting used to, but I like it > (and can see why people like it in Magit). > > Now, immediately after using it, I start noticing that the completion > that Fido mode offers on M-x starts to get weirdly contaminated by these > symbols with enormous symbols names. This makes my Emacs almost > unusable. I'd think other completion packages would be similarly > affected unless they special case transient symols some how. > > Peeping into the transient source code, we can see that it uses a lot > of 'eval' to define some commands just in time as a user navigates the > menus and submenus. > > All these commands seem point to the same actual command, and do not > seem to be meant to be called with M-x at all. They are generated at > lazily at runtime and only for the submenus being visited. > > So they're just temporary artefacts of implementation. Who know if this > is where the library gets its name. It's curious, but not going to > argue much on this approach. > > Anyway, transient uses 'intern' when I think it could just use > 'make-symbol' to avoid polluting the obarray and this whole problem. It > seems to keep functioning and solves my problem. Here's the trivial > patch. Would you look at it, Jonas? > > diff --git a/lisp/transient.el b/lisp/transient.el > index f9060f5ba85..249c25262ea 100644 > --- a/lisp/transient.el > +++ b/lisp/transient.el > @@ -1127,7 +1127,7 @@ transient--parse-suffix > ((and (commandp car) > (not (stringp car))) > (let ((cmd pop) > - (sym (intern > + (sym (make-symbol > (format "transient:%s:%s" > prefix > (let ((desc (plist-get args :description))) > @@ -1156,7 +1156,7 @@ transient--parse-suffix > (when-let ((shortarg (transient--derive-shortarg arg))) > (setq args (plist-put args :shortarg shortarg))) > (setq args (plist-put args :argument arg)))) > - (setq sym (intern (format "transient:%s:%s" prefix arg))) > + (setq sym (make-symbol (format "transient:%s:%s" prefix arg))) > (setq args (plist-put > args :command > `(prog1 ',sym > > > > If some kind of persistent storage for these symbols IS needed I > recommend a separate obarray. Also, why does the full and potentially > very long description in plain text have to be a part of the symbol > name? This doesn't matter with the 'make-symbol' approach, but I still > find it curious. > > João > > > > From debbugs-submit-bounces@debbugs.gnu.org Sat Jan 27 13:18:43 2024 Received: (at 68568) by debbugs.gnu.org; 27 Jan 2024 18:18:43 +0000 Received: from localhost ([127.0.0.1]:55869 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rTnGM-0008Vt-VE for submit@debbugs.gnu.org; Sat, 27 Jan 2024 13:18:43 -0500 Received: from mail.hostpark.net ([212.243.197.30]:53700) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rTnGJ-0008Vd-Oo for 68568@debbugs.gnu.org; Sat, 27 Jan 2024 13:18:41 -0500 Received: from localhost (localhost [127.0.0.1]) by mail.hostpark.net (Postfix) with ESMTP id 81866162AB; Sat, 27 Jan 2024 19:18:26 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=bernoul.li; h= content-type:content-type:mime-version:message-id:date:date :references:in-reply-to:subject:subject:from:from; s=sel2011a; t=1706379506; bh=WTPtcGWMrbmQca+h7Quk9kLLxp/05RLV7LsckH3/TKY=; b= qXo/8jHLEjYVKyFjj3qjlFFpZfHBKq6HOnC1UArrkQ0LJoTPXgQYMbC12m5i1LbK IhQQCkTm3fHbcetFh/XbnUWn+U4ac48VgKnwT57+4Yz9vE/8INg43CIo655kVSPa JA06jBq7HXZmILO0WS7VKzuAAMfmjXbyaygr+CZfFsg= X-Virus-Scanned: by Hostpark/NetZone Mailprotection at hostpark.net Received: from mail.hostpark.net ([127.0.0.1]) by localhost (mail1.hostpark.net [127.0.0.1]) (amavisd-new, port 10224) with ESMTP id XKC8d21_6WqA; Sat, 27 Jan 2024 19:18:26 +0100 (CET) Received: from customer (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.hostpark.net (Postfix) with ESMTPSA id 0B0D216255; Sat, 27 Jan 2024 19:18:24 +0100 (CET) From: Jonas Bernoulli To: Eli Zaretskii , =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= Subject: Re: bug#68568: transient.el interns potentially enormous symbols as commands In-Reply-To: <86v87f87ds.fsf@gnu.org> References: <87r0ieeu84.fsf@gmail.com> <86v87f87ds.fsf@gnu.org> Date: Sat, 27 Jan 2024 19:18:22 +0100 Message-ID: <87mssqr66p.fsf@bernoul.li> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 68568 Cc: 68568@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Eli Zaretskii writes: > Ping! > > Jonas, any comments or suggestions? We discussed at https://github.com/magit/transient/pull/273. Summary: It would probably be possible to avoid interning these symbols. I did some experimentation to come to that provisional assessment. But Transient has been using interned from the beginning, and as a result, many parts of Transient assume that interned symbols are being used. Using symbols made this aspect of Transient much simpler. This allowed me to focus on gradually improve other aspects, which are more complicated by necessity. If I had not used symbols, this would have slowed down development. Switching to not using symbols for some commands, would mean many things would have to be adjusted to handle both cases. This would undoubtedly lead to bugs and slow down development. I would rather work on the parts of Transient that IMO need improvement. IMO using commands that are fbound to interned symbols has one and only one drawback: they are offered as completion candidates by execute-extended-command. I have addressed this by setting read-extended-command-predicate to a function that hides "transient" commands that should be hidden and nothing else. The option is only set if, and only if, it is not already set to something other than nil. If the user customizes the option and pick one of the predicates offered by Emacs, then that predicate also hides Transient's "anonymous" commands. [There was a bug, I just fixed that.] IMO the result of this approach is that the only drawback of interning the symbols is gone; without me having to trade in that one drawback for many avoidable complications, as I would have to if I followed the request to not "needlessly" intern the "anonymous" symbols. An additional benefit of using read-extended-command-predicate is that it allows all of Transient's commands that should be hidden, to be hidden. Even if I did stop using interned symbols for the "anonymous" commands, which are inline when a transient menu is defined, there would still be other commands that are defined non-anonymously, but never the less should be hidden. (E.g., commands that toggle arguments and are defined using transient-define-infix, because they are useful in more than one menu, and are then referenced by name in the definitions of these menus.) Therefore, the addition to read-extended-command-predicate is necessary, whether I avoid interning the "anonymous" commands or not. And as a consequence of that, there would be zero benefit to avoiding to intern the "anonymous" commands; but many drawbacks. I have therefore decided to stick to using interned symbols. Even if you don't agree with me by now, there is one big drawback that moving away from interned symbols would have, which I believe will win you over. Each command is associated with an object and the symbol is used to link the two. As a consequence all "anonymous" commands that set an argument can be mere aliases to the same command, which only has to live in memory once. If the symbol can no longer be used to link the command and object, then the anonymous commands would have to be defined as oclosures. These closures would be nearly identical, but each one of them would permanently use up memory. -- Jonas From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 01 05:24:38 2024 Received: (at 68568) by debbugs.gnu.org; 1 Feb 2024 10:24:38 +0000 Received: from localhost ([127.0.0.1]:40295 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rVUFK-0005r0-Ae for submit@debbugs.gnu.org; Thu, 01 Feb 2024 05:24:38 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:43528) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rVUFI-0005qk-SE; Thu, 01 Feb 2024 05:24:37 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rVUF2-0002zM-4D; Thu, 01 Feb 2024 05:24:20 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=MMZPSuNwGSeIbYsu9hrZe/420NLae0gwwonoaMAeqys=; b=MS/4HRfamXWN 6UQhgXYIGCrt2gA4SJdnOyTpYR2zCDtbhf1xOamckR+W+Arw0xztM6yknM3f7lSLa+z7FUreYtw2I XMKSy7Phkqv+Ff83O+jDy78/FocAj9+SFCMqz4x4RMB09NaeX/FsALq6Ay0vBoWC3VReyldGYignQ wkKg/f8yglB73EQrVBLkfFP3x0Nj0IpTIj/FjCt+exkk0Z9iox212Qja+TDMbYFImhmOqJdnqNm1G sgbfB0aPsKno7nTJqNakv9Ehx0lkgdD+YCap9LWYrUBlC29WhsV9/S5ZmE8eAhX/rWrsxsYzR+/Na WDylO6l+aLkWsE+Vm0s1qQ==; Date: Thu, 01 Feb 2024 12:24:16 +0200 Message-Id: <86v878zdm7.fsf@gnu.org> From: Eli Zaretskii To: Jonas Bernoulli In-Reply-To: <87mssqr66p.fsf@bernoul.li> (message from Jonas Bernoulli on Sat, 27 Jan 2024 19:18:22 +0100) Subject: Re: bug#68568: transient.el interns potentially enormous symbols as commands References: <87r0ieeu84.fsf@gmail.com> <86v87f87ds.fsf@gnu.org> <87mssqr66p.fsf@bernoul.li> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 68568 Cc: 68568@debbugs.gnu.org, joaotavora@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) tags 68568 wontfix close 68568 thanks > From: Jonas Bernoulli > Cc: 68568@debbugs.gnu.org > Date: Sat, 27 Jan 2024 19:18:22 +0100 > > Eli Zaretskii writes: > > > Ping! > > > > Jonas, any comments or suggestions? > > We discussed at https://github.com/magit/transient/pull/273. > [...] Thanks, I'm therefore closing this bug as wontfix. From unknown Thu Jun 19 13:53:14 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 29 Feb 2024 12:24:12 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator