[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/detached 8088e9d372: Update support for local sessions
From: |
ELPA Syncer |
Subject: |
[elpa] externals/detached 8088e9d372: Update support for local sessions |
Date: |
Mon, 24 Oct 2022 07:57:31 -0400 (EDT) |
branch: externals/detached
commit 8088e9d372269c627c223d0fa30cf48ec5ef767f
Author: Niklas Eklund <niklas.eklund@posteo.net>
Commit: Niklas Eklund <niklas.eklund@posteo.net>
Update support for local sessions
The session-directory is preferred to working-directory as
default-directory since the former refers to the correct host when a
local-session is being run.
Also detached--host now returns the correct value in case of
local-session.
---
detached-compile.el | 2 +-
detached.el | 6 ++++--
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/detached-compile.el b/detached-compile.el
index 43d03e9a32..745fc1fc40 100644
--- a/detached-compile.el
+++ b/detached-compile.el
@@ -88,7 +88,7 @@ Optionally EDIT-COMMAND."
(detached-session-mode 'attach)
(detached--current-session session)
(default-directory
- (detached--session-working-directory session)))
+ (detached--session-directory session)))
(compilation-start (detached--session-command session)))))
;;;;; Support functions
diff --git a/detached.el b/detached.el
index 0c5c4be847..20439139f4 100644
--- a/detached.el
+++ b/detached.el
@@ -861,7 +861,7 @@ This function uses the `notifications' library."
(inhibit-message t))
(cl-letf* (((symbol-function #'set-process-sentinel) #'ignore)
(buffer (get-buffer-create detached--shell-command-buffer))
- (default-directory (detached--session-working-directory
session))
+ (default-directory (detached--session-directory session))
(command (detached--shell-command session t)))
(when (get-buffer-process buffer)
(setq buffer (generate-new-buffer (buffer-name buffer))))
@@ -1502,7 +1502,9 @@ If SESSION is degraded fallback to a command that doesn't
rely on tee."
(defun detached--host ()
"Return a cons with (host . type)."
- (let ((remote (file-remote-p default-directory)))
+ (let ((remote
+ (and (file-remote-p default-directory)
+ (not detached-local-session))))
`(,(if remote (file-remote-p default-directory 'host) (system-name)) .
,(if remote 'remote 'local))))
(defun detached--update-session-time (session &optional approximate)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [elpa] externals/detached 8088e9d372: Update support for local sessions,
ELPA Syncer <=