unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: miha--- via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Eli Zaretskii <eliz@gnu.org>, Lars Ingebrigtsen <larsi@gnus.org>
Cc: monnier@iro.umontreal.ca, 48925@debbugs.gnu.org
Subject: bug#48925: [PATCH] Set `minibuffer-completion-*` variables buffer-locally in a few more places
Date: Thu, 11 Nov 2021 17:50:33 +0100	[thread overview]
Message-ID: <87fss2hc12.fsf@miha-pc> (raw)
In-Reply-To: <83h7ci22ve.fsf@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 1710 bytes --]

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Lars Ingebrigtsen <larsi@gnus.org>
>> Cc: <miha@kamnitnik.top>,  monnier@iro.umontreal.ca,  48925@debbugs.gnu.org
>> Date: Thu, 11 Nov 2021 13:11:10 +0100
>> 
>> Eli Zaretskii <eliz@gnu.org> writes:
>> 
>> > Moving read-string to subr.el means the function will be unavailable
>> > during loadup until subr.elc is loaded.
>> 
>> That's a worry, so I tried Miha's patch now and did both a "make" and a
>> "make bootstrap", and both completed without any problems.
>
> I didn't say it will be a problem now.  But it's a time bomb waiting
> to go off.  So I'd like to see if we could still do this in C.

In that case, my personal opinion is that it's okay to leave it as is
and close this bug.

The specbinding in `read-string' isn't a very big problem. The only
problematic case I can think of is quite specific: the user runs a
function that let-binds `minibuffer-completion-table' around a call to
`read-from-minibuffer' (this is the old convention, the new convection
is to set the completion table buffer locally), and then recursively
uses `read-string' during this minibuffer session on a separate frame
with `minibuffer-follows-selected-frame' customized to nil. Completion
commands will now not work in the outer minibuffer.

IMO, it's not really worth trying too hard to figure out a way to fix
this very specific issue in C. One simple solution would be to introduce
a new optional argument to `read-from-minibuffer', a function that would
be run in the minibuffer as an alternative to
minibuffer-with-setup-hook. I believe Stefan M. proposed something like
this, but this should probably be discussed more thoroughly.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 861 bytes --]

  reply	other threads:[~2021-11-11 16:50 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-08 18:30 bug#48925: [PATCH] Set `minibuffer-completion-*` variables buffer-locally in a few more places miha--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-07-20 12:30 ` Lars Ingebrigtsen
2021-07-20 14:29 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-11-11  5:19   ` Lars Ingebrigtsen
2021-11-11 10:42     ` miha--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-11-11 11:27       ` Eli Zaretskii
2021-11-11 12:11         ` Lars Ingebrigtsen
2021-11-11 14:17           ` Eli Zaretskii
2021-11-11 16:50             ` miha--- via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2021-11-12  2:47             ` Lars Ingebrigtsen
2021-11-12  8:57               ` Eli Zaretskii
2021-11-14  0:49                 ` Lars Ingebrigtsen
2021-11-14  6:57                   ` Eli Zaretskii
2021-11-15  5:31                     ` Lars Ingebrigtsen
2021-11-11 13:04         ` miha--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-11-11 23:58         ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-11-12  0:22           ` Gregory Heytings

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=87fss2hc12.fsf@miha-pc \
    --to=bug-gnu-emacs@gnu.org \
    --cc=48925@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=larsi@gnus.org \
    --cc=miha@kamnitnik.top \
    --cc=monnier@iro.umontreal.ca \
    /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).