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

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

[nongnu] elpa/with-editor 9fc0477 040/140: with-editor-output-filter: do


From: Jonas Bernoulli
Subject: [nongnu] elpa/with-editor 9fc0477 040/140: with-editor-output-filter: don't use tramp-make-tramp-file-name
Date: Fri, 6 Aug 2021 12:51:16 -0400 (EDT)

branch: elpa/with-editor
commit 9fc047751b537178b5123fead9426d72b794b4d3
Author: Kyle Meyer <kyle@kyleam.com>
Commit: Jonas Bernoulli <jonas@bernoul.li>

    with-editor-output-filter: don't use tramp-make-tramp-file-name
    
    As of Emacs's dca22e86e0 (Introduce a defstruct `tramp-file-name' as
    central data structure, 2017-05-24), tramp-make-tramp-file-name takes
    two more positional arguments.  Instead of adding a compatibility
    kludge, use file-remote-p to construct the file name.
    
    Fixes #29.
---
 with-editor.el | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/with-editor.el b/with-editor.el
index 13e0c6a..7cb5e7b 100644
--- a/with-editor.el
+++ b/with-editor.el
@@ -82,8 +82,7 @@
 (require 'cl-lib)
 (require 'dash)
 (require 'server)
-(require 'tramp)
-(require 'tramp-sh nil t)
+(require 'shell)
 
 (and (require 'async-bytecomp nil t)
      (memq 'magit (bound-and-true-p async-bytecomp-allowed-packages))
@@ -516,10 +515,7 @@ which may or may not insert the text into the PROCESS' 
buffer."
           (with-current-buffer
               (find-file-noselect
                (if (file-name-absolute-p file)
-                   (if (tramp-tramp-file-p default-directory)
-                       (with-parsed-tramp-file-name default-directory nil
-                         (tramp-make-tramp-file-name method user host file 
hop))
-                     file)
+                   (concat (file-remote-p default-directory) file)
                  (expand-file-name file)))
             (with-editor-mode 1)
             (setq with-editor--pid pid)



reply via email to

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