GNU bug report logs - #67702
30.0.50; insert-register can no longer be used in minibuffer

Previous Next

Package: emacs;

Reported by: Kun Liu <kun.liu <at> gmail.com>

Date: Thu, 7 Dec 2023 22:35:01 UTC

Severity: normal

Found in version 30.0.50

To reply to this bug, email your comments to 67702 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#67702; Package emacs. (Thu, 07 Dec 2023 22:35:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Kun Liu <kun.liu <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Thu, 07 Dec 2023 22:35:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Kun Liu <kun.liu <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 30.0.50; insert-register can no longer be used in minibuffer
Date: Thu, 7 Dec 2023 14:33:33 -0800
[Message part 1 (text/plain, inline)]
1) Save some text in register a
2) M-x query-replace
3) in the minibuffer, type C-x r i
4) got error: "byte-code: Command attempted to use minibuffer while in
minibuffer"


In GNU Emacs 30.0.50 (build 2, x86_64-pc-linux-gnu, GTK+ Version
 3.24.24, cairo version 1.16.0) of 2023-12-07 built on debian
Repository revision: 3b1fd42732f7ca5b2db6ad6e75af1c037e1c54e4
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12011000
System Description: Debian GNU/Linux 11 (bullseye)

Configured using:
 'configure --with-native-compilation --with-tree-sitter'

Configured features:
CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ JPEG JSON
LIBOTF LIBSELINUX LIBXML2 M17N_FLT MODULES NATIVE_COMP NOTIFY INOTIFY
PDUMPER PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS
TREE_SITTER X11 XDBE XIM XINPUT2 XPM GTK3 ZLIB

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  show-paren-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  minibuffer-regexp-mode: t
  line-number-mode: t
  indent-tabs-mode: t
  transient-mark-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr compile comint ansi-osc ansi-color ring comp-run
bytecomp byte-compile comp-common rx emacsbug message mailcap yank-media
puny dired dired-loaddefs rfc822 mml mml-sec password-cache epa derived
epg rfc6068 epg-config gnus-util text-property-search time-date subr-x
mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils
mailheader cl-loaddefs cl-lib sendmail rfc2047 rfc2045 ietf-drums
mm-util mail-prsvr mail-utils rmc iso-transl tooltip cconv eldoc paren
electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel
term/x-win x-win term/common-win x-dnd touch-screen tool-bar dnd fontset
image regexp-opt fringe tabulated-list replace newcomment text-mode
lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch
easymenu timer select scroll-bar mouse jit-lock font-lock syntax
font-core term/tty-colors frame minibuffer nadvice seq simple cl-generic
indonesian philippine cham georgian utf-8-lang misc-lang vietnamese
tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek
romanian slovak czech european ethiopic indian cyrillic chinese
composite emoji-zwj charscript charprop case-table epa-hook
jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button loaddefs
theme-loaddefs faces cus-face macroexp files window text-properties
overlay sha1 md5 base64 format env code-pages mule custom widget keymap
hashtable-print-readable backquote threads dbusbind inotify
dynamic-setting system-font-setting font-render-setting cairo gtk
x-toolkit xinput2 x multi-tty move-toolbar make-network-process
native-compile emacs)

Memory information:
((conses 16 67807 9163) (symbols 48 6580 0) (strings 32 17139 1182)
 (string-bytes 1 532845) (vectors 16 12759)
 (vector-slots 8 294006 13213) (floats 8 23 63) (intervals 56 266 0)
 (buffers 992 12))
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#67702; Package emacs. (Fri, 08 Dec 2023 06:33:01 GMT) Full text and rfc822 format available.

Message #8 received at 67702 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Kun Liu <kun.liu <at> gmail.com>, Thierry Volpiatto <thievol <at> posteo.net>
Cc: 67702 <at> debbugs.gnu.org
Subject: Re: bug#67702: 30.0.50;
 insert-register can no longer be used in minibuffer
