From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#49700: 27.2; [PATCH] Refactor minibuffer aborting Date: Fri, 23 Jul 2021 13:31:39 +0300 Message-ID: <83sg051fuc.fsf@gnu.org> References: <87pmvaar0a.fsf@miha-pc> <834kcl37sr.fsf@gnu.org> <87h7glfq3m.fsf@miha-pc> <83wnph1o58.fsf@gnu.org> <87eebpfmxm.fsf@miha-pc> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38418"; mail-complaints-to="usenet@ciao.gmane.io" Cc: acm@muc.de, 49700@debbugs.gnu.org To: Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jul 23 12:35:13 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 1m6sWP-0009qw-Gh for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 23 Jul 2021 12:35:13 +0200 Original-Received: from localhost ([::1]:51786 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m6sWO-00036L-Fk for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 23 Jul 2021 06:35:12 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60446) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m6sUI-0008DT-DI for bug-gnu-emacs@gnu.org; Fri, 23 Jul 2021 06:33:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:59065) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m6sUI-0005BO-4x for bug-gnu-emacs@gnu.org; Fri, 23 Jul 2021 06:33:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1m6sUI-0002Uz-2p for bug-gnu-emacs@gnu.org; Fri, 23 Jul 2021 06:33:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 23 Jul 2021 10:33:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49700 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 49700-submit@debbugs.gnu.org id=B49700.16270363249538 (code B ref 49700); Fri, 23 Jul 2021 10:33:02 +0000 Original-Received: (at 49700) by debbugs.gnu.org; 23 Jul 2021 10:32:04 +0000 Original-Received: from localhost ([127.0.0.1]:42378 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m6sTM-0002Tm-Aj for submit@debbugs.gnu.org; Fri, 23 Jul 2021 06:32:04 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:34288) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m6sTK-0002T8-Cp for 49700@debbugs.gnu.org; Fri, 23 Jul 2021 06:32:03 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:35988) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m6sTD-0004J0-Sg; Fri, 23 Jul 2021 06:31:55 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:1312 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m6sTD-0007QN-Ci; Fri, 23 Jul 2021 06:31:55 -0400 In-Reply-To: <87eebpfmxm.fsf@miha-pc> 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:210560 Archived-At: > From: > Cc: acm@muc.de, 49700@debbugs.gnu.org > Date: Fri, 23 Jul 2021 10:34:45 +0200 > > > I'd prefer not to expose minibuffer-alist to Lisp if it can be > > avoided. This is a tricky area of Emacs, and exposing it to Lisp IMO > > gives Lisp programmers too much rope to hang themselves. > > Well, the minibuffer list is already kind of exposed to lisp, try: > (seq-filter #'minibufferp (buffer-list)) Then why did you need to introduce a new function? It's fine with me to use the above if it does the job. > minibuffer-alist returns a newly constructed list, similar to > buffer-list, so modifying the list structure is safe. What could be > unsafe is modifying the minibuffers themselves, renaming or killing > them. Exactly. And there are more atrocities that can be done with these buffers. > I believe that, since such actions are possible without the use > of minibuffer-alist > (for example, by evaluating (kill-buffer " *Minibuf-1")), they should > not mess up Emacs internals and it should be treated as a bug if they > do. I'd like to make that as difficult as possible. When someone reports a bug, it could take some time and effort to discover that the code does something it shouldn't, and that eats up our precious resources. Also, if we expose the list of minibuffers explicitly, and with auxiliary information on top of that, it is hard to defend the position that Lisp programs should not do anything they want with that information. > > Is it feasible to make these changes without exposing the alist? > > Yes it is feasible. If the above didn't convince you, please send > another e-mail and I will try. Thanks. Yes, please try, and thanks in advance.