unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: martin rudalics <rudalics@gmx.at>,
	klubujevetru <klubujevetru@cock.li>,
	"46097@debbugs.gnu.org" <46097@debbugs.gnu.org>
Subject: bug#46097: [External] : bug#46097: 27.1; Minibuffer may not be current when running minibuffer-exit-hook
Date: Mon, 25 Jan 2021 19:45:35 +0000	[thread overview]
Message-ID: <SA2PR10MB44745EFD75E57EA855B15C12F3BD9@SA2PR10MB4474.namprd10.prod.outlook.com> (raw)
In-Reply-To: <d0e96eaa-7265-e11a-f127-fb09fb15a152@gmx.at>

Great apologies for chiming in here without
having followed the thread.  Please ignore,
if what I say is irrelevant - sorry.
___

The bug report says:

 Open the minibuffer with C-x C-f, switch to another window with C-x o
 and abort the minibuffer with C-] (abort-recursive-edit).
 minibuffer-exit-hook ends up running without the minibuffer being the
 current buffer.

 This may cause problems if a minibuffer adds a cleanup function the hook
 locally, see for example discussion at... The cleanup function fails to
 run in this situation because the local value of the hook isn't considered.

A priori, my opinion is that it's wrong for any
function on `minibuffer-exit-hook' to _assume_ that
the minibuffer window is selected when it's invoked.

If a hook function needs that window to be selected
at some point then it should select it.
___

The minibuffer is largely like other buffers.  It's a
_huge_ mistake (design mistake, user mistake, or other)
to consider that interaction with the minibuffer is, in
general, modal - that the user is locked into _only_
interacting with the minibuffer.

This mistaken assumption is not rare, I'm afraid.
That's presumably because many uses of the minibuffer
are simple, and seem to be just type-input-then-RET at
a prompt, or type-and-complete-input-then-RET.

That common use case can mislead users into thinking
that that's the "normal", or a "required", behavior.
And that's quite limiting.

And if someone with that (mis)understanding starts
modifying the Emacs code that governs minibuffer
behavior, we get misguided, overly limiting behavior
imposed on Emacs, under the guise/excuse of "clean-up"
or in the name of "consistency".

  reply	other threads:[~2021-01-25 19:45 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-25 10:44 bug#46097: 27.1; Minibuffer may not be current when running minibuffer-exit-hook klubujevetru
2021-01-25 19:04 ` martin rudalics
2021-01-25 19:45   ` Drew Adams [this message]
     [not found]   ` <877do091zg.fsf@miha-pc>
     [not found]     ` <2f217e58-bccd-e77d-6e91-a4faf666b8c9@gmx.at>
     [not found]       ` <87v9bj5zig.fsf@miha-pc>
2021-01-28 11:53         ` martin rudalics
2021-01-28 11:56           ` martin rudalics
2022-06-13 19:08 ` 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=SA2PR10MB44745EFD75E57EA855B15C12F3BD9@SA2PR10MB4474.namprd10.prod.outlook.com \
    --to=drew.adams@oracle.com \
    --cc=46097@debbugs.gnu.org \
    --cc=klubujevetru@cock.li \
    --cc=rudalics@gmx.at \
    /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).