From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "Elijah G." Newsgroups: gmane.emacs.bugs Subject: bug#71313: [PATCH] Allow insert other elisp keywords in auto-insert Date: Sat, 01 Jun 2024 18:17:42 -0600 Message-ID: <86v82smc49.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6898"; mail-complaints-to="usenet@ciao.gmane.io" To: 71313@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jun 02 02:19:21 2024 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 1sDYwS-0001ec-SN for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 02 Jun 2024 02:19:20 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sDYw0-00057p-9Z; Sat, 01 Jun 2024 20:18:52 -0400 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 1sDYvz-00057K-7Z for bug-gnu-emacs@gnu.org; Sat, 01 Jun 2024 20:18:51 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sDYvy-0003Ov-VY for bug-gnu-emacs@gnu.org; Sat, 01 Jun 2024 20:18:50 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sDYwA-00057z-Ca for bug-gnu-emacs@gnu.org; Sat, 01 Jun 2024 20:19:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: "Elijah G." Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 02 Jun 2024 00:19:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 71313 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.171728748619643 (code B ref -1); Sun, 02 Jun 2024 00:19:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 2 Jun 2024 00:18:06 +0000 Original-Received: from localhost ([127.0.0.1]:57563 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sDYvF-00056l-LJ for submit@debbugs.gnu.org; Sat, 01 Jun 2024 20:18:05 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:42696) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sDYvD-00056d-SS for submit@debbugs.gnu.org; Sat, 01 Jun 2024 20:18:04 -0400 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 1sDYuz-0004vr-KX for bug-gnu-emacs@gnu.org; Sat, 01 Jun 2024 20:17:51 -0400 Original-Received: from mail-oa1-x44.google.com ([2001:4860:4864:20::44]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sDYux-0003Hn-UP for bug-gnu-emacs@gnu.org; Sat, 01 Jun 2024 20:17:49 -0400 Original-Received: by mail-oa1-x44.google.com with SMTP id 586e51a60fabf-250aaae6d93so500022fac.2 for ; Sat, 01 Jun 2024 17:17:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1717287465; x=1717892265; darn=gnu.org; h=mime-version:message-id:date:subject:to:from:from:to:cc:subject :date:message-id:reply-to; bh=BzGPZktZg/3dnKwKxM4NBF76/BLoMp0LakGZdHG2rOY=; b=Y9JjMEsXjB+vUP7Dss5huH0HJGmJ8eOALfc8MzBbkVkN1dp9DFi3I1+Ei36UO6Fd6x 0wBXj6SLZZBkJUzO5oWGH6GIcS7a9akPyRZkNu7EbwC+vYxXs1Xuc0Y/rM49mqj1p+Sk abPigfhSZgY9OkK49PAhb3/NtS7qPq2/4c63yvUIfkykpjt7iONDwnmLRDOkIeI53Da6 aEq7vN3Ogcu5XShwxmVfx+nhM9nnOQylGLT5NNoX7OSsnUL6SCdejVGXAoy75/uqgECM mKxX50uaFCM7kt8B2JotEnBNwWfsI69q/TG+D34mX3pSPMO/S3pRiGKRi1b8WNHh6LL4 MiWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717287465; x=1717892265; h=mime-version:message-id:date:subject:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=BzGPZktZg/3dnKwKxM4NBF76/BLoMp0LakGZdHG2rOY=; b=c5yknfa3nBFblpEqL2f/ls/kAB+LNWEY9dC8TSau+IqoK8LJT3TwJ1pf2/BBHkQ4uR EFMX/Huv0xKoCAuUL9lvLWJldED8VRnJIqCV4wlKPZC/eTNDxIYoWdAn2omd4klbYChS OkfFnyBLXmHNo9kWbIHjk8HBdlC5uKSHpXDcMe095sy3iUw06oT1RE002l6g2dHgxep5 yXlgY/9YIHiiTS/2IksNCUddaXd88cDtyKM6bsW9VAMmLwLTnVibpM5iITIMlwmFn/d+ KK5Bsz/6nWsBqpAgNz4vkw/s66QskYxj6w885BGvCIPxWpRqK1z7nRqp7WeM/A9fSBxJ UAUg== X-Gm-Message-State: AOJu0YwT+MEodQmlzB/3n1YGqWCDbK7077DoSK80SWPLHxq8KE7wHIIL Z5VauYcbX0qhGw5sWVw1Wk9GsORnnyUomQaAbCZrZe7AlbeRqQl+vwKPuPkb X-Google-Smtp-Source: AGHT+IFv3UGFxeL4nA+02KGce1d3dattZp/9q+N+rOD3UqnE4XaxJsoIIM9+7S17iC29wrGLTrw3Pw== X-Received: by 2002:a05:6870:528:b0:24f:e5e1:b0cb with SMTP id 586e51a60fabf-2508b9b1b0fmr5663581fac.15.1717287465103; Sat, 01 Jun 2024 17:17:45 -0700 (PDT) Original-Received: from LIBERO ([187.184.27.187]) by smtp.gmail.com with ESMTPSA id 46e09a7af769-6f9105a96c5sm882182a34.76.2024.06.01.17.17.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 01 Jun 2024 17:17:44 -0700 (PDT) Received-SPF: pass client-ip=2001:4860:4864:20::44; envelope-from=eg642616@gmail.com; helo=mail-oa1-x44.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 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_ENVFROM_END_DIGIT=0.25, 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-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:286349 Archived-At: --=-=-= Content-Type: text/plain Tags: patch Hello, this little patch allow insert any package keywords when using auto-insert for insert elisp header lines. This is more a bugfix, since there is a bug when using Vertico that get stuck in the keywords part, that bug can also apply to other completion UIs or frameworks. Also there are some packages that uses non-standard keywords, i think it would be better allowing insert other keywords. In GNU Emacs 30.0.50 (build 1, x86_64-w64-mingw32) of 2024-05-23 built on AVALON Repository revision: 64cced2c37a9926fe6ff1c6ad9b9540abd47e21c Repository branch: master Windowing system distributor 'Microsoft Corp.', version 10.0.19045 System Description: Microsoft Windows 10 Pro (v10.0.2009.19045.4046) Configured using: 'configure --with-modules --without-dbus --with-native-compilation --without-compress-install --with-tree-sitter CFLAGS=-O2' --=-=-= Content-Type: text/patch Content-Disposition: attachment; filename=0001-Allow-insert-other-elisp-keywords-in-auto-insert.patch >From 89f990c6393d90fd76efb4e3665f431d7c0300b3 Mon Sep 17 00:00:00 2001 From: "Elias G. Perez" Date: Sat, 1 Jun 2024 16:51:54 -0600 Subject: [PATCH] Allow insert other elisp keywords in auto-insert Allow to user confirm for insert other keywords than default ones when using auto-insert in an elisp file. * lisp/autoinsert.el (auto-insert-alist): Use 'confirm' instead 't' in completing-read REQUIRE-MATCH from Emacs Lisp header template. --- lisp/autoinsert.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/autoinsert.el b/lisp/autoinsert.el index f2631422c62..561626e474b 100644 --- a/lisp/autoinsert.el +++ b/lisp/autoinsert.el @@ -212,7 +212,7 @@ auto-insert-alist finder-known-keywords "\n")) ((let ((minibuffer-help-form v2)) - (completing-read "Keyword, C-h: " v1 nil t)) + (completing-read "Keyword, C-h: " v1 nil 'confirm)) str ", ") & -2 " -- 2.44.0.windows.1 --=-=-=--