From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: miha--- via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#49700: 27.2; [PATCH] Refactor minibuffer aborting Date: Fri, 23 Jul 2021 13:13:49 +0200 Message-ID: <87v951th8y.fsf@miha-pc> References: <87pmvaar0a.fsf@miha-pc> <834kcl37sr.fsf@gnu.org> <87h7glfq3m.fsf@miha-pc> <83wnph1o58.fsf@gnu.org> <87eebpfmxm.fsf@miha-pc> <83sg051fuc.fsf@gnu.org> Reply-To: Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15976"; mail-complaints-to="usenet@ciao.gmane.io" Cc: acm@muc.de, 49700@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jul 23 13:13: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 1m6t6x-0003s3-Uf for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 23 Jul 2021 13:13:05 +0200 Original-Received: from localhost ([::1]:51760 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m6t6w-0007Xv-LQ for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 23 Jul 2021 07:12:58 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38258) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m6t63-0006r0-8p for bug-gnu-emacs@gnu.org; Fri, 23 Jul 2021 07:12:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:59082) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m6t62-0004CS-MU for bug-gnu-emacs@gnu.org; Fri, 23 Jul 2021 07:12:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1m6t62-0003Oj-GC for bug-gnu-emacs@gnu.org; Fri, 23 Jul 2021 07:12:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 23 Jul 2021 11:12: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.162703870413036 (code B ref 49700); Fri, 23 Jul 2021 11:12:02 +0000 Original-Received: (at 49700) by debbugs.gnu.org; 23 Jul 2021 11:11:44 +0000 Original-Received: from localhost ([127.0.0.1]:42395 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m6t5k-0003OC-6S for submit@debbugs.gnu.org; Fri, 23 Jul 2021 07:11:44 -0400 Original-Received: from kamnitnik.top ([209.250.245.214]:56376 helo=mail.kamnitnik.top) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m6t5g-0003O1-I4 for 49700@debbugs.gnu.org; Fri, 23 Jul 2021 07:11:42 -0400 Original-Received: from localhost (unknown [IPv6:2a00:ee2:e04:9300:e609:6c46:d026:8c47]) by mail.kamnitnik.top (Postfix) with ESMTPSA id 92683BBB71; Fri, 23 Jul 2021 11:11:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kamnitnik.top; s=mail; t=1627038698; bh=piXrHTZ3/8tJf35MYeRzodPBCsh5ixjEO0saDHD4GVs=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=exToSwci9+lnIv6fjRCPxCsFGQYlVW/ZqRALWfpM1O6+Xxp2WpnxVVtuiDCXYCefU 9HeGhIqBHYU6v6mfLpVaFBo4F3ydgz9/tKSYdZ6Fym8TnTb9Q8Hjt/tEgbK0D2+E4G YbzcdxS7DZe/ewuaJ3acBXopbpvOdaG02eq/Pyq6uuWzL4THvoTZj5nX7XgK63YzPs MwPsBtYnEPzUNWtpDglm041anoZKA5gNmByk6hnPUYKkhXSNnG8UoF0KAxyty/VGCR l3wCxY228BbUdIfScaAxFxa2YzQWx+LxaFjIBqARhR+Ry6JM6qzmWlkGIx2zpMuBO0 vqp703FS7St5w== In-Reply-To: <83sg051fuc.fsf@gnu.org> 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:210562 Archived-At: --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Eli Zaretskii writes: >> From: >> Cc: acm@muc.de, 49700@debbugs.gnu.org >> Date: Fri, 23 Jul 2021 10:34:45 +0200 >>=20 >> > 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. >>=20 >> 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. > Yes, the above returns an unsorted list of minibuffers and I don't know of any way to sort them according to depth. minibuffer-alist would return a sorted list. >> 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. > OK, I understand. >> > Is it feasible to make these changes without exposing the alist? >>=20 >> 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. OK, I will, but it might take about a week as I'm currently away. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQJHBAEBCAAxFiEEmxVnesoT5rQXvVXnswkaGpIVmT8FAmD6pG0THG1paGFAa2Ft bml0bmlrLnRvcAAKCRCzCRoakhWZP9iVEADCPbDd4krupOidxf307rMr15cW1Dwv blWTvGIKZLzr5p/72sWk7qQ3vt44lY51sjHyfv4DpAPHTOc+egfR9cCVy/WZ75Tt 0I4KukBhj5pi+D2b1wi4VHZhnX5VuSt99J34iPQYb92tZ4N/hd7en/BDoKnCWfG0 qwfm/oZHyffytDD4iDomMj6ZIrJ0+JwpNAdSGF4N6nyi+O8lTyFdc6MIUpQ5YiNW 387w3edl/GWQwyZgTUf+F+fiN8ENxcEdudm70P+gVwJrIQpqS4stqZSU0/oTGTRC snc+oWaP4EXGHzFspDf+2pyUIYb8KWnqqX12EN72ophg57L4GkZ7/C8AUw3hoaWy ntWHpAWd3Uuw6Umwtv+VZYPyoYmIG6EVt+eJu9iR3pG8wZy1Ch2HAOHMi8qiZp/0 xe6b4woyf4i0v9Zufh3fod9cn+9aoKpETYhPbd6FYEB47mUvvvlqWo5sOs2qaJnD Cow+TZXw8Lcjw9vAB7KF6qZNsNbUC95bnnn0yg89nd97i5S1n6VOhApGKPsqyGXD W9C5e5/muUj9vNKS0pPAjk3wrG5Mg75loCEU8ix+Pfx4Rf2MwS7wSNMyIxPJOdou FbpvUkSeC47QS4l4IAr9ibR1xNyqdlemLS3QLhHLJw4bGOhrHFYR9YxiCKAdAp72 81UqbrPj0KZjPQ== =bWVC -----END PGP SIGNATURE----- --=-=-=--