[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/ssh-deploy fd7abe9 143/173: Mode-line status update for
From: |
Stefan Monnier |
Subject: |
[elpa] externals/ssh-deploy fd7abe9 143/173: Mode-line status update for asynchronously deleted file working |
Date: |
Sat, 20 Oct 2018 10:36:46 -0400 (EDT) |
branch: externals/ssh-deploy
commit fd7abe9b5e59b66a20b67c8df5fcdf15b272d2ce
Author: Christian Johansson <address@hidden>
Commit: Christian Johansson <address@hidden>
Mode-line status update for asynchronously deleted file working
---
ssh-deploy.el | 62 ++++++++++++++++++++++++++++++-----------------------------
1 file changed, 32 insertions(+), 30 deletions(-)
diff --git a/ssh-deploy.el b/ssh-deploy.el
index 2b25af1..4149000 100644
--- a/ssh-deploy.el
+++ b/ssh-deploy.el
@@ -791,39 +791,41 @@
(defun ssh-deploy-delete (path &optional async debug buffer)
"Delete PATH and use flags ASYNC and DEBUG, set status in BUFFER."
(if (and async (fboundp 'async-start))
- (async-start
- `(lambda()
- (if (file-exists-p ,path)
- (when (and (boundp 'buffer)
- buffer)
- (ssh-deploy--mode-line-set-status-and-update
ssh-deploy--status-deleting buffer))
- (let ((file-or-directory (not (file-directory-p ,path))))
- (progn
- (if file-or-directory
- (delete-file ,path t)
- (delete-directory ,path t t))
- (list ,path 0 buffer)))
- (list ,path 1 buffer)))
- (lambda(response)
- (when (nth 2 response)
- (ssh-deploy--mode-line-set-status-and-update
ssh-deploy--status-idle (nth 2 response))
- (kill-buffer (find-buffer-visiting (nth 2 response))))
- (cond ((= 0 (nth 1 response)) (message "Completed deletion of '%s'.
(asynchronously)" (nth 0 response)))
- (t (display-warning 'ssh-deploy (format "Did not find '%s' for
deletion. (asynchronously)" (nth 0 response)) :warning)))))
+ (progn
+ (when (and (boundp 'buffer)
+ buffer)
+ (ssh-deploy--mode-line-set-status-and-update
ssh-deploy--status-deleting buffer))
+ (async-start
+ `(lambda()
+ (if (file-exists-p ,path)
+ (let ((file-or-directory (not (file-directory-p ,path))))
+ (progn
+ (if file-or-directory
+ (delete-file ,path t)
+ (delete-directory ,path t t))
+ (list ,path 0 ,buffer)))
+ (list ,path 1 ,buffer)))
+ (lambda(response)
+ (when (nth 2 response)
+ (ssh-deploy--mode-line-set-status-and-update
ssh-deploy--status-idle (nth 2 response))
+ (kill-buffer (find-buffer-visiting (nth 2 response))))
+ (cond ((= 0 (nth 1 response)) (message "Completed deletion of '%s'.
(asynchronously)" (nth 0 response)))
+ (t (display-warning 'ssh-deploy (format "Did not find '%s'
for deletion. (asynchronously)" (nth 0 response)) :warning))))))
(if (file-exists-p path)
- (let ((file-or-directory (not (file-directory-p path))))
+ (ssh-deploy--mode-line-set-status-and-update
ssh-deploy--status-deleting buffer)
+ (let ((file-or-directory (not (file-directory-p path))))
+ (when (and (boundp 'buffer)
+ buffer)
+ (ssh-deploy--mode-line-set-status-and-update
ssh-deploy--status-deleting buffer))
+ (progn
+ (if file-or-directory
+ (delete-file path t)
+ (delete-directory path t t))
(when (and (boundp 'buffer)
buffer)
- (ssh-deploy--mode-line-set-status-and-update
ssh-deploy--status-deleting buffer))
- (progn
- (if file-or-directory
- (delete-file path t)
- (delete-directory path t t))
- (when (and (boundp 'buffer)
- buffer)
- (ssh-deploy--mode-line-set-status-and-update
ssh-deploy--status-idle)
- (kill-buffer (find-buffer-visiting buffer)))
- (message "Completed deletion of '%s'. (synchronously)" path)))
+ (ssh-deploy--mode-line-set-status-and-update
ssh-deploy--status-idle buffer)
+ (kill-buffer (find-buffer-visiting buffer)))
+ (message "Completed deletion of '%s'. (synchronously)" path)))
(display-warning 'ssh-deploy (format "Did not find '%s' for deletion.
(synchronously)" path) :warning))))
;;;### autoload
- [elpa] externals/ssh-deploy ab4b80e 096/173: Detection for remote changes doesn't apply to directories, (continued)
- [elpa] externals/ssh-deploy ab4b80e 096/173: Detection for remote changes doesn't apply to directories, Stefan Monnier, 2018/10/20
- [elpa] externals/ssh-deploy c65d282 087/173: Removed tramp-term functionality, supports native TRAMP strings, Stefan Monnier, 2018/10/20
- [elpa] externals/ssh-deploy b483b3e 117/173: Improved handling of changing directory using let, Stefan Monnier, 2018/10/20
- [elpa] externals/ssh-deploy b62abf2 073/173: Improved code structure and improved documentation, Stefan Monnier, 2018/10/20
- [elpa] externals/ssh-deploy 810106a 093/173: Added feature to diff directories and fixed a bug, Stefan Monnier, 2018/10/20
- [elpa] externals/ssh-deploy d1d68b9 128/173: Started with new menu in menu-bar, Stefan Monnier, 2018/10/20
- [elpa] externals/ssh-deploy 6134cd3 122/173: Added instructors for using remote shell terminal, Stefan Monnier, 2018/10/20
- [elpa] externals/ssh-deploy c84f56c 131/173: Added Open command to menu as well, Stefan Monnier, 2018/10/20
- [elpa] externals/ssh-deploy d0be946 124/173: Improved the salience of completion messages, Stefan Monnier, 2018/10/20
- [elpa] externals/ssh-deploy 53081a3 148/173: After downloading asynchronously associated buffer is reverted, Stefan Monnier, 2018/10/20
- [elpa] externals/ssh-deploy fd7abe9 143/173: Mode-line status update for asynchronously deleted file working,
Stefan Monnier <=
- [elpa] externals/ssh-deploy e64a454 149/173: Starting ssh-deploy-mode-line on init, Stefan Monnier, 2018/10/20
- [elpa] externals/ssh-deploy 519939d 153/173: Fixes for mode-line status as stack, Stefan Monnier, 2018/10/20
- [elpa] externals/ssh-deploy 16a22f4 157/173: More (when (not to (unless conversions, Stefan Monnier, 2018/10/20
- [elpa] externals/ssh-deploy d9bc257 159/173: Updated version, Stefan Monnier, 2018/10/20
- [elpa] externals/ssh-deploy 5705104 155/173: Fixed issue were status list initialization was not working, Stefan Monnier, 2018/10/20
- [elpa] externals/ssh-deploy a1dbc2f 156/173: Using unless instead of (when (not, Stefan Monnier, 2018/10/20
- [elpa] externals/ssh-deploy 8900586 163/173: Started working on support for deploy script, Stefan Monnier, 2018/10/20
- [elpa] externals/ssh-deploy e24f69d 127/173: Fixes 'display-warning throws 'wrong-type-argument error #39, Stefan Monnier, 2018/10/20
- [elpa] externals/ssh-deploy e869836 171/173: Added support for asynchronous deployment scripts, Stefan Monnier, 2018/10/20
- [elpa] externals/ssh-deploy 0ff0f77 152/173: Using a stack for buffer status instead, Stefan Monnier, 2018/10/20