Date: Fri, 08 Dec 2023 08:32:27 +0200
> From: Kun Liu <kun.liu <at> gmail.com>
> Date: Thu, 7 Dec 2023 14:33:33 -0800
> 
> 1) Save some text in register a
> 2) M-x query-replace
> 3) in the minibuffer, type C-x r i
> 4) got error: "byte-code: Command attempted to use minibuffer while in minibuffer"

I guess register-read-with-preview should temporarily bind
enable-recursive-minibuffers to a non-nil value?  Adding Thierry to
the discussion.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#67702; Package emacs. (Fri, 08 Dec 2023 07:06:02 GMT) Full text and rfc822 format available.

Message #11 received at 67702 <at> debbugs.gnu.org (full text, mbox):

From: Thierry Volpiatto <thievol <at> posteo.net>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: Kun Liu <kun.liu <at> gmail.com>, 67702 <at> debbugs.gnu.org
Subject: Re: bug#67702: 30.0.50; insert-register can no longer be used in
 minibuffer
Date: Fri, 08 Dec 2023 07:04:53 +0000
[Message part 1 (text/plain, inline)]
Eli Zaretskii <eliz <at> gnu.org> writes:

>> From: Kun Liu <kun.liu <at> gmail.com>
>> Date: Thu, 7 Dec 2023 14:33:33 -0800
>> 
>> 1) Save some text in register a
>> 2) M-x query-replace
>> 3) in the minibuffer, type C-x r i
>> 4) got error: "byte-code: Command attempted to use minibuffer while in minibuffer"
>
> I guess register-read-with-preview should temporarily bind
> enable-recursive-minibuffers to a non-nil value?

Yes, do you want me to install this change?
I have also a pending patch to apply for bug#66394 (see it there).

> Adding Thierry to the discussion.


-- 
Thierry
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#67702; Package emacs. (Fri, 08 Dec 2023 07:15:01 GMT) Full text and rfc822 format available.

Message #14 received at 67702 <at> debbugs.gnu.org (full text, mbox):

From: Thierry Volpiatto <thievol <at> posteo.net>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: Kun Liu <kun.liu <at> gmail.com>, 67702 <at> debbugs.gnu.org
Subject: Re: bug#67702: 30.0.50; insert-register can no longer be used in
 minibuffer
Date: Fri, 08 Dec 2023 07:14:18 +0000
[Message part 1 (text/plain, inline)]
Thierry Volpiatto <thievol <at> posteo.net> writes:

> Eli Zaretskii <eliz <at> gnu.org> writes:
>
>>> From: Kun Liu <kun.liu <at> gmail.com>
>>> Date: Thu, 7 Dec 2023 14:33:33 -0800
>>> 
>>> 1) Save some text in register a
>>> 2) M-x query-replace
>>> 3) in the minibuffer, type C-x r i
>>> 4) got error: "byte-code: Command attempted to use minibuffer while in minibuffer"
>>
>> I guess register-read-with-preview should temporarily bind
>> enable-recursive-minibuffers to a non-nil value?
>
> Yes, do you want me to install this change?

Here a patch attached.

-- 
Thierry
[0001-Allow-inserting-registers-in-minibuffer-bug-67702.patch (text/x-diff, attachment)]
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#67702; Package emacs. (Fri, 08 Dec 2023 07:16:01 GMT) Full text and rfc822 format available.

Message #17 received at 67702 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Thierry Volpiatto <thievol <at> posteo.net>
Cc: kun.liu <at> gmail.com, 67702 <at> debbugs.gnu.org
Subject: Re: bug#67702: 30.0.50; insert-register can no longer be used in
 minibuffer
Date: Fri, 08 Dec 2023 09:15:17 +0200
> From: Thierry Volpiatto <thievol <at> posteo.net>
> Cc: Kun Liu <kun.liu <at> gmail.com>,  67702 <at> debbugs.gnu.org
> Date: Fri, 08 Dec 2023 07:04:53 +0000
> 
> >> 1) Save some text in register a
> >> 2) M-x query-replace
> >> 3) in the minibuffer, type C-x r i
> >> 4) got error: "byte-code: Command attempted to use minibuffer while in minibuffer"
> >
> > I guess register-read-with-preview should temporarily bind
> > enable-recursive-minibuffers to a non-nil value?
> 
> Yes, do you want me to install this change?

