GNU bug report logs - #78038
26.3; query-replace

Previous Next

Package: emacs;

Reported by: Niclas Olsson <olsson_lund <at> yahoo.com>

Date: Thu, 24 Apr 2025 14:41:03 UTC

Severity: normal

Found in version 26.3

To reply to this bug, email your comments to 78038 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#78038; Package emacs. (Thu, 24 Apr 2025 14:41:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Niclas Olsson <olsson_lund <at> yahoo.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Thu, 24 Apr 2025 14:41:03 GMT) Full text and rfc822 format available.

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

From: Niclas Olsson <olsson_lund <at> yahoo.com>
To: "bug-gnu-emacs <at> gnu.org" <bug-gnu-emacs <at> gnu.org>
Subject: 26.3; query-replace
Date: Thu, 24 Apr 2025 09:31:54 +0000 (UTC)
[Message part 1 (text/plain, inline)]
Hi gnu/emacs,
first: thank you all for many years of providing a great editor.
last: sorry to say but my patience with emacs >23.1 is almost gone
PLEASE, PLEASE; PLEASE start putting new behaviors disabled.The query-replace (default FROM -> TO) is a major disaster.I do not want FROM -> TO suggestions and no matter what I tryand spend on googling this crap I cant turn it off.Have you ever imagined to try out a very long FROM stringand then want to do another search/replace after???For some yers I have actually been trying more and more to leaveemacs for good, it is closing in to the the swap.The last really decent version was 23.1 something.Every single new version simply just adds more and more strangenessand more meaningless settings to figure out. I have work to do...The faces is also simply just annouying. Now left with a too darkbuffer name of the inactive buffer when having two verticals one.Cant hardly read what file is opened in the inactive before I clickin it to activate it. Have been emacs fan since 2004 but...
I have tried all setq on the:
query-replace-defaults        query-replace-from-history-variablequery-replace-from-to-separator        query-replace-helpquery-replace-highlight        query-replace-historyquery-replace-interactive        query-replace-lazy-highlightquery-replace-map        query-replace-show-replacementquery-replace-skip-read-only        query-replace-to-history-variable
but I simply cant get rid of the very annoying, totally unnecessary:(default FROM -> TO). Some settings to nil brakes everything and nothing seems to turn off something no one really needs...
The UTF handling is still after many years a constant pain which destroyssome files having swedish characters in them, iso-8859-1 is not workingcorrectly anymore.
I use emacs:privately (NT emacs on win10, a very old one but does the job)professionally: every single day. Due to all different versions I often
nowadays faces emacs behaviors I do not ask for or wants. Old  versionssilently disappears from linux distos and leaveas me and many othersscratching our heads what emacs strangeness now has been introduced inthis newer version...
Reagrds Niclas Olsson, Sweden

