GNU bug report logs - #66993
[PATCH] project.el: avoid asking user about project-list-file lock

Previous Next

Package: emacs;

Reported by: Spencer Baugh <sbaugh <at> janestreet.com>

Date: Tue, 7 Nov 2023 21:29:02 UTC

Severity: normal

Tags: patch

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Dmitry Gutov <dmitry <at> gutov.dev>
Cc: sbaugh <at> janestreet.com, 66993 <at> debbugs.gnu.org
Subject: bug#66993: [PATCH] project.el: avoid asking user about project-list-file lock
Date: Wed, 08 Nov 2023 14:29:11 +0200
> Date: Wed, 8 Nov 2023 02:24:13 +0200
> From: Dmitry Gutov <dmitry <at> gutov.dev>
> 
> Anyway, maybe an implementation like this (totally untested)?
> 
> Or the warning could be skipped entirely.
> 
> diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el
> index a6426c08840..e544dfefa73 100644
> --- a/lisp/progmodes/project.el
> +++ b/lisp/progmodes/project.el
> @@ -1719,7 +1719,9 @@ project--write-project-list
>                                   (expand-file-name name)))))
>                       project--list)
>               (current-buffer)))
> -      (write-region nil nil filename nil 'silent))))
> +      (let ((noninteractive t))
> +        (with-demoted-errors "Failed to save file list: %S"
> +          (write-region nil nil filename nil 'silent))))))

Isn't the cure worse than the disease? we are in effect disregarding
all errors that prevent us from saving the file.  If those errors are
not important, why save the list to the file at all?




This bug report was last modified 1 year and 268 days ago.

Previous Next


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