GNU bug report logs - #79356
31.0.50; 'C-x p r' fails when there are .gpg files EPA can't decrypt

Previous Next

Package: emacs;

Reported by: Sean Whitton <spwhitton <at> spwhitton.name>

Date: Sun, 31 Aug 2025 16:26:02 UTC

Severity: normal

Found in version 31.0.50

Fixed in version 31.1

Done: Sean Whitton <spwhitton <at> spwhitton.name>

Full log


View this message in rfc822 format

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Sean Whitton <spwhitton <at> spwhitton.name>
Cc: 79356 <at> debbugs.gnu.org
Subject: bug#79356: 31.0.50; 'C-x p r' fails when there are .gpg files EPA can't decrypt
Date: Tue, 02 Sep 2025 10:00:31 -0400
> From 056938803a5502f8427c6e97a74fa5b29a1d60c9 Mon Sep 17 00:00:00 2001
> From: Sean Whitton <spwhitton <at> spwhitton.name>
> Date: Tue, 2 Sep 2025 13:42:26 +0100
> Subject: [PATCH] fileloop-next-file: Convert file-error to warnings
>
> * lisp/fileloop.el (fileloop-next-file): Catch file-error and
> convert to a delayed warning (bug#79356).
> ---
>  lisp/fileloop.el | 10 ++++++++--
>  1 file changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/lisp/fileloop.el b/lisp/fileloop.el
> index d7d2aa7e0d5..903c5cca0a7 100644
> --- a/lisp/fileloop.el
> +++ b/lisp/fileloop.el
> @@ -121,10 +121,16 @@ fileloop-next-file
>          (kill-all-local-variables)
>          (erase-buffer)
>          (setq new next)
> -        (condition-case nil
> +        (condition-case err
>              (insert-file-contents new nil)
>            (file-missing
> -           (fileloop-next-file novisit))))
> +           (fileloop-next-file novisit))
> +          (file-error
> +           ;; See bug#79356 for discussion.
> +           (let ((msg (error-message-string err)))
> +             (unless (string-search new msg)
> +               (setq msg (format "%s, %s" msg new)))
> +             (delay-warning 'file-error msg :error)))))
>        new)))

Not sure "<msg>, <new>" is the best syntax (I'd have used "<new>:
<msg>", instead), but that looks good enough to me, thanks.


        Stefan





This bug report was last modified 4 days ago.

Previous Next


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