If you think that's the correct solution, sure.

> I have also a pending patch to apply for bug#66394 (see it there).

You said you will install that if no one objects.  I'm not sure what
was the conclusion of the discussion with Eshel about that.  If it's
unrelated, then please go ahead and install your changes in that
discussion.  In any case, perhaps you could help Eshell improve and
polish his additions, which AFAIU are supposed to provide an optional
behavior more similar to the previous one.

Thanks.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#67702; Package emacs. (Fri, 08 Dec 2023 07:32:02 GMT) Full text and rfc822 format available.

Message #20 received at 67702 <at> debbugs.gnu.org (full text, mbox):

From: Eshel Yaron <me <at> eshelyaron.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: Thierry Volpiatto <thievol <at> posteo.net>, kun.liu <at> gmail.com,
 67702 <at> debbugs.gnu.org
Subject: Re: bug#67702: 30.0.50; insert-register can no longer be used in
 minibuffer
Date: Fri, 08 Dec 2023 08:31:15 +0100
Hi Eli,

Eli Zaretskii <eliz <at> gnu.org> writes:

>> From: Thierry Volpiatto <thievol <at> posteo.net>
>> Cc: Kun Liu <kun.liu <at> gmail.com>,  67702 <at> debbugs.gnu.org
>> Date: Fri, 08 Dec 2023 07:04:53 +0000
>>
>> >> 1) Save some text in register a
>> >> 2) M-x query-replace
>> >> 3) in the minibuffer, type C-x r i
>> >> 4) got error: "byte-code: Command attempted to use minibuffer while in minibuffer"

Yes, this regression is one of the issues I pointed at with the recent
`register-read-with-preview` changes.

>> > I guess register-read-with-preview should temporarily bind
>> > enable-recursive-minibuffers to a non-nil value?
>>
>> Yes, do you want me to install this change?
>
> If you think that's the correct solution, sure.

FWIW, I think it's not the right solution.  As I wrote in bug#66394, I
think it's wrong to involve the minibuffer in reading registers in any
way.  `enable-recursive-minibuffers` would make this less broken, but
only slightly.

>> I have also a pending patch to apply for bug#66394 (see it there).
>
> You said you will install that if no one objects.  I'm not sure what
> was the conclusion of the discussion with Eshel about that.

It's up to you maintainers to decide, I think.  Following your request,
I've proposed a patch that reverts Thierry's changes, and implements the
parts I find useful in a clean and backward compatible way.

> If it's unrelated, then please go ahead and install your changes in
> that discussion.  In any case, perhaps you could help Eshel improve
> and polish his additions, which AFAIU are supposed to provide an
> optional behavior more similar to the previous one.

That'd be nice, thanks.


Best,

Eshel





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#67702; Package emacs. (Fri, 08 Dec 2023 07:53:01 GMT) Full text and rfc822 format available.

Message #23 received at 67702 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Eshel Yaron <me <at> eshelyaron.com>
Cc: thievol <at> posteo.net, kun.liu <at> gmail.com, 67702 <at> debbugs.gnu.org
Subject: Re: bug#67702: 30.0.50; insert-register can no longer be used in
 minibuffer
Date: Fri, 08 Dec 2023 09:52:46 +0200
> From: Eshel Yaron <me <at> eshelyaron.com>
> Cc: Thierry Volpiatto <thievol <at> posteo.net>,  kun.liu <at> gmail.com,
>   67702 <at> debbugs.gnu.org
> Date: Fri, 08 Dec 2023 08:31:15 +0100
> 
> >> > I guess register-read-with-preview should temporarily bind
> >> > enable-recursive-minibuffers to a non-nil value?
> >>
> >> Yes, do you want me to install this change?
> >
> > If you think that's the correct solution, sure.
> 
> FWIW, I think it's not the right solution.  As I wrote in bug#66394, I
> think it's wrong to involve the minibuffer in reading registers in any
> way.  `enable-recursive-minibuffers` would make this less broken, but
> only slightly.

