emacs-diffs
[Top][All Lists]
Advanced

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

master 8439f834493 1/2: Catch 'permission-denied' during project lookup


From: Dmitry Gutov
Subject: master 8439f834493 1/2: Catch 'permission-denied' during project lookup
Date: Tue, 31 Oct 2023 22:02:45 -0400 (EDT)

branch: master
commit 8439f834493805017e0c44fa88a6b2e9b1a893eb
Author: Dmitry Gutov <dmitry@gutov.dev>
Commit: Dmitry Gutov <dmitry@gutov.dev>

    Catch 'permission-denied' during project lookup
    
    * lisp/progmodes/project.el (project--find-in-directory):
    Catch 'permission-denied' (bug#66317).
    
    Co-Authored-By: Spencer Baugh <sbaugh@catern.com>
---
 lisp/progmodes/project.el | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el
index ac230bd0b83..76c5144b484 100644
--- a/lisp/progmodes/project.el
+++ b/lisp/progmodes/project.el
@@ -245,7 +245,12 @@ of the project instance object."
     pr))
 
 (defun project--find-in-directory (dir)
-  (run-hook-with-args-until-success 'project-find-functions dir))
+  ;; Use 'ignore-error' when 27.1 is the minimum supported.
+  (condition-case nil
+      (run-hook-with-args-until-success 'project-find-functions dir)
+    ;; Maybe we'd like to continue to the next backend instead?  Let's
+    ;; see if somebody ever ends up in that situation.
+    (permission-denied nil)))
 
 (defvar project--within-roots-fallback nil)
 



reply via email to

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