unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: <miha@kamnitnik.top>
Cc: acm@muc.de, 49700@debbugs.gnu.org
Subject: bug#49700: 27.2; [PATCH] Refactor minibuffer aborting
Date: Fri, 23 Jul 2021 13:31:39 +0300	[thread overview]
Message-ID: <83sg051fuc.fsf@gnu.org> (raw)
In-Reply-To: <87eebpfmxm.fsf@miha-pc>

> From: <miha@kamnitnik.top>
> 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.





  reply	other threads:[~2021-07-23 10:31 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-22 23:05 bug#49700: 27.2; [PATCH] Refactor minibuffer aborting miha--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-07-23  5:42 ` Eli Zaretskii
2021-07-23  7:26   ` miha--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-07-23  7:32     ` Eli Zaretskii
2021-07-23  8:34       ` miha--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-07-23 10:31         ` Eli Zaretskii [this message]
2021-07-23 11:13           ` miha--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-07-23 11:41             ` Eli Zaretskii
2021-07-23 21:03 ` Alan Mackenzie
     [not found] ` <YPsnLZa5vmDYIpxX@ACM>
2021-08-01  1:23   ` miha--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
     [not found]   ` <87im0qrmxe.fsf@miha-pc>
2021-08-06 20:14     ` Alan Mackenzie
     [not found]     ` <YQ2XHG6k6olofEb/@ACM>
2021-08-06 22:45       ` miha--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-09-17 21:47         ` miha--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-09-19 19:30           ` Alan Mackenzie
2021-09-20  6:01             ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83sg051fuc.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=49700@debbugs.gnu.org \
    --cc=acm@muc.de \
    --cc=miha@kamnitnik.top \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).