[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/dtache e9f6794621 129/158: Rename log-directory to dire
From: |
ELPA Syncer |
Subject: |
[elpa] externals/dtache e9f6794621 129/158: Rename log-directory to directory |
Date: |
Wed, 19 Jan 2022 18:58:05 -0500 (EST) |
branch: externals/dtache
commit e9f67946218399af8e2bdabbec21221be95d1447
Author: Niklas Eklund <niklas.eklund@posteo.net>
Commit: Niklas Eklund <niklas.eklund@posteo.net>
Rename log-directory to directory
---
README.org | 2 +-
dtache.el | 22 +++++++++++-----------
test/dtache-test.el | 16 ++++++++--------
3 files changed, 20 insertions(+), 20 deletions(-)
diff --git a/README.org b/README.org
index b0e255fdd4..5fd2205076 100644
--- a/README.org
+++ b/README.org
@@ -303,7 +303,7 @@ The =dtache= package supports
[[https://www.gnu.org/software/emacs/manual/html_n
'((dtache-env . "~/bin/dtache-env")
(dtache-shell-program . "/bin/bash")
(dtache-shell-history-file . "~/.bash_history")
- (dtache-log-directory . "~/tmp")
+ (dtache-session-directory . "~/tmp")
(dtache-dtach-program . "/home/user/.local/bin/dtach")))
(connection-local-set-profiles
diff --git a/dtache.el b/dtache.el
index cd9ed5e213..adca3a2cf2 100644
--- a/dtache.el
+++ b/dtache.el
@@ -53,13 +53,13 @@
;;;;; Customizable
-(defcustom dtache-log-directory (expand-file-name "dtache"
(temporary-file-directory))
- "The directory to store `dtache' sessions."
+(defcustom dtache-session-directory (expand-file-name "dtache"
(temporary-file-directory))
+ "The directory to store sessions."
:type 'string
:group 'dtache)
(defcustom dtache-db-directory user-emacs-directory
- "The directory to store `dtache' database."
+ "The directory to store the `dtache' database."
:type 'string
:group 'dtache)
@@ -143,7 +143,7 @@ Valid values are: create, new and attach")
(defvar dtache-metadata-annotators-alist nil
"An alist of annotators for metadata.")
-(defconst dtache-session-version "0.2.1"
+(defconst dtache-session-version "0.2.2"
"The version of `dtache-session'.
This version is encoded as [package-version].[revision].")
@@ -236,7 +236,7 @@ This version is encoded as [package-version].[revision].")
(origin nil :read-only t)
(working-directory nil :read-only t)
(creation-time nil :read-only t)
- (log-directory nil :read-only t)
+ (directory nil :read-only t)
(metadata nil :read-only t)
(host nil :read-only t)
(redirect-only nil :read-only t)
@@ -481,7 +481,7 @@ compilation or shell-command the command will also kill the
window."
(defun dtache-create-session (command)
"Create a `dtache' session from COMMAND."
- (dtache--create-log-directory)
+ (dtache--create-session-directory)
(let ((session
(dtache--session-create :id (intern (dtache--create-id command))
:command command
@@ -492,7 +492,7 @@ compilation or shell-command the command will also kill the
window."
:creation-time (time-to-seconds
(current-time))
:status 'unknown
:log-size 0
- :log-directory (file-name-as-directory
dtache-log-directory)
+ :directory (file-name-as-directory
dtache-session-directory)
:host (dtache--host)
:metadata (dtache-metadata)
:state 'active)))
@@ -726,7 +726,7 @@ Optionally CONCAT the command return command into a string."
"Return SESSION's pid."
(let* ((socket
(concat
- (dtache--session-log-directory session)
+ (dtache--session-directory session)
(symbol-name (dtache--session-id session))
".socket"))
(regexp (rx-to-string `(and "dtach " (or "-n " "-c ") ,socket)))
@@ -888,7 +888,7 @@ Optionally make the path LOCAL to host."
(remote (file-remote-p (dtache--session-working-directory session)))
(directory (concat
remote
- (dtache--session-log-directory session))))
+ (dtache--session-directory session))))
(if (and local remote)
(string-remove-prefix remote (expand-file-name file-name directory))
(expand-file-name file-name directory))))
@@ -913,12 +913,12 @@ Optionally make the path LOCAL to host."
(point-max))))
(buffer-substring beginning end)))))
-(defun dtache--create-log-directory ()
+(defun dtache--create-session-directory ()
"Create session directory if it doesn't exist."
(let ((directory
(concat
(file-remote-p default-directory)
- dtache-log-directory)))
+ dtache-session-directory)))
(unless (file-exists-p directory)
(make-directory directory t))))
diff --git a/test/dtache-test.el b/test/dtache-test.el
index a433d1cc91..54a2f6c06e 100644
--- a/test/dtache-test.el
+++ b/test/dtache-test.el
@@ -32,7 +32,7 @@
"Initialize a dtache database and evaluate BODY."
`(let* ((temp-directory (make-temp-file "dtache" t))
(dtache-db-directory (expand-file-name "dtache.db" temp-directory))
- (dtache-log-directory (expand-file-name "sessions" temp-directory))
+ (dtache-session-directory (expand-file-name "sessions"
temp-directory))
(dtache--sessions)
(dtache--sessions-initialized)
(dtache--remote-session-timer))
@@ -113,14 +113,14 @@
;; Local files
(cl-letf* (((symbol-function #'expand-file-name) (lambda (file directory)
(concat directory file)))
((symbol-function #'file-remote-p) (lambda (_directory) nil))
- (session (dtache--session-create :id 's12345 :log-directory
"/home/user/tmp/")))
+ (session (dtache--session-create :id 's12345 :directory
"/home/user/tmp/")))
(should (string= "/home/user/tmp/s12345.log" (dtache--session-file session
'log)))
(should (string= "/home/user/tmp/s12345.socket" (dtache--session-file
session 'socket))))
;; Remote files
(cl-letf* (((symbol-function #'expand-file-name) (lambda (file directory)
(concat directory file)))
((symbol-function #'file-remote-p) (lambda (_directory)
"/ssh:foo:"))
- (session (dtache--session-create :id 's12345 :log-directory
"/home/user/tmp/")))
+ (session (dtache--session-create :id 's12345 :directory
"/home/user/tmp/")))
(should (string= "/ssh:foo:/home/user/tmp/s12345.log"
(dtache--session-file session 'log)))
(should (string= "/ssh:foo:/home/user/tmp/s12345.socket"
(dtache--session-file session 'socket)))))
@@ -202,11 +202,11 @@
(should (equal copy (car (dtache--db-get-sessions)))))))
(ert-deftest dtache-test-magic-command ()
- (let ((normal-session (dtache--session-create :log-directory "/tmp/dtache/"
+ (let ((normal-session (dtache--session-create :directory "/tmp/dtache/"
:working-directory
"/home/user/"
:command "ls -la"
:id 'foo123))
- (redirect-session (dtache--session-create :log-directory "/tmp/dtache/"
+ (redirect-session (dtache--session-create :directory "/tmp/dtache/"
:working-directory
"/home/user/"
:command "ls -la"
:redirect-only t
@@ -235,9 +235,9 @@
(cl-letf* (((symbol-function #'process-file) (lambda (_program _infile
_buffer _display &rest _args)
(insert "\"USER PID
%CPU %MEM VSZ RSS TTY STAT START TIME COMMAND\nuser 6699 0.0
0.0 4752 2304 ? Ss 13:06 0:00 dtach -n /tmp/foo.socket\nuser
6698 0.0 0.0 4752 2304 ? Ss 13:07 0:00 dtach -c
/tmp/bar.socket\n")))
- (session1 (dtache--session-create :id 'foo :log-directory
"/tmp/"))
- (session2 (dtache--session-create :id 'bar :log-directory
"/tmp/"))
- (session3 (dtache--session-create :id 'baz :log-directory
"/tmp/")))
+ (session1 (dtache--session-create :id 'foo :directory "/tmp/"))
+ (session2 (dtache--session-create :id 'bar :directory "/tmp/"))
+ (session3 (dtache--session-create :id 'baz :directory "/tmp/")))
(should (string= "6699" (dtache--session-pid session1)))
(should (string= "6698" (dtache--session-pid session2)))
(should (not (dtache--session-pid session3)))))
- [elpa] externals/dtache 2c4520a3c5 015/158: Add missing variable to tail-mode, (continued)
- [elpa] externals/dtache 2c4520a3c5 015/158: Add missing variable to tail-mode, ELPA Syncer, 2022/01/19
- [elpa] externals/dtache b247ddc6dd 077/158: Rewrite dtache-dtach-command, ELPA Syncer, 2022/01/19
- [elpa] externals/dtache 471a2f57c7 058/158: Update dtache-session-annotation, ELPA Syncer, 2022/01/19
- [elpa] externals/dtache e3a12a9dc8 073/158: Add connection local variable to timer, ELPA Syncer, 2022/01/19
- [elpa] externals/dtache 9b7e7ffd2e 086/158: Rename session-type to session-origin, ELPA Syncer, 2022/01/19
- [elpa] externals/dtache e8bc20f563 095/158: Fix error in dtache-shell-command, ELPA Syncer, 2022/01/19
- [elpa] externals/dtache c40f0b2203 102/158: Make some public functions private, ELPA Syncer, 2022/01/19
- [elpa] externals/dtache 9c16dd3751 109/158: Update active to state, ELPA Syncer, 2022/01/19
- [elpa] externals/dtache 3cc493e6b0 115/158: Add missing dtache-log-mode to detach-dwim, ELPA Syncer, 2022/01/19
- [elpa] externals/dtache ebf9b491bd 117/158: Add variable for dtache-shell-command buffer, ELPA Syncer, 2022/01/19
- [elpa] externals/dtache e9f6794621 129/158: Rename log-directory to directory,
ELPA Syncer <=
- [elpa] externals/dtache 3969524f23 125/158: Improve dtache session header, ELPA Syncer, 2022/01/19
- [elpa] externals/dtache e0a45c055c 133/158: Address error in eshell/shell extension, ELPA Syncer, 2022/01/19
- [elpa] externals/dtache 34c7d23346 088/158: Make dtache-eshell compatible with recent changes, ELPA Syncer, 2022/01/19
- [elpa] externals/dtache 2354197acb 096/158: Fix error in dtache-compile, ELPA Syncer, 2022/01/19
- [elpa] externals/dtache 5da693be75 100/158: Update CHANGELOG, ELPA Syncer, 2022/01/19
- [elpa] externals/dtache 0c8241a33d 107/158: Update actions from defvar to defcustom, ELPA Syncer, 2022/01/19
- [elpa] externals/dtache 848f3a943a 108/158: Update attach naming, ELPA Syncer, 2022/01/19
- [elpa] externals/dtache 52c82428ac 110/158: Remove documentation directory, ELPA Syncer, 2022/01/19
- [elpa] externals/dtache 9f948349a3 112/158: Rename dtache-detach to dtache-detach-dwim, ELPA Syncer, 2022/01/19
- [elpa] externals/dtache 4c47fa3ddb 122/158: Fix error in dtache-attach, ELPA Syncer, 2022/01/19