[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/buffer-env 21766a5052 5/5: Remove a cache invalidation
From: |
ELPA Syncer |
Subject: |
[elpa] externals/buffer-env 21766a5052 5/5: Remove a cache invalidation heuristic |
Date: |
Mon, 6 Jun 2022 06:57:20 -0400 (EDT) |
branch: externals/buffer-env
commit 21766a50525778b6d4310475d445716fbbdfcab9
Author: Augusto Stoffel <arstoffel@gmail.com>
Commit: Augusto Stoffel <arstoffel@gmail.com>
Remove a cache invalidation heuristic
In some OSs, the default PATH value can include directories that do
not exist by default, such as $HOME/bin.
---
buffer-env.el | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/buffer-env.el b/buffer-env.el
index dc54a5242f..497df7f221 100644
--- a/buffer-env.el
+++ b/buffer-env.el
@@ -184,12 +184,8 @@ When called interactively, ask for a FILE."
((buffer-env--authorize file))
(attr (file-attributes file))
(modtime (file-attribute-modification-time attr)))
- (if-let* ((cache (assoc file buffer-env-cache-alist #'file-equal-p))
- ((not (time-less-p (nth 1 cache) modtime)))
- ;; Simple test to check if a dynamic environment
- ;; generated by a functional package manager has
- ;; disappeared, in which case the cache is invalidated.
- ((seq-every-p #'file-exists-p (nth 3 cache))))
+ (if-let ((cache (assoc file buffer-env-cache-alist #'file-equal-p))
+ ((time-equal-p (nth 1 cache) modtime)))
(progn
(setq-local process-environment (nth 2 cache)
exec-path (nth 3 cache))