I'm not sure I understand: if we put aside the fundamental opposition
to using read-from-minibuffer, what problems will be left if we
temporarily enable recursive-minibuffers while prompting for the
register?

> It's up to you maintainers to decide, I think.  Following your request,
> I've proposed a patch that reverts Thierry's changes, and implements the
> parts I find useful in a clean and backward compatible way.

Thierry said your patch was incomplete.  And I wonder why we need to
completely revert his changes.  My suggestion was to allow both,
controlled by user option.  Then we could see what users prefer, and
make the decision: whether to keep both or just one, and which one.  I
very much prefer this path forward than continuing to argue now which
of the two ways is the only one that's correct.

> > If it's unrelated, then please go ahead and install your changes in
> > that discussion.  In any case, perhaps you could help Eshel improve
> > and polish his additions, which AFAIU are supposed to provide an
> > optional behavior more similar to the previous one.
> 
> That'd be nice, thanks.

Agreed.  But again: please consider reworking your patch such that it
allows using the minibuffer as optional behavior.  After all, using
the minibuffer has also advantages, not just disadvantages.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#67702; Package emacs. (Fri, 08 Dec 2023 08:28:01 GMT) Full text and rfc822 format available.

Message #26 received at 67702 <at> debbugs.gnu.org (full text, mbox):

From: Eshel Yaron <me <at> eshelyaron.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: thievol <at> posteo.net, kun.liu <at> gmail.com, 67702 <at> debbugs.gnu.org
Subject: Re: bug#67702: 30.0.50; insert-register can no longer be used in
 minibuffer
Date: Fri, 08 Dec 2023 09:27:22 +0100
Eli Zaretskii <eliz <at> gnu.org> writes:

>> From: Eshel Yaron <me <at> eshelyaron.com>
>>
>> >> > I guess register-read-with-preview should temporarily bind
>> >> > enable-recursive-minibuffers to a non-nil value?
>> >>
>> >> Yes, do you want me to install this change?
>> >
>> > If you think that's the correct solution, sure.
>>
>> FWIW, I think it's not the right solution.  As I wrote in bug#66394, I
>> think it's wrong to involve the minibuffer in reading registers in any
>> way.  `enable-recursive-minibuffers` would make this less broken, but
>> only slightly.
>
> I'm not sure I understand: if we put aside the fundamental opposition
> to using read-from-minibuffer, what problems will be left if we
> temporarily enable recursive-minibuffers while prompting for the
> register?

Concretely this is still worse because starting a recursive minibuffer
hides the previous minibuffer.  So you no longer see what you're
operating on.  There are other problems that I mentioned in bug#66394,
and there's also the disadvantage that `read-from-minibuffer` switches
windows, which is redundant in this case.

>> It's up to you maintainers to decide, I think.  Following your request,
>> I've proposed a patch that reverts Thierry's changes, and implements the
>> parts I find useful in a clean and backward compatible way.
>
> Thierry said your patch was incomplete.

Well, I requested some elaboration on that comment.  Still waiting.

> And I wonder why we need to completely revert his changes.  My
> suggestion was to allow both, controlled by user option.

That's basically what my patch does, it even makes Thierry's preferred
behavior (confirmation before overwriting registers) the default, it
just doesn't use the minibuffer for that.  AFAIU the goal of Thierry's
patch wasn't to use the minibuffer, that's an implementation detail, one
with problematic consequences.

> Then we could see what users prefer, and make the decision: whether to
> keep both or just one, and which one.  I very much prefer this path
> forward than continuing to argue now which of the two ways is the only
> one that's correct.

>> > If it's unrelated, then please go ahead and install your changes in
>> > that discussion.  In any case, perhaps you could help Eshel improve
>> > and polish his additions, which AFAIU are supposed to provide an
>> > optional behavior more similar to the previous one.
>>
>> That'd be nice, thanks.
>
> Agreed.  But again: please consider reworking your patch such that it
> allows using the minibuffer as optional behavior.  After all, using
> the minibuffer has also advantages, not just disadvantages.

