GNU bug report logs - #44979
project-search fails with file-missing error

Previous Next

Package: emacs;

Reported by: Dmitry Gutov <dgutov <at> yandex.ru>

Date: Tue, 1 Dec 2020 03:16:02 UTC

Severity: normal

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Dmitry Gutov <dgutov <at> yandex.ru>
Cc: 44979 <at> debbugs.gnu.org
Subject: Re: bug#44979: project-search fails with file-missing error
Date: Fri, 30 Jul 2021 15:00:32 +0200
Dmitry Gutov <dgutov <at> yandex.ru> writes:

> Not such what's the best solution, but either all commands which use
> fileloop should pre-filter the list with file-exists-p, or
> fileloop-next-file should skip over nonexistent files. This seems to
> work:
>
> diff --git a/lisp/fileloop.el b/lisp/fileloop.el
> index b778eca8e9..289df6d593 100644
> --- a/lisp/fileloop.el
> +++ b/lisp/fileloop.el
> @@ -120,7 +120,10 @@ fileloop-next-file
>          (kill-all-local-variables)
>          (erase-buffer)
>          (setq new next)
> -        (insert-file-contents new nil))
> +        (condition-case nil
> +            (insert-file-contents new nil)
> +          (file-missing
> +           (fileloop-next-file novisit))))

I think this makes sense, so I've pushed it to Emacs 28.  Eli noted that
there may be libraries using fileloop that doesn't want this behaviour,
but I'm having problems envisioning any.  If this turns out to be a
problem, we can add a variable to allow tweaking this behaviour, but I
think it's premature to add one before it's shown that there's a demand
for one.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




This bug report was last modified 3 years and 294 days ago.

Previous Next


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