bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#58453: 28.2; project-query-replace-regexp fails because of directori


From: Dmitry Gutov
Subject: bug#58453: 28.2; project-query-replace-regexp fails because of directories in list
Date: Wed, 12 Oct 2022 00:06:09 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.2

On 11.10.2022 16:58, Robert Nikander via Bug reports for GNU Emacs, the Swiss army knife of text editors wrote:
Hi

I’ve been getting errors from `project-query-replace-regexp` (it just beeps and 
gives an error about something being a directory). I’ve tracked it down to 
`project--vc-list-files`, which gets a list in a variable `files` by calling 
`git ls-files`. But that returns a few directories on my system, maybe because 
I’m using git submodules. Later the error occurs with stack trace:

     Debugger entered--Lisp error: (file-error "Read error" "Is a directory” ….)
     insert-file-contents(“….”)
     fileloop-next-file(t)
     fileloop-continue()
     project-query-replace-regexp("StyleDict" "StyleMap")

I’ve fixed the bug for my purposes by adding this line to that 
`project--vc-list-files` function in `project.el`...

     (setq files (seq-remove 'file-directory-p files))

But maybe there’s a better way.

Hi!

This has been fixed on master a few months ago: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=55382

I've just bumped project.el's version to 0.8.2, you should be able to install it from GNU ELPA tomorrow (or perhaps a bit earlier).





reply via email to

[Prev in Thread] Current Thread [Next in Thread]