I don't see these advantages.  Again, I think this is just an
implementation detail, and my patch provides a better implementation.
If someone would spell out these advantages, I could look into it when I
have the time.


Eshel




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#67702; Package emacs. (Fri, 08 Dec 2023 08:47:01 GMT) Full text and rfc822 format available.

Message #29 received at 67702 <at> debbugs.gnu.org (full text, mbox):

From: Thierry Volpiatto <thievol <at> posteo.net>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: kun.liu <at> gmail.com, Eshel Yaron <me <at> eshelyaron.com>, 67702 <at> debbugs.gnu.org
Subject: Re: bug#67702: 30.0.50; insert-register can no longer be used in
 minibuffer
Date: Fri, 08 Dec 2023 08:46:17 +0000
[Message part 1 (text/plain, inline)]
Eli Zaretskii <eliz <at> gnu.org> writes:

> I'm not sure I understand: if we put aside the fundamental opposition
> to using read-from-minibuffer, what problems will be left if we
> temporarily enable recursive-minibuffers while prompting for the
> register?

The only complaint now (once my two missing patches will be applied) is
that we have to use C-d to save a key sequence register e.g. for saving
C-a we have to use C-q C-a.  For jumping to such a register we have to
insert in minibuffer C-q C-a or just use the navigation keys (C-n/p).

>
>> It's up to you maintainers to decide, I think.  Following your request,
>> I've proposed a patch that reverts Thierry's changes, and implements the
>> parts I find useful in a clean and backward compatible way.
>
> Thierry said your patch was incomplete.

It is, the use of read-key is a limitation in the features we provide,
the Eshel patch, as already said have no filtering, no possibility to
configure possible new future register commands, no navigation, no
defaults  etc...
Also it reintroduce a bad implementation of the usage of read-key which
lead to things like bug#27634 (even if this one was fixed, incorrectly IMHO). 

> And I wonder why we need to completely revert his changes.

Reverting those changes would be a regression, I have now a patch that
make register behave as before:

