GNU bug report logs -
#31796
26.1; dired-do-find-regexp-and-replace fails to find multiline regexps
Previous Next
Full log
Message #110 received at 31796 <at> debbugs.gnu.org (full text, mbox):
> Now that I've dug in a little, the situation seems difficult.
>
> -Pz does work, but it forces Grep to consider the file as one long
> string. As a consequence, if we ask it to output the line number, the
> number will always be 1. That's not a helpful mode of operation.
>
> Even if it worked differently, -P imposes a significant performance penalty
> from what I see, even when the extra syntax is not actually used. So we
> couldn't enable it by default.
When a grep input pattern contains a newline, then xref could use
the same algorithm as is used for 'M-.', i.e. run 'grep -Pzl'
to get the file names that contain the pattern, then return
these file names without line numbers. This works exactly
like a new feature of extending xref-show-xrefs-function
with a new completion function was proposed recently on emacs-devel
(BTW, why it's not installed yet?)
So like this feature presenting such completions without line numbers:
lisp/progmodes/project.el:(cl-defgeneric project-root)
lisp/progmodes/project.el:(cl-defmethod project-root ((project (head transient))))
lisp/progmodes/project.el:(cl-defmethod project-root ((project (head vc))))
xref for grep could work the same way without line numbers:
lisp/progmodes/project.el:names"^Jproject--read-file-cpd-relative)
lisp/progmodes/project.el:names"^Jproject--read-file-absolute)
Then visiting such grep hit should use Emacs search functions
to find the grep hit in the visited file.
This bug report was last modified 4 years and 246 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.