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

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

[elpa] externals/embark 1fc0d6385d: Fix bug: directory lines in dired ar


From: ELPA Syncer
Subject: [elpa] externals/embark 1fc0d6385d: Fix bug: directory lines in dired are not targeted as files
Date: Fri, 7 Jan 2022 10:57:33 -0500 (EST)

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

    Fix bug: directory lines in dired are not targeted as files
---
 embark.el | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/embark.el b/embark.el
index 30b597008a..ab7e06d097 100644
--- a/embark.el
+++ b/embark.el
@@ -733,7 +733,12 @@ In `dired-mode', it uses `dired-get-filename' instead."
                 ;; check the thingatpt candidate is a substring of the
                 ;; ffap candidate, this avoids URLs and keyword
                 ;; symbols when point is on the colon (see bug#52441)
-                ((string-match-p (regexp-quote tap-file) ffap-file))
+                ((string-match-p (regexp-quote
+                                  (if (derived-mode-p 'dired-mode)
+                                      ;; directory line, thingatpt includes ":"
+                                      (string-remove-suffix ":" tap-file)
+                                    tap-file))
+                                 ffap-file))
                 ((not (ffap-el-mode tap-file))))
       `(file ,(abbreviate-file-name (expand-file-name ffap-file))
              ;; TODO the boundaries may be wrong, this should be generalized.



reply via email to

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