* bug#23284: 25.0.92; Cannot input 'Y' with dired-do-query-replace-regexp
@ 2016-04-13 20:49 Kévin Le Gouguec
2016-04-13 20:56 ` Kévin Le Gouguec
` (2 more replies)
0 siblings, 3 replies; 15+ messages in thread
From: Kévin Le Gouguec @ 2016-04-13 20:49 UTC (permalink / raw)
To: 23284
I cannot get dired-do-query-replace-regexp to replace all remaining
matches in all remaining buffers. To reproduce:
$ for f in bar baz; do echo foo > $f; done
$ emacs -Q . # works with -nw as well
m m (mark bar and baz)
Q oo RET aa RET (replace "foo" with "faa")
Y
At this point, with Emacs 24-5, 'Y' would, as the help suggests,
"replace all remaining matches in all remaining buffers with no more
questions".
With Emacs 25, 'Y' replaces one match in file bar, then leaves point
after "faa". File baz is left untouched.
There is also an *xref* buffer that pops up, with which I cannot do
anything:
- inputting 'g' yields "revert-buffer--default: Buffer does not seem to
be associated with any file";
- inputting 'r oo RET aa RET' yields "user-error: Search results out of
date".
If there is anything I can add to help reproduce and/or debug, please
let me know.
Thank you for your time!
Kévin Le Gouguec
In GNU Emacs 25.0.92.1 (i686-pc-linux-gnu, GTK+ Version 3.14.5)
of 2016-03-12 built on nc10-laptop
Windowing system distributor 'The X.Org Foundation', version 11.0.11604000
System Description: BunsenLabs GNU/Linux 8.4 (Hydrogen)
Configured using:
'configure --with-xwidgets --with-x-toolkit=gtk3'
Configured features:
XPM JPEG TIFF GIF PNG SOUND DBUS GSETTINGS NOTIFY LIBXML2 FREETYPE XFT
ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 XWIDGETS
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
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
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
line-number-mode: t
transient-mark-mode: t
Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
Load-path shadows:
None found.
Features:
(shadow sort mail-extr emacsbug message dired format-spec rfc822 mml
mml-sec epg epg-config gnus-util mm-decode mm-bodies mm-encode
mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047
rfc2045 ietf-drums mm-util help-fns help-mode easymenu cl-loaddefs pcase
cl-lib mail-prsvr mail-utils time-date mule-util tooltip eldoc electric
uniquify ediff-hook vc-hooks lisp-float-type mwheel x-win
term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe
tabulated-list newcomment elisp-mode lisp-mode prog-mode register page
menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock
syntax facemenu font-core frame cl-generic 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 charscript case-table epa-hook jka-cmpr-hook help
simple abbrev minibuffer cl-preloaded nadvice loaddefs button faces
cus-face macroexp files text-properties overlay sha1 md5 base64 format
env code-pages mule custom widget hashtable-print-readable backquote
dbusbind inotify dynamic-setting system-font-setting font-render-setting
xwidget-internal move-toolbar gtk x-toolkit x multi-tty
make-network-process emacs)
Memory information:
((conses 8 86545 7234)
(symbols 24 19614 0)
(miscs 20 45 138)
(strings 16 14179 3839)
(string-bytes 1 410620)
(vectors 8 12273)
(vector-slots 4 433725 4118)
(floats 8 167 42)
(intervals 28 190 8)
(buffers 520 11)
(heap 1024 41754 803))
^ permalink raw reply [flat|nested] 15+ messages in thread
* bug#23284: 25.0.92; Cannot input 'Y' with dired-do-query-replace-regexp
2016-04-13 20:49 bug#23284: 25.0.92; Cannot input 'Y' with dired-do-query-replace-regexp Kévin Le Gouguec
@ 2016-04-13 20:56 ` Kévin Le Gouguec
2016-04-15 8:31 ` Alexis
2016-05-05 0:43 ` Dmitry Gutov
2 siblings, 0 replies; 15+ messages in thread
From: Kévin Le Gouguec @ 2016-04-13 20:56 UTC (permalink / raw)
To: 23284
I wrote dired-do-query-replace-regexp in the title, where I obviously
meant dired-do-find-regexp-and-replace. The former was the name of the
Dired function bound to Q in Emacs 24-5 (which works fine); the latter
is the name of the same function in Emacs 25 (where I experience the
bug).
Sorry for the confusion.
^ permalink raw reply [flat|nested] 15+ messages in thread
* bug#23284: 25.0.92; Cannot input 'Y' with dired-do-query-replace-regexp
2016-04-13 20:49 bug#23284: 25.0.92; Cannot input 'Y' with dired-do-query-replace-regexp Kévin Le Gouguec
2016-04-13 20:56 ` Kévin Le Gouguec
@ 2016-04-15 8:31 ` Alexis
2016-04-16 10:02 ` Eli Zaretskii
2016-05-05 0:43 ` Dmitry Gutov
2 siblings, 1 reply; 15+ messages in thread
From: Alexis @ 2016-04-15 8:31 UTC (permalink / raw)
To: Kévin Le Gouguec; +Cc: 23284
Kévin Le Gouguec <kevin.legouguec@gmail.com> writes:
> I cannot get dired-do-query-replace-regexp to replace all
> remaining matches in all remaining buffers. To reproduce:
>
> $ for f in bar baz; do echo foo > $f; done $ emacs -Q .
> # works with -nw as well
>
> m m (mark bar and baz) Q oo RET aa RET
> (replace "foo" with "faa") Y
>
> At this point, with Emacs 24-5, 'Y' would, as the help suggests,
> "replace all remaining matches in all remaining buffers with no
> more questions".
>
> With Emacs 25, 'Y' replaces one match in file bar, then leaves
> point after "faa". File baz is left untouched.
>
> There is also an *xref* buffer that pops up, with which I cannot
> do anything:
>
> - inputting 'g' yields "revert-buffer--default: Buffer does not
> seem to
> be associated with any file";
> - inputting 'r oo RET aa RET' yields "user-error: Search results
> out of
> date".
Reproduced on emacs-25 branch as at commit 24b87a1d.
^ permalink raw reply [flat|nested] 15+ messages in thread
* bug#23284: 25.0.92; Cannot input 'Y' with dired-do-query-replace-regexp
2016-04-15 8:31 ` Alexis
@ 2016-04-16 10:02 ` Eli Zaretskii
2016-04-16 10:57 ` Dmitry Gutov
0 siblings, 1 reply; 15+ messages in thread
From: Eli Zaretskii @ 2016-04-16 10:02 UTC (permalink / raw)
To: Alexis, Dmitry Gutov; +Cc: 23284, kevin.legouguec
> From: Alexis <flexibeast@gmail.com>
> Date: Fri, 15 Apr 2016 18:31:44 +1000
> Cc: 23284@debbugs.gnu.org
>
> Kévin Le Gouguec <kevin.legouguec@gmail.com> writes:
>
> > I cannot get dired-do-query-replace-regexp to replace all
> > remaining matches in all remaining buffers. To reproduce:
> >
> > $ for f in bar baz; do echo foo > $f; done $ emacs -Q .
> > # works with -nw as well
> >
> > m m (mark bar and baz) Q oo RET aa RET
> > (replace "foo" with "faa") Y
> >
> > At this point, with Emacs 24-5, 'Y' would, as the help suggests,
> > "replace all remaining matches in all remaining buffers with no
> > more questions".
> >
> > With Emacs 25, 'Y' replaces one match in file bar, then leaves
> > point after "faa". File baz is left untouched.
> >
> > There is also an *xref* buffer that pops up, with which I cannot
> > do anything:
> >
> > - inputting 'g' yields "revert-buffer--default: Buffer does not
> > seem to
> > be associated with any file";
> > - inputting 'r oo RET aa RET' yields "user-error: Search results
> > out of
> > date".
>
> Reproduced on emacs-25 branch as at commit 24b87a1d.
Dmitry, can you please look into this?
Thanks.
^ permalink raw reply [flat|nested] 15+ messages in thread
* bug#23284: 25.0.92; Cannot input 'Y' with dired-do-query-replace-regexp
2016-04-13 20:49 bug#23284: 25.0.92; Cannot input 'Y' with dired-do-query-replace-regexp Kévin Le Gouguec
2016-04-13 20:56 ` Kévin Le Gouguec
2016-04-15 8:31 ` Alexis
@ 2016-05-05 0:43 ` Dmitry Gutov
2016-05-05 15:54 ` Eli Zaretskii
2 siblings, 1 reply; 15+ messages in thread
From: Dmitry Gutov @ 2016-05-05 0:43 UTC (permalink / raw)
To: Kévin Le Gouguec, 23284, Eli Zaretskii
On 04/13/2016 11:49 PM, Kévin Le Gouguec wrote:
> With Emacs 25, 'Y' replaces one match in file bar, then leaves point
> after "faa". File baz is left untouched.
This should be fixed now in emacs-25 with commit
922c7a3e48e649ad67bd12b1f83343b730dd1bc4. Thanks again for the report.
> - inputting 'r oo RET aa RET' yields "user-error: Search results out
> of date".
I've changed this to simply use `message' for now. The query-replace
will skip over outdated xrefs and offer to replace the up-to-date ones.
We've previously discussed visualizing and automatically skipping the
ones you've already answered the question about, but I'm not 100% sure
yet which approach to use, so it's probably out of scope for 25.1.
> There is also an *xref* buffer that pops up, with which I cannot do
> anything:
>
> - inputting 'g' yields "revert-buffer--default: Buffer does not seem to
> be associated with any file";
Eli, should we consider this complaint a 25.1 blocker as well? It should
be reasonably easy to resolve/implement.
^ permalink raw reply [flat|nested] 15+ messages in thread
* bug#23284: 25.0.92; Cannot input 'Y' with dired-do-query-replace-regexp
2016-05-05 0:43 ` Dmitry Gutov
@ 2016-05-05 15:54 ` Eli Zaretskii
2016-05-05 16:32 ` Dmitry Gutov
0 siblings, 1 reply; 15+ messages in thread
From: Eli Zaretskii @ 2016-05-05 15:54 UTC (permalink / raw)
To: Dmitry Gutov; +Cc: 23284, kevin.legouguec
> From: Dmitry Gutov <dgutov@yandex.ru>
> Date: Thu, 5 May 2016 03:43:17 +0300
>
> > There is also an *xref* buffer that pops up, with which I cannot do
> > anything:
> >
> > - inputting 'g' yields "revert-buffer--default: Buffer does not seem to
> > be associated with any file";
>
> Eli, should we consider this complaint a 25.1 blocker as well? It should
> be reasonably easy to resolve/implement.
I'm not sure. For starters, I don't think I understand how is this
related to the original problem, of getting the correct behavior after
typing "Y".
If it isn't related, then what exactly is the problem with 'g' in the
XREF buffer that would need to be solved for Emacs 25.1?
Thanks.
^ permalink raw reply [flat|nested] 15+ messages in thread
* bug#23284: 25.0.92; Cannot input 'Y' with dired-do-query-replace-regexp
2016-05-05 15:54 ` Eli Zaretskii
@ 2016-05-05 16:32 ` Dmitry Gutov
2016-05-05 16:49 ` Eli Zaretskii
0 siblings, 1 reply; 15+ messages in thread
From: Dmitry Gutov @ 2016-05-05 16:32 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 23284, kevin.legouguec
On 05/05/2016 06:54 PM, Eli Zaretskii wrote:
> I'm not sure. For starters, I don't think I understand how is this
> related to the original problem, of getting the correct behavior after
> typing "Y".
It's tangential.
> If it isn't related, then what exactly is the problem with 'g' in the
> XREF buffer that would need to be solved for Emacs 25.1?
That it doesn't do anything? :)
Which limits the usefulness of showing the xref buffer when doing
dired-do-find-regexp-and-replace, somewhat.
^ permalink raw reply [flat|nested] 15+ messages in thread
* bug#23284: 25.0.92; Cannot input 'Y' with dired-do-query-replace-regexp
2016-05-05 16:32 ` Dmitry Gutov
@ 2016-05-05 16:49 ` Eli Zaretskii
2016-05-05 16:55 ` Dmitry Gutov
0 siblings, 1 reply; 15+ messages in thread
From: Eli Zaretskii @ 2016-05-05 16:49 UTC (permalink / raw)
To: Dmitry Gutov; +Cc: 23284, kevin.legouguec
> Cc: kevin.legouguec@gmail.com, 23284@debbugs.gnu.org
> From: Dmitry Gutov <dgutov@yandex.ru>
> Date: Thu, 5 May 2016 19:32:21 +0300
>
> > If it isn't related, then what exactly is the problem with 'g' in the
> > XREF buffer that would need to be solved for Emacs 25.1?
>
> That it doesn't do anything? :)
>
> Which limits the usefulness of showing the xref buffer when doing
> dired-do-find-regexp-and-replace, somewhat.
So you want to bind 'g' to a command that recomputes the xref buffer
to show only the remaining matches? If so, I don't think we must have
it on emacs-25, unless 'g' does already do similar things in other
commands that present an xref buffer.
^ permalink raw reply [flat|nested] 15+ messages in thread
* bug#23284: 25.0.92; Cannot input 'Y' with dired-do-query-replace-regexp
2016-05-05 16:49 ` Eli Zaretskii
@ 2016-05-05 16:55 ` Dmitry Gutov
2016-05-05 17:09 ` Eli Zaretskii
0 siblings, 1 reply; 15+ messages in thread
From: Dmitry Gutov @ 2016-05-05 16:55 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 23284, kevin.legouguec
On 05/05/2016 07:49 PM, Eli Zaretskii wrote:
> So you want to bind 'g' to a command that recomputes the xref buffer
> to show only the remaining matches?
No, to repeat the search, so that the results are up to date. If the
user answered `y' to all replacement prompts, then yes, the new results
will only include the remaining matches. Otherwise, they will also
include the skipped ones.
I could be handy to refresh the search results buffer after finishing
with replacements, just to get an overview of the ones the user skipped,
to make sure they didn't miss anything important.
> If so, I don't think we must have
> it on emacs-25, unless 'g' does already do similar things in other
> commands that present an xref buffer.
It will be a solution for all xref buffers, touching more or less all
commands that show them.
All right, not in emacs-25, then.
^ permalink raw reply [flat|nested] 15+ messages in thread
* bug#23284: 25.0.92; Cannot input 'Y' with dired-do-query-replace-regexp
2016-05-05 16:55 ` Dmitry Gutov
@ 2016-05-05 17:09 ` Eli Zaretskii
2016-05-06 12:39 ` Andy Moreton
2016-05-07 14:46 ` Kévin Le Gouguec
0 siblings, 2 replies; 15+ messages in thread
From: Eli Zaretskii @ 2016-05-05 17:09 UTC (permalink / raw)
To: Dmitry Gutov; +Cc: 23284, kevin.legouguec
> Cc: kevin.legouguec@gmail.com, 23284@debbugs.gnu.org
> From: Dmitry Gutov <dgutov@yandex.ru>
> Date: Thu, 5 May 2016 19:55:43 +0300
>
> > If so, I don't think we must have
> > it on emacs-25, unless 'g' does already do similar things in other
> > commands that present an xref buffer.
>
> It will be a solution for all xref buffers, touching more or less all
> commands that show them.
A good new feature.
> All right, not in emacs-25, then.
Thanks.
^ permalink raw reply [flat|nested] 15+ messages in thread
* bug#23284: 25.0.92; Cannot input 'Y' with dired-do-query-replace-regexp
2016-05-05 17:09 ` Eli Zaretskii
@ 2016-05-06 12:39 ` Andy Moreton
2016-05-06 12:43 ` Dmitry Gutov
2016-05-07 14:46 ` Kévin Le Gouguec
1 sibling, 1 reply; 15+ messages in thread
From: Andy Moreton @ 2016-05-06 12:39 UTC (permalink / raw)
To: 23284
On Thu 05 May 2016, Eli Zaretskii wrote:
>> Cc: kevin.legouguec@gmail.com, 23284@debbugs.gnu.org
>> From: Dmitry Gutov <dgutov@yandex.ru>
>> Date: Thu, 5 May 2016 19:55:43 +0300
>>
>> > If so, I don't think we must have
>> > it on emacs-25, unless 'g' does already do similar things in other
>> > commands that present an xref buffer.
>>
>> It will be a solution for all xref buffers, touching more or less all
>> commands that show them.
>
> A good new feature.
Perhaps implemented with a local binding of revert-buffer-function ?
This would give a natural meaning to revert-buffer in xref buffers.
AndyM
^ permalink raw reply [flat|nested] 15+ messages in thread
* bug#23284: 25.0.92; Cannot input 'Y' with dired-do-query-replace-regexp
2016-05-05 17:09 ` Eli Zaretskii
2016-05-06 12:39 ` Andy Moreton
@ 2016-05-07 14:46 ` Kévin Le Gouguec
2016-05-07 21:31 ` Dmitry Gutov
1 sibling, 1 reply; 15+ messages in thread
From: Kévin Le Gouguec @ 2016-05-07 14:46 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 23284, Dmitry Gutov
Thanks! I cloned the repository, checked emacs-25 out and compiled:
dired-do-find-regexp-and-replace now behaves just like
dired-do-query-replace-regexp, so the issue seems resolved!
To be very nitpicky, I still notice one difference (other than the xref
buffer popping up):
When dired-do-query-replace-regexp finishes, it prints "All files
processed" in the minibuffer. Looking at the *Messages* buffer, I see
that before that, it actually printed "Replaced n occurrence(s)" for
every file it visited.
dired-do-find-regexp-and-replace does not print "All files processed",
so all the user sees in the minibuffer is "Replaced n occurrence(s)",
where n is the number of matches in the last processed file.
It is pretty minor of course, although for a second it did make me doubt
whether all files had been processed.
My observations on the xref buffer were indeed unrelated to the problem.
I was just trying to showcase everything I could think of to work around
the bug, and hopefully, provide more symptoms to ease debugging.
^ permalink raw reply [flat|nested] 15+ messages in thread
* bug#23284: 25.0.92; Cannot input 'Y' with dired-do-query-replace-regexp
2016-05-07 14:46 ` Kévin Le Gouguec
@ 2016-05-07 21:31 ` Dmitry Gutov
0 siblings, 0 replies; 15+ messages in thread
From: Dmitry Gutov @ 2016-05-07 21:31 UTC (permalink / raw)
To: Kévin Le Gouguec, Eli Zaretskii; +Cc: 23284
On 05/07/2016 05:46 PM, Kévin Le Gouguec wrote:
> dired-do-find-regexp-and-replace does not print "All files processed",
> so all the user sees in the minibuffer is "Replaced n occurrence(s)",
> where n is the number of matches in the last processed file.
>
> It is pretty minor of course, although for a second it did make me doubt
> whether all files had been processed.
Thanks for the feedback, I've added a similar message.
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2016-05-07 21:31 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-13 20:49 bug#23284: 25.0.92; Cannot input 'Y' with dired-do-query-replace-regexp Kévin Le Gouguec
2016-04-13 20:56 ` Kévin Le Gouguec
2016-04-15 8:31 ` Alexis
2016-04-16 10:02 ` Eli Zaretskii
2016-04-16 10:57 ` Dmitry Gutov
2016-05-05 0:43 ` Dmitry Gutov
2016-05-05 15:54 ` Eli Zaretskii
2016-05-05 16:32 ` Dmitry Gutov
2016-05-05 16:49 ` Eli Zaretskii
2016-05-05 16:55 ` Dmitry Gutov
2016-05-05 17:09 ` Eli Zaretskii
2016-05-06 12:39 ` Andy Moreton
2016-05-06 12:43 ` Dmitry Gutov
2016-05-07 14:46 ` Kévin Le Gouguec
2016-05-07 21:31 ` Dmitry Gutov
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).