[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] some minor fixes for Tramp
From: |
Brian Cully |
Subject: |
[PATCH] some minor fixes for Tramp |
Date: |
Thu, 19 Jan 2023 22:33:33 -0500 |
User-agent: |
mu4e 1.8.8; emacs 29.0.50 |
Attached is a patch for a few functions that cleans up remote path
names before being passed to a REPL running remotely via Tramp. I
haven't done a thorough audit of the code to see where else things
might need to be adjusted, this is just what I've run across
through my own use.
-bjc
>From c8e8c8c68f171e3bec8e9e952b2ef7016ea04753 Mon Sep 17 00:00:00 2001
From: Brian Cully <bjc@kublai.com>
Date: Thu, 19 Jan 2023 18:13:11 -0500
Subject: [PATCH] Add more Tramp support.
* geiser-compile-file
* geiser-compile-current-buffer
* geiser-load-current-buffer
* geiser-add-to-load-path
---
elisp/geiser-compile.el | 6 +++---
elisp/geiser-repl.el | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/elisp/geiser-compile.el b/elisp/geiser-compile.el
index 9ea9fca..1f80e97 100644
--- a/elisp/geiser-compile.el
+++ b/elisp/geiser-compile.el
@@ -57,7 +57,7 @@
(defun geiser-compile-file (path)
"Compile and load Scheme file."
(interactive "FScheme file: ")
- (geiser-compile--file-op path t "Compiling"))
+ (geiser-compile--file-op (file-local-name path) t "Compiling"))
(defun geiser-compile-current-buffer (&optional restart)
"Compile and load current Scheme file.
@@ -65,7 +65,7 @@
With prefix, restart REPL before compiling the file."
(interactive "P")
(geiser-compile--ensure-repl restart)
- (geiser-compile-file (buffer-file-name (current-buffer))))
+ (geiser-compile-file (file-local-name (buffer-file-name (current-buffer)))))
(defun geiser-load-file (path)
"Load Scheme file."
@@ -79,6 +79,6 @@ With prefix, restart REPL before compiling the file."
With prefix, restart REPL before loading the file."
(interactive "P")
(geiser-compile--ensure-repl restart)
- (geiser-load-file (buffer-file-name (current-buffer))))
+ (geiser-load-file (file-local-name (buffer-file-name (current-buffer)))))
(provide 'geiser-compile)
diff --git a/elisp/geiser-repl.el b/elisp/geiser-repl.el
index 56468e7..d6bff29 100644
--- a/elisp/geiser-repl.el
+++ b/elisp/geiser-repl.el
@@ -1141,7 +1141,7 @@ With a prefix argument, force exit by killing the scheme
process."
When called interactively, this function will ask for the path to
add, defaulting to the current buffer's directory."
(interactive "DDirectory to add: ")
- (let* ((c `(:eval (:ge add-to-load-path ,(expand-file-name path))))
+ (let* ((c `(:eval (:ge add-to-load-path ,(file-local-name (expand-file-name
path)))))
(r (geiser-eval--send/result c)))
(message "%s%s added to load path" path (if r "" " couldn't be"))))
--
2.39.0
- [PATCH] some minor fixes for Tramp,
Brian Cully <=