Here the docstring of register-use-preview:

    Maybe show register preview.

    When set to `t' show a preview buffer with navigation and highlighting.
    When nil show a basic preview buffer and exit minibuffer
    immediately after insertion in minibuffer.
    When set to 'never behave as above but with no preview buffer at
    all.

IOW (setq register-use-preview nil) will behave as before.

-- 
Thierry
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#67702; Package emacs. (Fri, 08 Dec 2023 08:52:02 GMT) Full text and rfc822 format available.

Message #32 received at 67702 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Eshel Yaron <me <at> eshelyaron.com>
Cc: thievol <at> posteo.net, kun.liu <at> gmail.com, 67702 <at> debbugs.gnu.org
Subject: Re: bug#67702: 30.0.50; insert-register can no longer be used in
 minibuffer
Date: Fri, 08 Dec 2023 10:51:28 +0200
> From: Eshel Yaron <me <at> eshelyaron.com>
> Cc: thievol <at> posteo.net,  kun.liu <at> gmail.com,  67702 <at> debbugs.gnu.org
> Date: Fri, 08 Dec 2023 09:27:22 +0100
> 
> > Agreed.  But again: please consider reworking your patch such that it
> > allows using the minibuffer as optional behavior.  After all, using
> > the minibuffer has also advantages, not just disadvantages.
> 
> I don't see these advantages.

Well, Thierry does, so let's assume that some others will as well.

in general, assuming that others are definitely wrong is not always a
useful stance in such discussions.  It is better to let each one to
use the behavior they like, if that is feasible, and agree to disagree
about the rest.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#67702; Package emacs. (Fri, 08 Dec 2023 09:08:02 GMT) Full text and rfc822 format available.

Message #35 received at 67702 <at> debbugs.gnu.org (full text, mbox):

From: Eshel Yaron <me <at> eshelyaron.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: thievol <at> posteo.net, kun.liu <at> gmail.com, 67702 <at> debbugs.gnu.org
Subject: Re: bug#67702: 30.0.50; insert-register can no longer be used in
 minibuffer
Date: Fri, 08 Dec 2023 10:07:35 +0100
Eli Zaretskii <eliz <at> gnu.org> writes:

>> From: Eshel Yaron <me <at> eshelyaron.com>

>> > Agreed.  But again: please consider reworking your patch such that it
>> > allows using the minibuffer as optional behavior.  After all, using
>> > the minibuffer has also advantages, not just disadvantages.
>>
>> I don't see these advantages.
>
> Well, Thierry does, so let's assume that some others will as well.

I'm not trying to be argumentative here, I hope it's clear I'm just
trying to help avoid a regression in Emacs 30.

Now, if Thierry would be kind enough to share those use cases, that
might allow for a more productive discussion.

> in general, assuming that others are definitely wrong is not always a
> useful stance in such discussions.

Of course, I don't assume that, I apologize if that was the impression
that came across.  Note that my very next sentence was:

  If someone would spell out these advantages, I could look into it when
  I have the time.

> It is better to let each one to use the behavior they like, if that is
> feasible, and agree to disagree about the rest.

Yes, that'd be great.  But currently on the master branch the previous
behavior is nowhere to be found.  What I (and others, I think) ask for
is restoring the previous behavior, in full, at least optionally.  If my
patch isn't good enough, and there's another solution at hand, that's
absolutely fine.


Thanks,

Eshel




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#67702; Package emacs. (Fri, 08 Dec 2023 10:18:01 GMT) Full text and rfc822 format available.

Message #38 received at 67702 <at> debbugs.gnu.org (full text, mbox):

From: Thierry Volpiatto <thievol <at> posteo.net>
To: Eshel Yaron <me <at> eshelyaron.com>
Cc: kun.liu <at> gmail.com, Eli Zaretskii <eliz <at> gnu.org>, 67702 <at> debbugs.gnu.org
Subject: Re: bug#67702: 30.0.50; insert-register can no longer be used in
 minibuffer
Date: Fri, 08 Dec 2023 10:16:37 +0000
[Message part 1 (text/plain, inline)]
Eshel Yaron <me <at> eshelyaron.com> writes:

> Eli Zaretskii <eliz <at> gnu.org> writes:
>
>>> From: Eshel Yaron <me <at> eshelyaron.com>
>>>
>>> >> > I guess register-read-with-preview should temporarily bind
>>> >> > enable-recursive-minibuffers to a non-nil value?
>>> >>
>>> >> Yes, do you want me to install this change?
>>> >
>>> > If you think that's the correct solution, sure.
>>>
>>> FWIW, I think it's not the right solution.  As I wrote in bug#66394, I
>>> think it's wrong to involve the minibuffer in reading registers in any
>>> way.  `enable-recursive-minibuffers` would make this less broken, but
>>> only slightly.
>>
>> I'm not sure I understand: if we put aside the fundamental opposition
>> to using read-from-minibuffer, what problems will be left if we
>> temporarily enable recursive-minibuffers while prompting for the
>> register?
>
> Concretely this is still worse because starting a recursive minibuffer
> hides the previous minibuffer.  So you no longer see what you're
> operating on.  There are other problems that I mentioned in bug#66394,
> and there's also the disadvantage that `read-from-minibuffer` switches
> windows, which is redundant in this case.
>
>>> It's up to you maintainers to decide, I think.  Following your request,
>>> I've proposed a patch that reverts Thierry's changes, and implements the
>>> parts I find useful in a clean and backward compatible way.
>>
>> Thierry said your patch was incomplete.
>
> Well, I requested some elaboration on that comment.  Still waiting.

I gave you twice the explanations, now please read the code to understand
what's going on, thanks.

>> And I wonder why we need to completely revert his changes.  My
>> suggestion was to allow both, controlled by user option.
>
> That's basically what my patch does, it even makes Thierry's preferred
> behavior (confirmation before overwriting registers) the default, it
> just doesn't use the minibuffer for that.

No, you didn't understand what the recent changes provide, "confirmation
before overwriting registers" is only one of the features provided.
Please read the code and try all the features provided, my guess is that
you even didn't try it. 

> AFAIU the goal of Thierry's patch wasn't to use the minibuffer, that's
> an implementation detail, one with problematic consequences.

There is no consequence apart one, as I already said, the usage of C-d.


-- 
Thierry
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#67702; Package emacs. (Fri, 08 Dec 2023 10:25:02 GMT) Full text and rfc822 format available.

Message #41 received at 67702 <at> debbugs.gnu.org (full text, mbox):

From: Thierry Volpiatto <thievol <at> posteo.net>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: kun.liu <at> gmail.com, Eshel Yaron <me <at> eshelyaron.com>, 67702 <at> debbugs.gnu.org
Subject: Re: bug#67702: 30.0.50; insert-register can no longer be used in
 minibuffer
Date: Fri, 08 Dec 2023 10:23:55 +0000
[Message part 1 (text/plain, inline)]
Eli Zaretskii <eliz <at> gnu.org> writes:

>> From: Eshel Yaron <me <at> eshelyaron.com>
>> Cc: thievol <at> posteo.net,  kun.liu <at> gmail.com,  67702 <at> debbugs.gnu.org
>> Date: Fri, 08 Dec 2023 09:27:22 +0100
>> 
>> > Agreed.  But again: please consider reworking your patch such that it
>> > allows using the minibuffer as optional behavior.  After all, using
>> > the minibuffer has also advantages, not just disadvantages.
>> 
>> I don't see these advantages.
>
> Well, Thierry does, so let's assume that some others will as well.
>
> in general, assuming that others are definitely wrong is not always a
> useful stance in such discussions.  It is better to let each one to
> use the behavior they like, if that is feasible,

Eli, if you agree, I will push the last changes I made which provide the
same behavior as before (but with filtering).
Once this work will be finished, let see what people think and if the
new behavior is really not what people want we could revert completely
my changes.

Thanks.

-- 
Thierry
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#67702; Package emacs. (Fri, 08 Dec 2023 10:41:02 GMT) Full text and rfc822 format available.

Message #44 received at 67702 <at> debbugs.gnu.org (full text, mbox):

From: Eshel Yaron <me <at> eshelyaron.com>
To: Thierry Volpiatto <thievol <at> posteo.net>
Cc: kun.liu <at> gmail.com, Eli Zaretskii <eliz <at> gnu.org>, 67702 <at> debbugs.gnu.org
Subject: Re: bug#67702: 30.0.50; insert-register can no longer be used in
 minibuffer
Date: Fri, 08 Dec 2023 11:40:04 +0100
Thierry Volpiatto <thievol <at> posteo.net> writes:

> Eshel Yaron <me <at> eshelyaron.com> writes:
>
>> Well, I requested some elaboration on that comment.  Still waiting.
>
> I gave you twice the explanations

Nope, you've listed some changes that I've (intentionally) omitted, but
I kindly requested that you explain the use case for those additional
changes, i.e. in which cases they provide a tangible benefit over the
current behavior.  That's what I don't see, and your code doesn't
explain that either.





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#67702; Package emacs. (Fri, 08 Dec 2023 12:02:02 GMT) Full text and rfc822 format available.

Message #47 received at 67702 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Thierry Volpiatto <thievol <at> posteo.net>
Cc: kun.liu <at> gmail.com, me <at> eshelyaron.com, 67702 <at> debbugs.gnu.org
Subject: Re: bug#67702: 30.0.50; insert-register can no longer be used in
 minibuffer
Date: Fri, 08 Dec 2023 14:00:43 +0200
> From: Thierry Volpiatto <thievol <at> posteo.net>
> Cc: Eli Zaretskii <eliz <at> gnu.org>,  kun.liu <at> gmail.com,  67702 <at> debbugs.gnu.org
> Date: Fri, 08 Dec 2023 10:16:37 +0000
> 
> > AFAIU the goal of Thierry's patch wasn't to use the minibuffer, that's
> > an implementation detail, one with problematic consequences.
> 
> There is no consequence apart one, as I already said, the usage of C-d.

You mean C-q, I presume?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#67702; Package emacs. (Fri, 08 Dec 2023 12:12:01 GMT) Full text and rfc822 format available.

Message #50 received at 67702 <at> debbugs.gnu.org (full text, mbox):

From: Thierry Volpiatto <thievol <at> posteo.net>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: kun.liu <at> gmail.com, me <at> eshelyaron.com, 67702 <at> debbugs.gnu.org
Subject: Re: bug#67702: 30.0.50; insert-register can no longer be used in
 minibuffer
Date: Fri, 08 Dec 2023 12:11:05 +0000
[Message part 1 (text/plain, inline)]
Eli Zaretskii <eliz <at> gnu.org> writes:

>> From: Thierry Volpiatto <thievol <at> posteo.net>
>> Cc: Eli Zaretskii <eliz <at> gnu.org>,  kun.liu <at> gmail.com,  67702 <at> debbugs.gnu.org
>> Date: Fri, 08 Dec 2023 10:16:37 +0000
>> 
>> > AFAIU the goal of Thierry's patch wasn't to use the minibuffer, that's
>> > an implementation detail, one with problematic consequences.
>> 
>> There is no consequence apart one, as I already said, the usage of C-d.
>
> You mean C-q, I presume?

Yes, sorry.

-- 
Thierry
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#67702; Package emacs. (Fri, 08 Dec 2023 12:40:01 GMT) Full text and rfc822 format available.

Message #53 received at 67702 <at> debbugs.gnu.org (full text, mbox):

From: Thierry Volpiatto <thievol <at> posteo.net>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: kun.liu <at> gmail.com, me <at> eshelyaron.com, 67702 <at> debbugs.gnu.org
Subject: Re: bug#67702: 30.0.50; insert-register can no longer be used in
 minibuffer
Date: Fri, 08 Dec 2023 12:39:32 +0000
[Message part 1 (text/plain, inline)]
So to summarize here the last patches not already merged, let me know if
I can merge them.

Thanks.

PS: I will update NEWS and perhaps info once the behavior will be fully
defined.

-- 
Thierry
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#67702; Package emacs. (Fri, 08 Dec 2023 12:41:02 GMT) Full text and rfc822 format available.

Message #56 received at 67702 <at> debbugs.gnu.org (full text, mbox):

From: Thierry Volpiatto <thievol <at> posteo.net>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: kun.liu <at> gmail.com, me <at> eshelyaron.com, 67702 <at> debbugs.gnu.org
Subject: Re: bug#67702: 30.0.50; insert-register can no longer be used in
 minibuffer
Date: Fri, 08 Dec 2023 12:40:18 +0000
[Message part 1 (text/plain, inline)]
Here the patches, sorry.


-- 
Thierry
[0001-Exit-with-no-confirmation-RET-when-register-use-prev.patch (text/x-diff, attachment)]
[0002-Allow-inserting-registers-in-minibuffer-bug-67702.patch (text/x-diff, attachment)]
[0003-Add-more-options-to-register-use-preview.patch (text/x-diff, attachment)]
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#67702; Package emacs. (Fri, 08 Dec 2023 16:38:01 GMT) Full text and rfc822 format available.

Message #59 received at 67702 <at> debbugs.gnu.org (full text, mbox):

From: Thierry Volpiatto <thievol <at> posteo.net>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: kun.liu <at> gmail.com, me <at> eshelyaron.com, 67702 <at> debbugs.gnu.org
Subject: Re: bug#67702: 30.0.50; insert-register can no longer be used in
 minibuffer
Date: Fri, 08 Dec 2023 16:37:29 +0000
[Message part 1 (text/plain, inline)]
Thierry Volpiatto <thievol <at> posteo.net> writes:

> Here the patches, sorry.

Now pushed to master, after I may not have the time (and network) to work on this.

So now to have the previous behavior:

    (setq register-use-preview nil)

If people are still not happy, please revert all these changes to what
we had.

Thanks.

-- 
Thierry
[signature.asc (application/pgp-signature, inline)]

This bug report was last modified 147 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.