[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#78038; Package emacs. (Thu, 24 Apr 2025 16:09:02 GMT) Full text and rfc822 format available.

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

From: Stephen Berman <stephen.berman <at> gmx.net>
To: Niclas Olsson via "Bug reports for GNU Emacs, the Swiss army knife of
 text editors" <bug-gnu-emacs <at> gnu.org>
Cc: Niclas Olsson <olsson_lund <at> yahoo.com>, 78038 <at> debbugs.gnu.org
Subject: Re: bug#78038: 26.3; query-replace
Date: Thu, 24 Apr 2025 18:08:26 +0200
On Thu, 24 Apr 2025 09:31:54 +0000 (UTC) Niclas Olsson via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org> wrote:
[...]
> The query-replace (default FROM -> TO) is a major disaster.
> I do not want FROM -> TO suggestions and no matter what I try
> and spend on googling this crap I cant turn it off.
> Have you ever imagined to try out a very long FROM string
> and then want to do another search/replace after???
[...]
> I have tried all setq on the:
>
> query-replace-defaults
>         query-replace-from-history-variable
> query-replace-from-to-separator
>         query-replace-help
> query-replace-highlight
>         query-replace-history
> query-replace-interactive
>         query-replace-lazy-highlight
> query-replace-map
>         query-replace-show-replacement
> query-replace-skip-read-only
>         query-replace-to-history-variable
>
> but I simply cant get rid of the very annoying, totally unnecessary:
> (default FROM -> TO). [...]

Making query-replace-read-from-default return the empty string seems to
work; try adding this to your ~/.emacs file:

(setq query-replace-read-from-default (lambda () (make-string 0 32)))

Steve Berman




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#78038; Package emacs. (Thu, 24 Apr 2025 16:09:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#78038; Package emacs. (Thu, 24 Apr 2025 16:14:03 GMT) Full text and rfc822 format available.

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

From: Manuel Giraud <manuel <at> ledu-giraud.fr>
To: Niclas Olsson via "Bug reports for GNU Emacs, the Swiss army knife of
 text editors" <bug-gnu-emacs <at> gnu.org>
Cc: Niclas Olsson <olsson_lund <at> yahoo.com>, 78038 <at> debbugs.gnu.org
Subject: Re: bug#78038: 26.3; query-replace
Date: Thu, 24 Apr 2025 18:13:39 +0200
Niclas Olsson via "Bug reports for GNU Emacs, the Swiss army knife of
text editors" <bug-gnu-emacs <at> gnu.org> writes:

> Hi gnu/emacs,

[...]

> I have tried all setq on the:

[...]

Hi,

It seems that setting the following does what you want:

(setq query-replace-read-from-default (lambda () ""))

I found this by reading the code since it is not a well documented
custom.  Maybe, we should have one (?)
-- 
Manuel Giraud




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#78038; Package emacs. (Thu, 24 Apr 2025 16:15:01 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#78038; Package emacs. (Fri, 25 Apr 2025 09:10:01 GMT) Full text and rfc822 format available.

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

From: Manuel Giraud <manuel <at> ledu-giraud.fr>
To: Niclas Olsson <olsson_lund <at> yahoo.com>
Cc: "Niclas Olsson via \"Bug reports for GNU Emacs,  the Swiss army knife of
 text editors" <bug-gnu-emacs <at> gnu.org>, Manuel Giraud <manuel <at> ledu-giraud.fr>,
 78038 <at> debbugs.gnu.org <78038 <at> debbugs.gnu.org>
Subject: Re: bug#78038: 26.3; query-replace
Date: Fri, 25 Apr 2025 11:08:59 +0200
Niclas Olsson <olsson_lund <at> yahoo.com> writes:

>  Hi gnu/emacs!
> Thanks a lot for the quick reply I got. I have tried out both:
> (setq query-replace-read-from-default (lambda () ""))
> and the 
> (setq query-replace-read-from-default (lambda () (make-string 0 32)))
> Unfortunately the irritating (default FROM -> TO) still shows...I also
> did try to read and follow the code but limited in LISP knowledge and
> I didn't find anything which I didn't already try.

You'd have to tell us more about which emacs version you're using.
Those variables were introduced by commit
749ba35bf5e0974384550a0763fd27f08db0678c on Feb 1 2022.

So this probably works since version 28.2.
-- 
Manuel Giraud




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#78038; Package emacs. (Fri, 25 Apr 2025 15:48:02 GMT) Full text and rfc822 format available.

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

From: Niclas Olsson <olsson_lund <at> yahoo.com>
To: "Niclas Olsson via \"Bug reports for GNU Emacs,
 the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>, 
 Manuel Giraud <manuel <at> ledu-giraud.fr>
Cc: "78038 <at> debbugs.gnu.org" <78038 <at> debbugs.gnu.org>
Subject: Re: bug#78038: 26.3; query-replace
Date: Fri, 25 Apr 2025 08:10:40 +0000 (UTC)
[Message part 1 (text/plain, inline)]
 Hi gnu/emacs!
Thanks a lot for the quick reply I got. I have tried out both:
(setq query-replace-read-from-default (lambda () ""))
and the 
(setq query-replace-read-from-default (lambda () (make-string 0 32)))
Unfortunately the irritating (default FROM -> TO) still shows...I also did try to read and follow the code but limited in LISP knowledge and I didn't find anything which I didn't already try.
It is rather strange a simple disable variable was missed to implement.
This show another aspect of the problem with the current and rather strange implementation:https://emacs.stackexchange.com/questions/19844/how-to-cancel-the-default-in-replace-string
It is like emacs is leaving the unix way to keep things simple.
/Regards Niclas Olsson, Sweden
    Den torsdag 24 april 2025 kl. 18:13:43 CEST, Manuel Giraud <manuel <at> ledu-giraud.fr> skrev:  
 
 Niclas Olsson via "Bug reports for GNU Emacs, the Swiss army knife of
text editors" <bug-gnu-emacs <at> gnu.org> writes:

> Hi gnu/emacs,

[...]

> I have tried all setq on the:

[...]

Hi,

It seems that setting the following does what you want:

(setq query-replace-read-from-default (lambda () ""))

I found this by reading the code since it is not a well documented
custom.  Maybe, we should have one (?)
-- 
Manuel Giraud
  
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#78038; Package emacs. (Fri, 25 Apr 2025 15:48:04 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#78038; Package emacs. (Fri, 25 Apr 2025 16:45:01 GMT) Full text and rfc822 format available.

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

From: Juri Linkov <juri <at> linkov.net>
To: Niclas Olsson <olsson_lund <at> yahoo.com>
Cc: 78038 <at> debbugs.gnu.org
Subject: Re: bug#78038: 26.3; query-replace
Date: Fri, 25 Apr 2025 19:41:10 +0300
> PLEASE, PLEASE; PLEASE start putting new behaviors disabled.
> The query-replace (default FROM -> TO) is a major disaster.

Excuse me, but (default FROM -> TO) was added in the year 2004
by commit 6f1df6d9d69a.

> Have been emacs fan since 2004 but...

By lucky coincidence (default FROM -> TO) was added
in the same year 2004.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#78038; Package emacs. (Mon, 28 Apr 2025 14:17:11 GMT) Full text and rfc822 format available.

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

From: Niclas Olsson <olsson_lund <at> yahoo.com>
To: Juri Linkov <juri <at> linkov.net>
Cc: "78038 <at> debbugs.gnu.org" <78038 <at> debbugs.gnu.org>
Subject: Re: bug#78038: 26.3; query-replace
Date: Mon, 28 Apr 2025 09:30:59 +0000 (UTC)
[Message part 1 (text/plain, inline)]
 Hi gnu/emacs
@Juri Linkov: you're excused... Some of us emacs users have paid work to do and can't and do not want to constantly ticking up versions on each and every tool. If something works then it works. The From->To didn't caught my attention since I was on an earlier version and/or didn't encounter this particular situation where it really gives issues.
@gnu/emacs:26.3 was stated to be the version by emacs itself when creating the initial mail with M-x report-emacs-bug
No errors shown trying the 2 suggestions makes me belive all was in place in 26.3 as well.
The Redhat8.1 system I work on has:
emacs/26.3(default) <L>  emacs/27.1-1  emacs/28.1  emacs/29.4    emacs/30.1  emacs/27.1               emacs/27.1-2  emacs/29.1  emacs/29.4-1  
trying any >26.3 gives massive issues with fonts sizes and something I never encountered with emacs before, many lines with:
Warning (native-compiler): libgccjit.so: error: error invoking gcc driver

and many similar warning/lines but cant copy in here due to company policies.
unfortunately from emacs 27.1 something was changed with font handling and I cant use neither of them if I do not fancy 3 times as big fonts as with 26.3... 
Again highlighting the root issue, introducing new features, new font handlings, faces etc might and changing plain old behavior always seem to be a good idea but many users were happy with how it worked before and is now forced to spend hours/days to get a newer version to look-and-feel the same, yes if it is even possible... A simple googling tells how many users disagree with the statement that new features are the best, are wanted or even needed... Some has already suggest all new features should be disabled by default. Regarding the FROM->TO I have a hard time trying to understand what problem this solved and how often a search-and-replace history is needed... but...
/Regards Niclas, Sweden    Den fredag 25 april 2025 kl. 18:44:50 CEST, Juri Linkov <juri <at> linkov.net> skrev:  
 
 > PLEASE, PLEASE; PLEASE start putting new behaviors disabled.
> The query-replace (default FROM -> TO) is a major disaster.

Excuse me, but (default FROM -> TO) was added in the year 2004
by commit 6f1df6d9d69a.

> Have been emacs fan since 2004 but...

By lucky coincidence (default FROM -> TO) was added
in the same year 2004.
  
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#78038; Package emacs. (Sat, 10 May 2025 09:25:01 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: olsson_lund <at> yahoo.com, Manuel Giraud <manuel <at> ledu-giraud.fr>
Cc: 78038 <at> debbugs.gnu.org
Subject: Re: bug#78038: 26.3; query-replace
Date: Sat, 10 May 2025 12:24:18 +0300
Ping! Niclas, could you please answer Manual's question, so we could
make progress with this issue?

> Cc: 78038 <at> debbugs.gnu.org, manuel <at> ledu-giraud.fr
> From: Manuel Giraud <manuel <at> ledu-giraud.fr>
> Date: Fri, 25 Apr 2025 11:08:59 +0200
> 
> Niclas Olsson <olsson_lund <at> yahoo.com> writes:
> 
> >  Hi gnu/emacs!
> > Thanks a lot for the quick reply I got. I have tried out both:
> > (setq query-replace-read-from-default (lambda () ""))
> > and the 
> > (setq query-replace-read-from-default (lambda () (make-string 0 32)))
> > Unfortunately the irritating (default FROM -> TO) still shows...I also
> > did try to read and follow the code but limited in LISP knowledge and
> > I didn't find anything which I didn't already try.
> 
> You'd have to tell us more about which emacs version you're using.
> Those variables were introduced by commit
> 749ba35bf5e0974384550a0763fd27f08db0678c on Feb 1 2022.
> 
> So this probably works since version 28.2.
> -- 
> Manuel Giraud
> 
> 
> 
> 




This bug report was last modified 6 days ago.

Previous Next


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