[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/dtache 02ee0a9487 140/158: Utilize filenotify for remot
From: |
ELPA Syncer |
Subject: |
[elpa] externals/dtache 02ee0a9487 140/158: Utilize filenotify for remote sessions |
Date: |
Wed, 19 Jan 2022 18:58:07 -0500 (EST) |
branch: externals/dtache
commit 02ee0a9487c149eafaa214525d7d1ab50938840b
Author: Niklas Eklund <niklas.eklund@posteo.net>
Commit: Niklas Eklund <niklas.eklund@posteo.net>
Utilize filenotify for remote sessions
I haven't realized before that filenotify could watch for remote
files. This seems to work great. For Linux distributions this should
be the way to go.
---
CHANELOG.org | 1 +
dtache.el | 11 ++++++++---
2 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/CHANELOG.org b/CHANELOG.org
index 955f392015..618c8f8484 100644
--- a/CHANELOG.org
+++ b/CHANELOG.org
@@ -4,6 +4,7 @@
* Development
+- =dtache= now uses =filenotify= for both local and remote sessions. If run on
=macOS= timers are used both for local as well as remote sessions.
- Add version for =dtache-session= objects. This makes dtache not break
whenever non-backwards compatible changes are made to the dtache-session object.
- The commands for launching sessions are now renamed to resemble the non
dtache commands. The commands are =dtache-shell-command=,
=dtache-shell-send-input=, =dtache-eshell-send-input=, =dtache-compile=.
- Add action value to a session. This value is set to dtache-session-action
which is a property list optionally specifying attach, view and run properties.
These properties are then used in dwim commands to improve their functionality.
diff --git a/dtache.el b/dtache.el
index 220201cede..0c58937fcf 100644
--- a/dtache.el
+++ b/dtache.el
@@ -576,6 +576,9 @@ Optionally SUPPRESS-OUTPUT."
;; Start monitors
(thread-last (dtache--db-get-sessions)
(seq-filter (lambda (it) (eq 'active (dtache--session-state
it))))
+ (seq-remove (lambda (it) (when (dtache--session-missing-p it)
+ (dtache--db-remove-entry it)
+ t)))
(seq-do #'dtache--start-session-monitor))
;; Add `dtache-shell-mode'
@@ -1103,10 +1106,12 @@ the current time is used."
(defun dtache--start-session-monitor (session)
"Start to monitor SESSION activity."
- (if (file-remote-p (dtache--session-working-directory session))
- (dtache--session-timer-monitor session)
+ (let ((default-directory (dtache--session-working-directory session)))
(if (eq system-type 'darwin)
- (dtache--session-macos-monitor session)
+ ;; macOS requires a timer based solution
+ (if (file-remote-p default-directory)
+ (dtache--session-timer-monitor session)
+ (dtache--session-macos-monitor session))
(dtache--session-filenotify-monitor session))))
;;;;; UI
- [elpa] externals/dtache b779e7071b 104/158: Improve dtache-detach-dwim, (continued)
- [elpa] externals/dtache b779e7071b 104/158: Improve dtache-detach-dwim, ELPA Syncer, 2022/01/19
- [elpa] externals/dtache 051968ec99 111/158: Update dtache extension headers, ELPA Syncer, 2022/01/19
- [elpa] externals/dtache e1ebc053bb 116/158: Avoid saving history file for dtache-shell-command, ELPA Syncer, 2022/01/19
- [elpa] externals/dtache 561f67d075 121/158: Make remove entry delete session log, ELPA Syncer, 2022/01/19
- [elpa] externals/dtache b285ac5a0f 128/158: Update version schema for sessions, ELPA Syncer, 2022/01/19
- [elpa] externals/dtache 0e0e8c6394 126/158: Update docstring, ELPA Syncer, 2022/01/19
- [elpa] externals/dtache 31d7ffd5f7 131/158: Rename redirect-only to attachable, ELPA Syncer, 2022/01/19
- [elpa] externals/dtache 3da7747fa1 130/158: Update Versions/Contributions/Credits, ELPA Syncer, 2022/01/19
- [elpa] externals/dtache 2337bb132f 132/158: Update mode symbols, ELPA Syncer, 2022/01/19
- [elpa] externals/dtache 53cc38b385 137/158: Update Customization section in README, ELPA Syncer, 2022/01/19
- [elpa] externals/dtache 02ee0a9487 140/158: Utilize filenotify for remote sessions,
ELPA Syncer <=
- [elpa] externals/dtache 90c3d1dd90 147/158: Indent all package files, ELPA Syncer, 2022/01/19
- [elpa] externals/dtache 89df9371db 145/158: Use timer only on local macOS host, ELPA Syncer, 2022/01/19
- [elpa] externals/dtache c91ce5fd9a 151/158: Fix error on remote hosts with dtache-attach, ELPA Syncer, 2022/01/19
- [elpa] externals/dtache 3d89804c20 155/158: Improve dtache--update-session, ELPA Syncer, 2022/01/19
- [elpa] externals/dtache 6037219c0a 018/158: Update documentation, ELPA Syncer, 2022/01/19
- [elpa] externals/dtache 199c4cffaa 070/158: Update incorrect regexp for dtache-message, ELPA Syncer, 2022/01/19
- [elpa] externals/dtache b2b2b6ecd1 138/158: Fix error in dtache-attach, ELPA Syncer, 2022/01/19
- [elpa] externals/dtache 28cb384d96 143/158: Update attach with fallback, ELPA Syncer, 2022/01/19
- [elpa] externals/dtache 7ddd1e29ef 146/158: Fix error on remote hosts, ELPA Syncer, 2022/01/19
- [elpa] externals/dtache 9e0acd552d 150/158: Fix typo in dtache-test-dtach-command test, ELPA Syncer, 2022/01/19