emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[elpa] externals/embark 98bdc0f553 2/3: RET in an Embark collect buffer


From: ELPA Syncer
Subject: [elpa] externals/embark 98bdc0f553 2/3: RET in an Embark collect buffer should use original candidate
Date: Sat, 19 Feb 2022 12:57:32 -0500 (EST)

branch: externals/embark
commit 98bdc0f553d5bf0caa2c5acf828c3a8d99a5f231
Author: Omar Antolín <omar.antolin@gmail.com>
Commit: Omar Antolín <omar.antolin@gmail.com>

    RET in an Embark collect buffer should use original candidate
    
    When I introduced embark--for-display to remove invisible characters
    from candidates to improve alignment, I forgot to update
    embark-collect-choose to use the orginal candidate stored in a text
    property.
---
 embark.el | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/embark.el b/embark.el
index 80f6a3b9c7..faf39d10fc 100644
--- a/embark.el
+++ b/embark.el
@@ -2654,9 +2654,10 @@ in `find-file') or the command was called with a prefix 
argument,
 exit the minibuffer.
 
 For other Embark Collect buffers, run the default action on ENTRY."
-  (let* ((start (button-start entry))
-         (end (button-end entry))
-         (text (buffer-substring start end))) ; keep properties
+  (pcase-let ((`(_ ,text ,start . ,end)
+               (save-excursion
+                 (goto-char entry)
+                 (embark-target-collect-candidate))))
     (when (eq embark--type 'file)
       (setq text (abbreviate-file-name (expand-file-name text))))
     (if (and (eq embark-collect--kind :completions))



reply via email to

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