[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/ssh-deploy 0f5e1dc 108/173: Fixed bug with endless loop
From: |
Stefan Monnier |
Subject: |
[elpa] externals/ssh-deploy 0f5e1dc 108/173: Fixed bug with endless loop |
Date: |
Sat, 20 Oct 2018 10:36:39 -0400 (EDT) |
branch: externals/ssh-deploy
commit 0f5e1dc3c9227e3c41a5b85a7e280ef6ed077cc8
Author: Christian Johansson <address@hidden>
Commit: Christian Johansson <address@hidden>
Fixed bug with endless loop
---
ssh-deploy-diff-mode.el | 30 +++++++++++++-----------------
1 file changed, 13 insertions(+), 17 deletions(-)
diff --git a/ssh-deploy-diff-mode.el b/ssh-deploy-diff-mode.el
index 581cbb0..46130fa 100644
--- a/ssh-deploy-diff-mode.el
+++ b/ssh-deploy-diff-mode.el
@@ -3,8 +3,8 @@
;; Author: Christian Johansson <github.com/cjohansson>
;; Maintainer: Christian Johansson <github.com/cjohansson>
;; Created: 1 Feb 2018
-;; Modified: 16 Feb 2018
-;; Version: 1.1
+;; Modified: 18 Feb 2018
+;; Version: 1.11
;; Keywords: tools, convenience
;; URL: https://github.com/cjohansson/emacs-ssh-deploy
@@ -37,8 +37,6 @@
;; TODO: Must explicitly send global variables, seems like settings are lost
sometimes?
;; TODO: Downloading and deletion of remote files that does not exist on local
root does not work?
-;; TODO: Pressing return on a file in both roots should show some kind of
message
-;; TODO: Pressing action at first line causing endless loop
(defvar ssh-deploy-diff-mode nil)
@@ -107,7 +105,7 @@
(let* ((start (+ 2 (line-beginning-position)))
(end (line-end-position)))
(setq file (buffer-substring-no-properties start end))))
- (while (and (> (line-number-at-pos) 0)
+ (while (and (> (line-number-at-pos) 1)
(not (looking-at "^[A-Z]+")))
(forward-line -1))
(if (looking-at "^[A-Z]")
@@ -122,8 +120,7 @@
((string= section "FILES ONLY IN B") (setq section
ssh-deploy-diff-mode--section-only-in-b))
((string= section "FILES IN BOTH BUT DIFFERS") (setq section
ssh-deploy-diff-mode--section-in-both))
(t (message "Could not find section %s" section)))
-
- (while (and (> (line-number-at-pos) 0)
+ (while (and (> (line-number-at-pos) 1)
(not (looking-at "^DIRECTORY B:")))
(forward-line -1))
(if (looking-at "^DIRECTORY B:")
@@ -132,7 +129,7 @@
(directory-b (buffer-substring-no-properties start
end)))
(setq directory-b (replace-regexp-in-string "DIRECTORY B: "
"" directory-b))
- (while (and (> (line-number-at-pos) 0)
+ (while (and (> (line-number-at-pos) 1)
(not (looking-at "^DIRECTORY A:")))
(forward-line -1))
(if (looking-at "^DIRECTORY A:")
@@ -147,15 +144,14 @@
(interactive)
(let ((parts (ssh-deploy-diff-mode--get-parts)))
(if (not (eq parts nil))
- (progn
- (cond ((and (not (null (nth 0 parts))) (= action
ssh-deploy-diff-mode--action-copy)) (ssh-deploy-diff-mode--copy parts))
- ((and (not (null (nth 0 parts))) (= action
ssh-deploy-diff-mode--action-copy-a)) (ssh-deploy-diff-mode--copy-a parts))
- ((and (not (null (nth 0 parts))) (= action
ssh-deploy-diff-mode--action-copy-b)) (ssh-deploy-diff-mode--copy-b parts))
- ((and (not (null (nth 0 parts))) (= action
ssh-deploy-diff-mode--action-delete)) (ssh-deploy-diff-mode--delete parts))
- ((and (not (null (nth 0 parts))) (= action
ssh-deploy-diff-mode--action-difference)) (ssh-deploy-diff-mode--difference
parts))
- ((and (not (null (nth 0 parts))) (= action
ssh-deploy-diff-mode--action-open)) (ssh-deploy-diff-mode--open parts))
- ((= action ssh-deploy-diff-mode--action-refresh)
(ssh-deploy-diff-mode--refresh parts))
- (t (message "Found nothing to do in the section for action %s"
action))))
+ (cond ((and (not (null (nth 0 parts))) (= action
ssh-deploy-diff-mode--action-copy)) (ssh-deploy-diff-mode--copy parts))
+ ((and (not (null (nth 0 parts))) (= action
ssh-deploy-diff-mode--action-copy-a)) (ssh-deploy-diff-mode--copy-a parts))
+ ((and (not (null (nth 0 parts))) (= action
ssh-deploy-diff-mode--action-copy-b)) (ssh-deploy-diff-mode--copy-b parts))
+ ((and (not (null (nth 0 parts))) (= action
ssh-deploy-diff-mode--action-delete)) (ssh-deploy-diff-mode--delete parts))
+ ((and (not (null (nth 0 parts))) (= action
ssh-deploy-diff-mode--action-difference)) (ssh-deploy-diff-mode--difference
parts))
+ ((and (not (null (nth 0 parts))) (= action
ssh-deploy-diff-mode--action-open)) (ssh-deploy-diff-mode--open parts))
+ ((= action ssh-deploy-diff-mode--action-refresh)
(ssh-deploy-diff-mode--refresh parts))
+ (t (message "Found nothing to do in the section for action %s"
action)))
(message "Found nothing to do"))))
(defun ssh-deploy-diff-mode--refresh (parts)
- [elpa] externals/ssh-deploy dbd8608 076/173: Improved documentation, (continued)
- [elpa] externals/ssh-deploy dbd8608 076/173: Improved documentation, Stefan Monnier, 2018/10/20
- [elpa] externals/ssh-deploy 2eab0ee 091/173: Fixed bug for eshell in base directory, Stefan Monnier, 2018/10/20
- [elpa] externals/ssh-deploy c02b0c9 094/173: Removed debug code from directory-diff function, Stefan Monnier, 2018/10/20
- [elpa] externals/ssh-deploy 68804ee 097/173: Updated use-package README example, Stefan Monnier, 2018/10/20
- [elpa] externals/ssh-deploy d2c204f 101/173: Fixed syntax error in example configuration, Stefan Monnier, 2018/10/20
- [elpa] externals/ssh-deploy 4f77b6c 118/173: Silenced code notices and fixes syntax for (display-warning), Stefan Monnier, 2018/10/20
- [elpa] externals/ssh-deploy a3f9ec5 120/173: Now possible to define remote SQL port numbers, Stefan Monnier, 2018/10/20
- [elpa] externals/ssh-deploy 4c1a539 064/173: Added customizable exclusion patterns, Stefan Monnier, 2018/10/20
- [elpa] externals/ssh-deploy f9a2785 086/173: Removed tramp-term functionality, supports native TRAMP strings, Stefan Monnier, 2018/10/20
- [elpa] externals/ssh-deploy c64013a 099/173: Made directory variables permanent, Stefan Monnier, 2018/10/20
- [elpa] externals/ssh-deploy 0f5e1dc 108/173: Fixed bug with endless loop,
Stefan Monnier <=
- [elpa] externals/ssh-deploy 088ed22 132/173: Added separators to menu and changed order of items, Stefan Monnier, 2018/10/20
- [elpa] externals/ssh-deploy 7a2c7b6 138/173: Merge branch 'master' of https://github.com/cjohansson/emacs-ssh-deploy, Stefan Monnier, 2018/10/20
- [elpa] externals/ssh-deploy b1713b7 129/173: Added all handlers to new menu, Stefan Monnier, 2018/10/20
- [elpa] externals/ssh-deploy 7cc936f 140/173: Removed debug comments, Stefan Monnier, 2018/10/20
- [elpa] externals/ssh-deploy f8dc6a2 144/173: Renamed mode-line name from SH to DPL, Stefan Monnier, 2018/10/20
- [elpa] externals/ssh-deploy 76f7740 137/173: Now possible to define remote shell executable path per directory, Stefan Monnier, 2018/10/20
- [elpa] externals/ssh-deploy 9c3f519 145/173: Nicer looking mode-line with square brackets, Stefan Monnier, 2018/10/20
- [elpa] externals/ssh-deploy a1b3577 146/173: Fixed issue were a buffer loosed it's reference asynchronously, Stefan Monnier, 2018/10/20
- [elpa] externals/ssh-deploy b13ba60 160/173: Removed idle mode-line status to avoid cluttering interface, Stefan Monnier, 2018/10/20
- [elpa] externals/ssh-deploy 63321ec 112/173: Just a white-space fix for more coherency, Stefan Monnier, 2018/10/20