all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: Dmitry Gutov <dgutov@yandex.ru>
Cc: 44979@debbugs.gnu.org
Subject: bug#44979: project-search fails with file-missing error
Date: Fri, 30 Jul 2021 15:00:32 +0200	[thread overview]
Message-ID: <87y29oklcf.fsf@gnus.org> (raw)
In-Reply-To: <d9c52038-6287-b4eb-7491-b03087cfee87@yandex.ru> (Dmitry Gutov's message of "Tue, 1 Dec 2020 05:15:50 +0200")

Dmitry Gutov <dgutov@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





      parent reply	other threads:[~2021-07-30 13:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-01  3:15 bug#44979: project-search fails with file-missing error Dmitry Gutov
2020-12-01 15:34 ` Eli Zaretskii
2020-12-01 16:12   ` Dmitry Gutov
2020-12-01 18:25     ` Eli Zaretskii
2021-07-30 13:00 ` Lars Ingebrigtsen [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87y29oklcf.fsf@gnus.org \
    --to=larsi@gnus.org \
    --cc=44979@debbugs.gnu.org \
    --cc=dgutov@yandex.ru \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.