[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/ssh-deploy ec46610 075/173: Fixed a typo and improved d
From: |
Stefan Monnier |
Subject: |
[elpa] externals/ssh-deploy ec46610 075/173: Fixed a typo and improved documentation |
Date: |
Sat, 20 Oct 2018 10:36:33 -0400 (EDT) |
branch: externals/ssh-deploy
commit ec4661059109f25df41db1800cac7ffc168fdbbc
Author: Christian Johansson <address@hidden>
Commit: Christian Johansson <address@hidden>
Fixed a typo and improved documentation
---
README.md | 75 +++++++++++++++++++++++++++++++++++++----------------------
ssh-deploy.el | 29 +++++++++++++++--------
2 files changed, 66 insertions(+), 38 deletions(-)
diff --git a/README.md b/README.md
index 30ae5ed..74032a6 100644
--- a/README.md
+++ b/README.md
@@ -3,34 +3,45 @@
The `ssh-deploy` plug-in for Emacs makes it possible to effortlessly deploy
local files and directories to remote hosts via SSH and FTP using TRAMP. It
tries to provide functions that can be easily used by custom scripts.
## Features:
-* Define syncing configuration globally or per directory (using
`DirectoryVariables`)
-* Control whether uploads should be on save or manually
-* Automatic and manual uploads of files
-* Manual downloads and uploads of directories
-* Manual downloads of files
-* Automatic and manual detection of remote changes
-* Launch remote terminals with the integrated `tramp-term` functionality (SSH)
-* Launch remote browsing using `dired-mode` (SSH)
+* Define syncing configuration globally, per directory or per file (using
`DirectoryVariables` or `File Variables`)
+* Control whether uploads of files should be automatic on save
+* Manual downloads and uploads of directories and files
+* Automatic and manual detection of remote changes of files
+* Launch remote terminals with the integrated `tramp-term` functionality (if
it's installed) (SSH)
+* Launch remote browsing using `dired-mode`
* Launch difference sessions using `ediff-mode`
* Supports asynchronous operations if `async.el` is installed. (You need to
setup an automatic authorization for this, like `~/.netrc` or key-based
authorization)
* Supports renaming and deletion of files and directories
The idea for this plug-in was to mimic the behavior of **PhpStorm** deployment
functionality.
-This application is made by Christian Johansson <address@hidden> 2016 and is
licensed under GNU General Public License 3.
+This application is made by Christian Johansson <address@hidden> 2016-2017 and
is licensed under GNU General Public License 3 (GNU GPL 3).
## Configuration
Here is a list of other variables you can set globally or per directory:
-* `ssh-deploy-root-local` The local root that should be under deployment
[string]
-* `ssh-deploy-root-remote` The remote root that should be under deployment,
should follow a `/protocol:address@hidden:path` format [string]
-* `ssh-deploy-debug` Enables debugging messages [boolean]
-* `ssh-deploy-revision-folder` The folder used for storing local revisions
[string]
-* `ssh-deploy-automatically-detect-remote-changes` Enables automatic detection
of remote changes [boolean]
-* `ssh-deploy-exclude-list` A list defining what paths to exclude from
deployment [list]
-* `ssh-deploy-async` Enables asynchronous transfers (you need to have
`async.el` installed as well) [boolean]
+* `ssh-deploy-root-local` The local root that should be under deployment
*(string)*
+* `ssh-deploy-root-remote` The remote root that should be under deployment,
should follow a `/protocol:address@hidden:path` format *(string)*
+* `ssh-deploy-debug` Enables debugging messages *(boolean)*
+* `ssh-deploy-revision-folder` The folder used for storing local revisions
*(string)*
+* `ssh-deploy-automatically-detect-remote-changes` Enables automatic detection
of remote changes *(boolean)*
+* `ssh-deploy-on-explicit-save` Enabled automatic uploads on save *(boolean)*
+* `ssh-deploy-exclude-list` A list defining what paths to exclude from
deployment *(list)*
+* `ssh-deploy-async` Enables asynchronous transfers (you need to have
`async.el` installed as well) *(boolean)*
+To avoid the *DirectoryVariables* warning add this:
+
+``` elisp
+ (put 'ssh-deploy-root-local 'safe-local-variable 'stringp)
+ (put 'ssh-deploy-root-remote 'safe-local-variable 'stringp)
+ (put 'ssh-deploy-debug 'safe-local-variable 'booleanp)
+ (put 'ssh-deploy-revision-folder 'safe-local-variable 'stringp)
+ (put 'ssh-deploy-automatically-detect-remote-changes
'safe-local-variable 'booleanp)
+ (put 'ssh-deploy-on-explicit-save 'safe-local-variable 'booleanp)
+ (put 'ssh-deploy-exclude-list 'safe-local-variable 'listp)
+ (put 'ssh-deploy-async 'safe-local-variable 'booleanp)
+```
## A setup example
@@ -68,18 +79,26 @@ Set your user and group as owner and file permissions to
`700`. Emacs should now
;; ssh-deploy - prefix = C-c C-z, f = forced upload, u = upload, d = download,
x = diff, t = terminal, b = browse
(add-to-list 'load-path "~/.emacs.d/ssh-deploy/")
(use-package ssh-deploy
- :config
- (add-hook 'after-save-hook (lambda() (if ssh-deploy-on-explicit-save
(ssh-deploy-upload-handler)) ))
- (add-hook 'find-file-hook (lambda() (if
ssh-deploy-automatically-detect-remote-changes
(ssh-deploy-remote-changes-handler)) ))
- (global-set-key (kbd "C-c C-z f") (lambda()
(interactive)(ssh-deploy-upload-handler-forced) ))
- (global-set-key (kbd "C-c C-z u") (lambda()
(interactive)(ssh-deploy-upload-handler) ))
- (global-set-key (kbd "C-c C-z D") (lambda()
(interactive)(ssh-deploy-delete-handler) ))
- (global-set-key (kbd "C-c C-z d") (lambda()
(interactive)(ssh-deploy-download-handler) ))
- (global-set-key (kbd "C-c C-z x") (lambda()
(interactive)(ssh-deploy-diff-handler) ))
- (global-set-key (kbd "C-c C-z t") (lambda()
(interactive)(ssh-deploy-remote-terminal-handler) ))
- (global-set-key (kbd "C-c C-z r") (lambda()
(interactive)(ssh-deploy-rename-handler) ))
- (global-set-key (kbd "C-c C-z e") (lambda()
(interactive)(ssh-deploy-remote-changes-handler) ))
- (global-set-key (kbd "C-c C-z b") (lambda()
(interactive)(ssh-deploy-browse-remote-handler) )))
+ :config
+ (add-hook 'after-save-hook (lambda() (if ssh-deploy-on-explicit-save
(ssh-deploy-upload-handler)) ))
+ (add-hook 'find-file-hook (lambda() (if
ssh-deploy-automatically-detect-remote-changes
(ssh-deploy-remote-changes-handler)) ))
+ (put 'ssh-deploy-root-local 'safe-local-variable 'stringp)
+ (put 'ssh-deploy-root-remote 'safe-local-variable 'stringp)
+ (put 'ssh-deploy-debug 'safe-local-variable 'booleanp)
+ (put 'ssh-deploy-revision-folder 'safe-local-variable 'stringp)
+ (put 'ssh-deploy-automatically-detect-remote-changes 'safe-local-variable
'booleanp)
+ (put 'ssh-deploy-on-explicit-save 'safe-local-variable 'booleanp)
+ (put 'ssh-deploy-exclude-list 'safe-local-variable 'listp)
+ (put 'ssh-deploy-async 'safe-local-variable 'booleanp)
+ (global-set-key (kbd "C-c C-z f") (lambda()
(interactive)(ssh-deploy-upload-handler-forced) ))
+ (global-set-key (kbd "C-c C-z u") (lambda()
(interactive)(ssh-deploy-upload-handler) ))
+ (global-set-key (kbd "C-c C-z D") (lambda()
(interactive)(ssh-deploy-delete-handler) ))
+ (global-set-key (kbd "C-c C-z d") (lambda()
(interactive)(ssh-deploy-download-handler) ))
+ (global-set-key (kbd "C-c C-z x") (lambda()
(interactive)(ssh-deploy-diff-handler) ))
+ (global-set-key (kbd "C-c C-z t") (lambda()
(interactive)(ssh-deploy-remote-terminal-handler) ))
+ (global-set-key (kbd "C-c C-z r") (lambda()
(interactive)(ssh-deploy-rename-handler) ))
+ (global-set-key (kbd "C-c C-z e") (lambda()
(interactive)(ssh-deploy-remote-changes-handler) ))
+ (global-set-key (kbd "C-c C-z b") (lambda()
(interactive)(ssh-deploy-browse-remote-handler) )))
```
You can remove the `add-to-list` line if you installed via `MELPA` repository.
diff --git a/ssh-deploy.el b/ssh-deploy.el
index 37db9cd..52b2dbe 100644
--- a/ssh-deploy.el
+++ b/ssh-deploy.el
@@ -3,8 +3,8 @@
;; Author: Christian Johansson <github.com/cjohansson>
;; Maintainer: Christian Johansson <github.com/cjohansson>
;; Created: 5 Jul 2016
-;; Modified: 27 Jul 2017
-;; Version: 1.57
+;; Modified: 11 Jul 2017
+;; Version: 1.58
;; Keywords: tools, convenience
;; URL: https://github.com/cjohansson/emacs-ssh-deploy
@@ -50,6 +50,12 @@
;; - To setup automatic storing of base revisions and download of external
changes do this:
;; (add-hook 'find-file-hook (lambda() (if
ssh-deploy-automatically-detect-remote-changes
(ssh-deploy-remote-changes-handler)) ))
;;
+;; - To avoid the directory variables warning add this:
+;; (put 'ssh-deploy-root-local 'safe-local-variable 'identity)
+;; (put 'ssh-deploy-root-remote 'safe-local-variable 'identity)
+;; (put 'ssh-deploy-on-explicit-save 'safe-local-variable 'identity)
+;; (put 'ssh-deploy-async 'safe-local-variable 'identity)
+;;
;; - To set key-bindings do something like this:
;; (global-set-key (kbd "C-c C-z f") (lambda()
(interactive)(ssh-deploy-upload-handler-forced) ))
;; (global-set-key (kbd "C-c C-z u") (lambda()
(interactive)(ssh-deploy-upload-handler) ))
@@ -57,7 +63,7 @@
;; (global-set-key (kbd "C-c C-z d") (lambda()
(interactive)(ssh-deploy-download-handler) ))
;; (global-set-key (kbd "C-c C-z x") (lambda()
(interactive)(ssh-deploy-diff-handler) ))
;; (global-set-key (kbd "C-c C-z t") (lambda()
(interactive)(ssh-deploy-remote-terminal-handler) ))
-;; (global-set-key (kbd "C-c C-z r") (lambda()
(interactive)(ssh-deploy-rename-handler) ))
+;; (global-set-key (kbd "C-c C-z R") (lambda()
(interactive)(ssh-deploy-rename-handler) ))
;; (global-set-key (kbd "C-c C-z e") (lambda()
(interactive)(ssh-deploy-remote-changes-handler) ))
;; (global-set-key (kbd "C-c C-z b") (lambda()
(interactive)(ssh-deploy-browse-remote-handler) ))
;;
@@ -79,12 +85,15 @@
;;
;;
;; Here is a list of other variables you can set globally or per directory:
-;; * `ssh-deploy-debug' Enables debugging messages
-;; * `ssh-deploy-revision-folder' The folder used for storing local revisions
-;; * `ssh-deploy-automatically-detect-remote-changes' Enables automatic
detection of remote changes
-;; * `ssh-deploy-exclude-list' A list defining what paths to exclude from
deployment
-;; * `ssh-deploy-async' Enables asynchronous transfers (you need to install
`async.el' as well)
-;;
+
+;; * `ssh-deploy-root-local' The local root that should be under deployment
*(string)*
+;; * `ssh-deploy-root-remote' The remote root that should be under deployment,
should follow a `/protocol:address@hidden:path` format *(string)*
+;; * `ssh-deploy-debug' Enables debugging messages *(boolean)*
+;; * `ssh-deploy-revision-folder' The folder used for storing local revisions
*(string)*
+;; * `ssh-deploy-automatically-detect-remote-changes' Enables automatic
detection of remote changes *(boolean)*
+;; * `ssh-deploy-on-explicit-save' Enabled automatic uploads on save
*(boolean)*
+;; * `ssh-deploy-exclude-list' A list defining what paths to exclude from
deployment *(list)*
+;; * `ssh-deploy-async' Enables asynchronous transfers (you need to have
`async.el` installed as well) *(boolean)*
;;
;; Please see README.md from the same repository for documentation.
@@ -417,7 +426,7 @@
(progn
(copy-file ,path
,revision-path t t t t)
(list 0 (format "Remote file
'%s' has not changed, created base revision." ,remote-path)))
- (list 1 (format "External file has
'%s' changed, please download or diff." ,remote-path))))
+ (list 1 (format "External file
'%s' has changed, please download or diff." ,remote-path))))
(list 1 "Function
ediff-file-same-contents is missing")))
(list 0 (format "Remote file '%s' doesn't
exist." ,remote-path))))
(lambda(return)
- [elpa] externals/ssh-deploy 8253251 044/173: Improved README a bit, (continued)
- [elpa] externals/ssh-deploy 8253251 044/173: Improved README a bit, Stefan Monnier, 2018/10/20
- [elpa] externals/ssh-deploy 94fc9e6 051/173: Updated readme, Stefan Monnier, 2018/10/20
- [elpa] externals/ssh-deploy 56da852 066/173: Fixed bug where plug-in reported external changes even though remote, Stefan Monnier, 2018/10/20
- [elpa] externals/ssh-deploy a627c90 057/173: Updated readme, spelling and grammar fixes, Stefan Monnier, 2018/10/20
- [elpa] externals/ssh-deploy 0e32ab3 056/173: Added support for detection of external changes in FTP and improved async signals, Stefan Monnier, 2018/10/20
- [elpa] externals/ssh-deploy 109dbb1 034/173: FTP support and refactoring completed, Stefan Monnier, 2018/10/20
- [elpa] externals/ssh-deploy 14e7700 043/173: Now uses asynchrous tranfers progressively, Stefan Monnier, 2018/10/20
- [elpa] externals/ssh-deploy 97d803d 004/173: Updated comments and changed license in preparation for MELPA submission., Stefan Monnier, 2018/10/20
- [elpa] externals/ssh-deploy de8eadd 067/173: Remote path is not shell escaped on upload and download because it, Stefan Monnier, 2018/10/20
- [elpa] externals/ssh-deploy 6d1c10c 069/173: Improved documentation, Stefan Monnier, 2018/10/20
- [elpa] externals/ssh-deploy ec46610 075/173: Fixed a typo and improved documentation,
Stefan Monnier <=
- [elpa] externals/ssh-deploy c8b322a 074/173: Fixed markdown syntax, Stefan Monnier, 2018/10/20
- [elpa] externals/ssh-deploy 5e86b22 072/173: Bug fix for automatically creating missing remote directories on upload, Stefan Monnier, 2018/10/20
- [elpa] externals/ssh-deploy 4fbe568 084/173: Updated hydra example to prevent lazy loading of package, Stefan Monnier, 2018/10/20
- [elpa] externals/ssh-deploy 4c35ab7 055/173: Fixed syntax bug in MELPA description, Stefan Monnier, 2018/10/20
- [elpa] externals/ssh-deploy d324b9f 046/173: Cleaned up code structure and isolated functions, Stefan Monnier, 2018/10/20
- [elpa] externals/ssh-deploy 404aa7e 042/173: Transfers now use TRAMP asynchrously, Stefan Monnier, 2018/10/20
- [elpa] externals/ssh-deploy c04badf 048/173: Moved autoloading functions last, changed parameters for copy functions, Stefan Monnier, 2018/10/20
- [elpa] externals/ssh-deploy 3569e5e 058/173: More grammatical fixes for README.md, Stefan Monnier, 2018/10/20
- [elpa] externals/ssh-deploy 4005d0e 001/173: My initial commit, Stefan Monnier, 2018/10/20
- [elpa] externals/ssh-deploy 1c1e379 063/173: More improvement on README for force uploads, Stefan Monnier, 2018/10/20