[elpa] master e41db04: Fix errors detected by tests added in last commit

2016-09-24 Thread Michael Heerdegen
branch: master
commit e41db042aadec660fbc0736f416a6f0aabfd1602
Author: Michael Heerdegen 
Commit: Michael Heerdegen 

Fix errors detected by tests added in last commit
---
 packages/stream/stream.el |   33 -
 1 file changed, 16 insertions(+), 17 deletions(-)

diff --git a/packages/stream/stream.el b/packages/stream/stream.el
index ef19918..9a7f664 100644
--- a/packages/stream/stream.el
+++ b/packages/stream/stream.el
@@ -4,7 +4,7 @@
 
 ;; Author: Nicolas Petton 
 ;; Keywords: stream, laziness, sequences
-;; Version: 2.2.2
+;; Version: 2.2.3
 ;; Package-Requires: ((emacs "25"))
 ;; Package: stream
 
@@ -273,12 +273,13 @@ stream will simply be accordingly shorter, or even 
empty)."
 
 (cl-defmethod seq-take ((stream stream) n)
   "Return a stream of the first N elements of STREAM."
-  (if (or (zerop n)
-  (stream-empty-p stream))
-  (stream-empty)
-(stream-cons
- (stream-first stream)
- (seq-take (stream-rest stream) (1- n)
+  (stream-make
+   (if (or (zerop n)
+   (stream-empty-p stream))
+   nil
+ (cons
+  (stream-first stream)
+  (seq-take (stream-rest stream) (1- n))
 
 (cl-defmethod seq-drop ((stream stream) n)
   "Return a stream of STREAM without its first N elements."
@@ -327,16 +328,14 @@ kind of nonlocal exit."
 
 (cl-defmethod seq-filter (pred (stream stream))
   "Return a stream of the elements for which (PRED element) is non-nil in 
STREAM."
-  (if (stream-empty-p stream)
-  stream
-(stream-make
- (while (not (or (stream-empty-p stream)
- (funcall pred (stream-first stream
-   (setq stream (stream-rest stream)))
- (if (stream-empty-p stream)
- nil
-   (cons (stream-first stream)
- (seq-filter pred (stream-rest stream)))
+  (stream-make
+   (while (not (or (stream-empty-p stream)
+   (funcall pred (stream-first stream
+ (setq stream (stream-rest stream)))
+   (if (stream-empty-p stream)
+   nil
+ (cons (stream-first stream)
+   (seq-filter pred (stream-rest stream))
 
 (defmacro stream-delay (expr)
   "Return a new stream to be obtained by evaluating EXPR.



[elpa] master 47be1cb: Release debbugs 0.11

2016-09-24 Thread Michael Albinus
branch: master
commit 47be1cbfd1badb07e7ce62faf9954aa0554a5b13
Author: Michael Albinus 
Commit: Michael Albinus 

Release debbugs 0.11

* packages/debbugs/debbugs.el: Increase Version to 0.11.

* packages/debbugs/debbugs-gnu.el
(debbugs-gnu-default-bug-number-list): Propertize default value.
(debbugs-gnu-bugs): Twiddle prompt.

* packages/debbugs/debbugs-org.el (debbugs-org-bugs): Fix docstring.

* packages/debbugs/README: Mention `debbugs-gnu-patches' and
`debbugs-org-patches'.
---
 packages/debbugs/README |   10 ++
 packages/debbugs/debbugs-gnu.el |   20 +---
 packages/debbugs/debbugs-org.el |   19 +--
 packages/debbugs/debbugs.el |2 +-
 4 files changed, 41 insertions(+), 10 deletions(-)

diff --git a/packages/debbugs/README b/packages/debbugs/README
index 74f8db8..7e29420 100644
--- a/packages/debbugs/README
+++ b/packages/debbugs/README
@@ -2,12 +2,14 @@ This package lets you access the GNU Bug Tracker from within 
Emacs.
 
 It defines the command `M-x debbugs-gnu' for listing bugs, and the
 command `M-x debbugs-gnu-search' for bug searching.  The command
-`M-x debbugs-gnu-usertags' shows existing user tags on bugs.  In order
-to show bugs with known numbers, `M-x debbugs-gnu-bugs' could be used.
+`M-x debbugs-gnu-usertags' shows existing user tags on bugs, whilst
+the command `M-x debbugs-gnu-patches' lists bugs containing a patch.
+In order to show bugs with known numbers, `M-x debbugs-gnu-bugs' could
+be used.
 
 If you prefer the listing of bugs as TODO items of `org-mode', you
-could use the commands `M-x debbugs-org', `M-x debbugs-org-search' and
-`M-x debbugs-org-bugs' instead.
+could use the commands `M-x debbugs-org', `M-x debbugs-org-search',
+`M-x debbugs-org-patches' and `M-x debbugs-org-bugs' instead.
 
 A minor mode `debbugs-browse-mode' let you browse URLs to the GNU Bug
 Tracker as well as bug identifiers prepared for `bug-reference-mode'.
diff --git a/packages/debbugs/debbugs-gnu.el b/packages/debbugs/debbugs-gnu.el
index f8b8726..058f6fd 100644
--- a/packages/debbugs/debbugs-gnu.el
+++ b/packages/debbugs/debbugs-gnu.el
@@ -35,6 +35,7 @@
 ;;   (autoload 'debbugs-gnu "debbugs-gnu" "" 'interactive)
 ;;   (autoload 'debbugs-gnu-search "debbugs-gnu" "" 'interactive)
 ;;   (autoload 'debbugs-gnu-usertags "debbugs-gnu" "" 'interactive)
+;;   (autoload 'debbugs-gnu-patches "debbugs-gnu" "" 'interactive)
 ;;   (autoload 'debbugs-gnu-bugs "debbugs-gnu" "" 'interactive)
 
 ;; The bug tracker is called interactively by
@@ -129,12 +130,24 @@
 ;; all users who have tagged bugs.  This list can be retrieved via
 ;; .
 
+;; A special command to show bugs containing patches is
+;;
+;;   M-x debbugs-gnu-patches
+
+;; This command shows all unarchived bugs of the packages declared in
+;; `debbugs-gnu-default-packages', and tagged with "patch".  This is
+;; useful for bug triages.
+
 ;; Finally, if you simply want to list some bugs with known bug
 ;; numbers, call the command
 ;;
 ;;   M-x debbugs-gnu-bugs
 
-;; The bug numbers to be shown shall be entered as comma separated list.
+;; The bug numbers to be shown shall be entered as comma separated
+;; list.  A bug number can also be a range of bugs like "123-456" or
+;; "-10".  In the former case, all bugs from 123 until 456 are
+;; presented, and in the latter case the last 10 bugs are shown,
+;; counting from the highest bug number in the repository.
 
 ;;; Code:
 
@@ -1657,7 +1670,8 @@ The following commands are available:
   (let ((args (get-text-property (line-beginning-position) 
'tabulated-list-id)))
 (when args (apply 'debbugs-gnu args
 
-(defcustom debbugs-gnu-default-bug-number-list "-10"
+(defcustom debbugs-gnu-default-bug-number-list
+  (propertize "-10" 'help-echo "The 10 most recent bugs.")
   "The default value used in interactive call of `debbugs-gnu-bugs'.
 It must be a string, containing a comma separated list of bugs or bug ranges.
 A negative value, -N, means the newest N bugs."
@@ -1676,7 +1690,7 @@ or bug ranges, with default to 
`debbugs-gnu-default-bug-number-list'."
 (debbugs-gnu-expand-bug-number-list
  (or
   (completing-read-multiple
-   (format "Bug numbers (%s): " debbugs-gnu-default-bug-number-list)
+   (format "Bug numbers (default %s): " 
debbugs-gnu-default-bug-number-list)
debbugs-gnu-completion-table)
   (split-string debbugs-gnu-default-bug-number-list "," t)
   (dolist (elt bugs)
diff --git a/packages/debbugs/debbugs-org.el b/packages/debbugs/debbugs-org.el
index c413d11..6c7f82f 100644
--- a/packages/debbugs/debbugs-org.el
+++ b/packages/debbugs/debbugs-org.el
@@ -32,6 +32,7 @@
 ;;
 ;;   (autoload 'debbugs-org "debbugs-org" "" 'interactive)
 ;;   (autoload 'debbugs-org-search "debbugs-org" "" 'interactive)
+;;   (autoload 'debbugs-org-patches "debbugs-org" "" 'interactive)
 ;;   (autoload 'debbugs-org-bugs "debbugs-or

[elpa] master cd7dd2e 1/5: Fix regression when on TRAMP hosts

2016-09-24 Thread Alexey Veretennikov
branch: master
commit cd7dd2ecb61da2fce52189eb0020f0eefa4c4af8
Author: Philippe Vaucher 
Commit: Philippe Vaucher 

Fix regression when on TRAMP hosts
---
 ztree-diff-model.el |   19 ++-
 ztree-util.el   |   15 +++
 2 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/ztree-diff-model.el b/ztree-diff-model.el
index b4ad75f..25f9c26 100644
--- a/ztree-diff-model.el
+++ b/ztree-diff-model.el
@@ -138,21 +138,6 @@ RIGHT if only on the right side."
(string-equal (ztree-diff-node-right-path node1)
  (ztree-diff-node-right-path node1
 
-(defun ztree-diff-untrampify-filename (file)
-  "Return FILE as the local file name."
-  ;; FIXME: We shouldn't use internal Tramp functions.
-  (require 'tramp)
-  (declare-function tramp-tramp-file-p "tramp" (name))
-  (declare-function tramp-file-name-localname "tramp" (vec))
-  (declare-function tramp-dissect-file-name "tramp" (name &optional nodefault))
-  (if (not (tramp-tramp-file-p file))
-  file
-(tramp-file-name-localname (tramp-dissect-file-name file
-
-(defun ztree-diff-modef-quotify-string (x)
-  "Surround string X with quotes."
-  (concat "\"" x "\""))
-
 (defun ztree-diff-model-files-equal (file1 file2)
   "Compare files FILE1 and FILE2 using external diff.
 Returns t if equal."
@@ -160,8 +145,8 @@ Returns t if equal."
   ;; the same host.
   ;; FIXME: We assume that default-directory is also on the same host as
   ;; file(1|2).
-  (let* ((file1-untrampified (ztree-diff-untrampify-filename 
(ztree-diff-modef-quotify-string file1)))
- (file2-untrampified (ztree-diff-untrampify-filename 
(ztree-diff-modef-quotify-string file2)))
+  (let* ((file1-untrampified (ztree-quotify-string (ztree-untrampify-filename 
file1)))
+ (file2-untrampified (ztree-quotify-string (ztree-untrampify-filename 
file2)))
  (diff-command (concat diff-command " -q" " " file1-untrampified " " 
file2-untrampified))
  (diff-output (shell-command-to-string diff-command)))
 (if (<= (length diff-output) 2) 'same 'diff)))
diff --git a/ztree-util.el b/ztree-util.el
index ec49457..17f6218 100644
--- a/ztree-util.el
+++ b/ztree-util.el
@@ -65,6 +65,21 @@ Used since `car-safe' returns nil for atoms"
 (insert text)
 (put-text-property start (point) 'face face)))
 
+(defun ztree-untrampify-filename (file)
+  "Return FILE as the local file name."
+  ;; FIXME: We shouldn't use internal Tramp functions.
+  (require 'tramp)
+  (declare-function tramp-tramp-file-p "tramp" (name))
+  (declare-function tramp-file-name-localname "tramp" (vec))
+  (declare-function tramp-dissect-file-name "tramp" (name &optional nodefault))
+  (if (not (tramp-tramp-file-p file))
+  file
+(tramp-file-name-localname (tramp-dissect-file-name file
+
+(defun ztree-quotify-string (str)
+  "Surround STR with quotes."
+  (concat "\"" str "\""))
+
 (provide 'ztree-util)
 
 ;;; ztree-util.el ends here



[elpa] master e3447f1 5/5: Merge commit '07009d7695eb7b82225712336fe388495dd48169'

2016-09-24 Thread Alexey Veretennikov
branch: master
commit e3447f1607bf879a775591f6473746f94cf23cbe
Merge: 47be1cb 07009d7
Author: Alexey Veretennikov 
Commit: Alexey Veretennikov 

Merge commit '07009d7695eb7b82225712336fe388495dd48169'
- Fixed broken 'x' button in ztree-dir
- Fixed broken compare over tramp
---
 packages/ztree/ztree-diff-model.el |   25 -
 packages/ztree/ztree-diff.el   |2 ++
 packages/ztree/ztree-dir.el|9 -
 packages/ztree/ztree-util.el   |   21 +
 4 files changed, 35 insertions(+), 22 deletions(-)

diff --git a/packages/ztree/ztree-diff-model.el 
b/packages/ztree/ztree-diff-model.el
index a9c99ae..20df0c0 100644
--- a/packages/ztree/ztree-diff-model.el
+++ b/packages/ztree/ztree-diff-model.el
@@ -138,30 +138,13 @@ RIGHT if only on the right side."
(string-equal (ztree-diff-node-right-path node1)
  (ztree-diff-node-right-path node1
 
-(defun ztree-diff-untrampify-filename (file)
-  "Return FILE as the local file name."
-  ;; FIXME: We shouldn't use internal Tramp functions.
-  (require 'tramp)
-  (declare-function tramp-tramp-file-p "tramp" (name))
-  (declare-function tramp-file-name-localname "tramp" (vec))
-  (declare-function tramp-dissect-file-name "tramp" (name &optional nodefault))
-  (if (not (tramp-tramp-file-p file))
-  file
-(tramp-file-name-localname (tramp-dissect-file-name file
-
-(defun ztree-diff-modef-quotify-string (x)
-  "Surround string X with quotes."
-  (concat "\"" x "\""))
-
 (defun ztree-diff-model-files-equal (file1 file2)
   "Compare files FILE1 and FILE2 using external diff.
 Returns t if equal."
-  ;; FIXME: This "untrampification" only works if both file1 and file2 are on
-  ;; the same host.
-  ;; FIXME: We assume that default-directory is also on the same host as
-  ;; file(1|2).
-  (let* ((file1-untrampified (ztree-diff-untrampify-filename 
(ztree-diff-modef-quotify-string file1)))
- (file2-untrampified (ztree-diff-untrampify-filename 
(ztree-diff-modef-quotify-string file2)))
+  (unless (ztree-same-host-p file1 file2)
+(error "Compared files are not on the same host"))
+  (let* ((file1-untrampified (ztree-quotify-string (ztree-untrampify-filename 
file1)))
+ (file2-untrampified (ztree-quotify-string (ztree-untrampify-filename 
file2)))
  (diff-command (concat diff-command " -q" " " file1-untrampified " " 
file2-untrampified))
  (diff-output (shell-command-to-string diff-command)))
 (if (<= (length diff-output) 2) 'same 'diff)))
diff --git a/packages/ztree/ztree-diff.el b/packages/ztree/ztree-diff.el
index cfd0c96..c454709 100644
--- a/packages/ztree/ztree-diff.el
+++ b/packages/ztree/ztree-diff.el
@@ -520,6 +520,8 @@ Argument DIR2 right directory."
 (error "Path %s is not a directory" dir2))
   (unless (file-exists-p dir2)
 (error "Path %s does not exist" dir2))
+  (unless (ztree-same-host-p dir1 dir2)
+(error "Compared directories are not on the same host"))
   (let* ((model
   (ztree-diff-node-create nil dir1 dir2 nil))
  (buf-name (concat "*"
diff --git a/packages/ztree/ztree-dir.el b/packages/ztree/ztree-dir.el
index 53617f9..7d866ff 100644
--- a/packages/ztree/ztree-dir.el
+++ b/packages/ztree/ztree-dir.el
@@ -145,6 +145,13 @@ Otherwise, the ztree window is used to find the file."
   (ztree-refresh-buffer))
 
 
+(defun ztree-dir-directory-files (path)
+  "Returns the list of files/directories for the given PATH"
+  ;; remove . and .. from the list of files to avoid infinite
+  ;; recursion
+  (remove-if (lambda (x) (string-match-p "/\\.\\.?$" x))
+ (directory-files path 'full)))
+
 
 
 ;;;###autoload
@@ -160,7 +167,7 @@ Otherwise, the ztree window is used to find the file."
   #'ztree-file-short-name
   #'file-directory-p
   #'string-equal
-  (lambda (x) (directory-files x 'full))
+  #'ztree-dir-directory-files
   nil   ; face
   #'ztree-find-file); action
   (ztreedir-mode
diff --git a/packages/ztree/ztree-util.el b/packages/ztree/ztree-util.el
index 9f458d6..07935b7 100644
--- a/packages/ztree/ztree-util.el
+++ b/packages/ztree/ztree-util.el
@@ -65,6 +65,27 @@ Used since `car-safe' returns nil for atoms"
 (insert text)
 (put-text-property start (point) 'face face)))
 
+(defun ztree-untrampify-filename (file)
+  "Return FILE as the local file name."
+  ;; FIXME: We shouldn't use internal Tramp functions.
+  (require 'tramp)
+  (declare-function tramp-tramp-file-p "tramp" (name))
+  (declare-function tramp-file-name-localname "tramp" (vec))
+  (declare-function tramp-dissect-file-name "tramp" (name &optional nodefault))
+  (if (not (tramp-tramp-file-p file))
+  file
+(tramp-file-name-localname (tramp-dissect-file-name file
+
+(defun ztree-quotify-string (str)
+  "Surround STR with quotes."
+  (concat "\"" str "\""))
+
+

[elpa] master 272b515 3/5: Fixed issue #35: 'x' key in ztree-dir was broken

2016-09-24 Thread Alexey Veretennikov
branch: master
commit 272b5159d47a241fd9499ac6986ec3daef407ad3
Author: Alexey Veretennikov 
Commit: Alexey Veretennikov 

Fixed issue #35: 'x' key in ztree-dir was broken
---
 ztree-dir.el |9 -
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/ztree-dir.el b/ztree-dir.el
index d3d3b25..a340c5e 100644
--- a/ztree-dir.el
+++ b/ztree-dir.el
@@ -145,6 +145,13 @@ Otherwise, the ztree window is used to find the file."
   (ztree-refresh-buffer))
 
 
+(defun ztree-dir-directory-files (path)
+  "Returns the list of files/directories for the given PATH"
+  ;; remove . and .. from the list of files to avoid infinite
+  ;; recursion
+  (remove-if (lambda (x) (string-match-p "/\\.\\.?$" x))
+ (directory-files path 'full)))
+
 
 
 ;;;###autoload
@@ -160,7 +167,7 @@ Otherwise, the ztree window is used to find the file."
   #'ztree-file-short-name
   #'file-directory-p
   #'string-equal
-  (lambda (x) (directory-files x 'full))
+  #'ztree-dir-directory-files
   nil   ; face
   #'ztree-find-file); action
   (ztreedir-mode



[elpa] master 70ff074 2/5: Check that compared files are on the same host

2016-09-24 Thread Alexey Veretennikov
branch: master
commit 70ff0747e5d71cebc3ff1228d2d5dee7b83dbe3e
Author: Philippe Vaucher 
Commit: Philippe Vaucher 

Check that compared files are on the same host
---
 ztree-diff-model.el |6 ++
 ztree-diff.el   |2 ++
 ztree-util.el   |6 ++
 3 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/ztree-diff-model.el b/ztree-diff-model.el
index 25f9c26..2e06b80 100644
--- a/ztree-diff-model.el
+++ b/ztree-diff-model.el
@@ -141,10 +141,8 @@ RIGHT if only on the right side."
 (defun ztree-diff-model-files-equal (file1 file2)
   "Compare files FILE1 and FILE2 using external diff.
 Returns t if equal."
-  ;; FIXME: This "untrampification" only works if both file1 and file2 are on
-  ;; the same host.
-  ;; FIXME: We assume that default-directory is also on the same host as
-  ;; file(1|2).
+  (unless (ztree-same-host-p file1 file2)
+(error "Compared files are not on the same host"))
   (let* ((file1-untrampified (ztree-quotify-string (ztree-untrampify-filename 
file1)))
  (file2-untrampified (ztree-quotify-string (ztree-untrampify-filename 
file2)))
  (diff-command (concat diff-command " -q" " " file1-untrampified " " 
file2-untrampified))
diff --git a/ztree-diff.el b/ztree-diff.el
index ed3d5f9..5ff3247 100644
--- a/ztree-diff.el
+++ b/ztree-diff.el
@@ -520,6 +520,8 @@ Argument DIR2 right directory."
 (error "Path %s is not a directory" dir2))
   (unless (file-exists-p dir2)
 (error "Path %s does not exist" dir2))
+  (unless (ztree-same-host-p dir1 dir2)
+(error "Compared directories are not on the same host"))
   (let* ((model
   (ztree-diff-node-create nil dir1 dir2 nil))
  (buf-name (concat "*"
diff --git a/ztree-util.el b/ztree-util.el
index 17f6218..c637e8f 100644
--- a/ztree-util.el
+++ b/ztree-util.el
@@ -80,6 +80,12 @@ Used since `car-safe' returns nil for atoms"
   "Surround STR with quotes."
   (concat "\"" str "\""))
 
+(defun ztree-same-host-p (file1 file2)
+  "Return t if FILE1 and FILE2 are on the same host."
+  (let ((file1-remote (file-remote-p file1))
+(file2-remote (file-remote-p file2)))
+(string-equal file1-remote file2-remote)))
+
 (provide 'ztree-util)
 
 ;;; ztree-util.el ends here



[elpa] master updated (47be1cb -> e3447f1)

2016-09-24 Thread Alexey Veretennikov
fourier pushed a change to branch master.

  from  47be1cb   Release debbugs 0.11
   new  272b515   Fixed issue #35: 'x' key in ztree-dir was broken
   new  cd7dd2e   Fix regression when on TRAMP hosts
   new  70ff074   Check that compared files are on the same host
   new  07009d7   Merge pull request #33 from Silex/master
   new  e3447f1   Merge commit '07009d7695eb7b82225712336fe388495dd48169' - 
Fixed broken 'x' button in ztree-dir - Fixed broken compare over tramp


Summary of changes:
 packages/ztree/ztree-diff-model.el |   25 -
 packages/ztree/ztree-diff.el   |2 ++
 packages/ztree/ztree-dir.el|9 -
 packages/ztree/ztree-util.el   |   21 +
 4 files changed, 35 insertions(+), 22 deletions(-)



[elpa] master 07009d7 4/5: Merge pull request #33 from Silex/master

2016-09-24 Thread Alexey Veretennikov
branch: master
commit 07009d7695eb7b82225712336fe388495dd48169
Merge: 272b515 70ff074
Author: Alexey Veretennikov 
Commit: GitHub 

Merge pull request #33 from Silex/master

Fix TRAMP regression
---
 ztree-diff-model.el |   25 -
 ztree-diff.el   |2 ++
 ztree-util.el   |   21 +
 3 files changed, 27 insertions(+), 21 deletions(-)

diff --git a/ztree-diff-model.el b/ztree-diff-model.el
index b4ad75f..2e06b80 100644
--- a/ztree-diff-model.el
+++ b/ztree-diff-model.el
@@ -138,30 +138,13 @@ RIGHT if only on the right side."
(string-equal (ztree-diff-node-right-path node1)
  (ztree-diff-node-right-path node1
 
-(defun ztree-diff-untrampify-filename (file)
-  "Return FILE as the local file name."
-  ;; FIXME: We shouldn't use internal Tramp functions.
-  (require 'tramp)
-  (declare-function tramp-tramp-file-p "tramp" (name))
-  (declare-function tramp-file-name-localname "tramp" (vec))
-  (declare-function tramp-dissect-file-name "tramp" (name &optional nodefault))
-  (if (not (tramp-tramp-file-p file))
-  file
-(tramp-file-name-localname (tramp-dissect-file-name file
-
-(defun ztree-diff-modef-quotify-string (x)
-  "Surround string X with quotes."
-  (concat "\"" x "\""))
-
 (defun ztree-diff-model-files-equal (file1 file2)
   "Compare files FILE1 and FILE2 using external diff.
 Returns t if equal."
-  ;; FIXME: This "untrampification" only works if both file1 and file2 are on
-  ;; the same host.
-  ;; FIXME: We assume that default-directory is also on the same host as
-  ;; file(1|2).
-  (let* ((file1-untrampified (ztree-diff-untrampify-filename 
(ztree-diff-modef-quotify-string file1)))
- (file2-untrampified (ztree-diff-untrampify-filename 
(ztree-diff-modef-quotify-string file2)))
+  (unless (ztree-same-host-p file1 file2)
+(error "Compared files are not on the same host"))
+  (let* ((file1-untrampified (ztree-quotify-string (ztree-untrampify-filename 
file1)))
+ (file2-untrampified (ztree-quotify-string (ztree-untrampify-filename 
file2)))
  (diff-command (concat diff-command " -q" " " file1-untrampified " " 
file2-untrampified))
  (diff-output (shell-command-to-string diff-command)))
 (if (<= (length diff-output) 2) 'same 'diff)))
diff --git a/ztree-diff.el b/ztree-diff.el
index ed3d5f9..5ff3247 100644
--- a/ztree-diff.el
+++ b/ztree-diff.el
@@ -520,6 +520,8 @@ Argument DIR2 right directory."
 (error "Path %s is not a directory" dir2))
   (unless (file-exists-p dir2)
 (error "Path %s does not exist" dir2))
+  (unless (ztree-same-host-p dir1 dir2)
+(error "Compared directories are not on the same host"))
   (let* ((model
   (ztree-diff-node-create nil dir1 dir2 nil))
  (buf-name (concat "*"
diff --git a/ztree-util.el b/ztree-util.el
index ec49457..c637e8f 100644
--- a/ztree-util.el
+++ b/ztree-util.el
@@ -65,6 +65,27 @@ Used since `car-safe' returns nil for atoms"
 (insert text)
 (put-text-property start (point) 'face face)))
 
+(defun ztree-untrampify-filename (file)
+  "Return FILE as the local file name."
+  ;; FIXME: We shouldn't use internal Tramp functions.
+  (require 'tramp)
+  (declare-function tramp-tramp-file-p "tramp" (name))
+  (declare-function tramp-file-name-localname "tramp" (vec))
+  (declare-function tramp-dissect-file-name "tramp" (name &optional nodefault))
+  (if (not (tramp-tramp-file-p file))
+  file
+(tramp-file-name-localname (tramp-dissect-file-name file
+
+(defun ztree-quotify-string (str)
+  "Surround STR with quotes."
+  (concat "\"" str "\""))
+
+(defun ztree-same-host-p (file1 file2)
+  "Return t if FILE1 and FILE2 are on the same host."
+  (let ((file1-remote (file-remote-p file1))
+(file2-remote (file-remote-p file2)))
+(string-equal file1-remote file2-remote)))
+
 (provide 'ztree-util)
 
 ;;; ztree-util.el ends here



[elpa] master 8c09e73: ztree: increased version

2016-09-24 Thread Alexey Veretennikov
branch: master
commit 8c09e73018fa1c27c29ba0694bd4f4c1ce9384cf
Author: Alexey Veretennikov 
Commit: Alexey Veretennikov 

ztree: increased version
---
 packages/ztree/ztree.el |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/packages/ztree/ztree.el b/packages/ztree/ztree.el
index 300ed85..dbe9911 100644
--- a/packages/ztree/ztree.el
+++ b/packages/ztree/ztree.el
@@ -4,7 +4,7 @@
 ;;
 ;; Author: Alexey Veretennikov 
 ;; Created: 2013-11-11
-;; Version: 1.0.3
+;; Version: 1.0.4
 ;; Package-Requires: ((cl-lib "0"))
 ;; Keywords: files tools
 ;; URL: https://github.com/fourier/ztree