[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/embark 16c3d337f0 2/3: Merge branch 'master' of https:/
From: |
ELPA Syncer |
Subject: |
[elpa] externals/embark 16c3d337f0 2/3: Merge branch 'master' of https://github.com/oantolin/embark |
Date: |
Tue, 21 Mar 2023 10:57:59 -0400 (EDT) |
branch: externals/embark
commit 16c3d337f0ef67d680ed4d929e75e823a05332f3
Merge: fc23a52785 0c6903cb0b
Author: Omar Antolín <omar.antolin@gmail.com>
Commit: Omar Antolín <omar.antolin@gmail.com>
Merge branch 'master' of https://github.com/oantolin/embark
---
embark-consult.el | 13 ++-----------
embark.el | 4 +++-
2 files changed, 5 insertions(+), 12 deletions(-)
diff --git a/embark-consult.el b/embark-consult.el
index 06832c10c7..a8d222b296 100644
--- a/embark-consult.el
+++ b/embark-consult.el
@@ -206,17 +206,8 @@ This function is meant to be added to
`embark-collect-mode-hook'."
(defun embark-consult-goto-grep (location)
"Go to LOCATION, which should be a string with a grep match."
- ;; Actions are run in the target window, so in this case whatever
- ;; window was selected when the command that produced the
- ;; xref-location candidates ran. In particular, we inherit the
- ;; default-directory of the buffer in that window, but we really
- ;; want the default-directory of the minibuffer or collect window we
- ;; call the action from, which is the previous window, since the
- ;; location is given relative to that directory.
- (let ((default-directory (with-selected-window (previous-window)
- default-directory)))
- (consult--jump (consult--grep-position location))
- (pulse-momentary-highlight-one-line (point))))
+ (consult--jump (consult--grep-position location))
+ (pulse-momentary-highlight-one-line (point)))
(setf (alist-get 'consult-grep embark-default-action-overrides)
#'embark-consult-goto-grep)
diff --git a/embark.el b/embark.el
index 6838b32f8f..2f08fd7863 100644
--- a/embark.el
+++ b/embark.el
@@ -1904,6 +1904,7 @@ minibuffer before executing the action."
(let* ((command embark--command)
(prefix prefix-arg)
(action-window (embark--target-window t))
+ (directory default-directory)
(inject
(lambda ()
(let ((contents (minibuffer-contents)))
@@ -1937,7 +1938,8 @@ minibuffer before executing the action."
(prefix-arg prefix)
;; the next two avoid mouse dialogs
(use-dialog-box nil)
- (last-nonmenu-event 13))
+ (last-nonmenu-event 13)
+ (default-directory directory))
(embark--run-action-hooks embark-pre-action-hooks
action target quit)
(minibuffer-with-setup-hook inject