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

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

[elpa] externals/dape b9d0579cd2 7/7: Fix relative file display in tramp


From: ELPA Syncer
Subject: [elpa] externals/dape b9d0579cd2 7/7: Fix relative file display in tramp context
Date: Mon, 15 Jan 2024 18:58:02 -0500 (EST)

branch: externals/dape
commit b9d0579cd2dc2f79f6b24a2b30123adcd3e3131a
Author: Daniel Pettersson <daniel@dpettersson.net>
Commit: Daniel Pettersson <daniel@dpettersson.net>

    Fix relative file display in tramp context
    
    Problem is in dape--guess-root which cant decide if it is going to
    return emacs file paths or adapter file paths (with or without tramp).
---
 dape.el | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/dape.el b/dape.el
index 0c423c169f..ea75e85777 100644
--- a/dape.el
+++ b/dape.el
@@ -758,6 +758,8 @@ If PULSE pulse on after opening file."
   "Guess adapter path root from CONFIG."
   ;; FIXME We need some property on the adapter telling us how it
   ;;       decided on root
+  ;; FIXME Is this function meant to return root emacs world (with tramp)
+  ;;       or adapter world w/o tramp?
   (let ((cwd (plist-get config :cwd))
         (command-cwd (plist-get config 'command-cwd)))
     (cond
@@ -864,7 +866,10 @@ If EXTENDED end of line is after newline."
                (or (and-let* ((parent (dape--parent conn)))
                      (dape--config parent))
                    (dape--config conn))))
-         (root-guess (dape--guess-root config)))
+         (root-guess (dape--guess-root config))
+         ;; Normalize paths for `file-relative-name'
+         (file (tramp-file-local-name file))
+         (root-guess (tramp-file-local-name root-guess)))
     (concat
      (string-truncate-left (file-relative-name file root-guess)
                            dape-info-file-name-max)



reply via email to

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