[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/embark 5d560e2b3e 1/2: Fix projectless search of Consul
From: |
ELPA Syncer |
Subject: |
[elpa] externals/embark 5d560e2b3e 1/2: Fix projectless search of Consult async commands |
Date: |
Fri, 16 Jun 2023 18:58:15 -0400 (EDT) |
branch: externals/embark
commit 5d560e2b3e80554fb582de3f58dfb366b1e7f445
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>
Fix projectless search of Consult async commands
---
embark-consult.el | 7 ++++---
embark.el | 22 +++++++++++++---------
2 files changed, 17 insertions(+), 12 deletions(-)
diff --git a/embark-consult.el b/embark-consult.el
index 549cd8427d..68105e0fe7 100644
--- a/embark-consult.el
+++ b/embark-consult.el
@@ -387,9 +387,10 @@ for any action that is a Consult async command."
The values of TYPE which are considered to have an associated
directory are: file, buffer, bookmark and library. The REST of
the arguments are also passed to RUN."
- (when (embark--associated-directory target type)
- (let (consult-project-function)
- (apply run :target target :type type rest))))
+ (if (embark--associated-directory target type)
+ (let (consult-project-function)
+ (apply run :target target :type type rest))
+ (apply run :target target :type type rest)))
(map-keymap
(lambda (_key cmd)
diff --git a/embark.el b/embark.el
index 2b7c769498..4db46adc56 100644
--- a/embark.el
+++ b/embark.el
@@ -3996,15 +3996,19 @@ the REST of the arguments."
"Return directory associated to TARGET of given TYPE.
The supported values of TYPE are file, buffer, bookmark and
library, which have an obvious notion of associated directory."
- (pcase type
- ('file
- (file-name-directory target))
- ('buffer
- (buffer-local-value 'default-directory (get-buffer target)))
- ('bookmark
- (file-name-directory (bookmark-location target)))
- ('library
- (file-name-directory (locate-library target)))))
+ (setq target (pcase type
+ ('file
+ target)
+ ('buffer
+ (buffer-local-value 'default-directory (get-buffer target)))
+ ('bookmark
+ (bookmark-location target))
+ ('library
+ (locate-library target))))
+ (when target
+ (if (file-directory-p target)
+ (file-name-as-directory target)
+ (file-name-directory target))))
(autoload 'bookmark-location "bookmark")
(cl-defun embark--cd (&rest rest &key run target type &allow-other-keys)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [elpa] externals/embark 5d560e2b3e 1/2: Fix projectless search of Consult async commands,
ELPA Syncer <=