leoliu pushed a commit to branch master
in repository elpa.
commit a1806f619c7556fdaace753af32ad130ad7265f9
Author: Leo Liu <[email protected]>
Date: Fri Nov 7 11:39:17 2014 +0800
Fix #77: Robustify ggtags-update-tags-single for remote files
---
README.rst | 2 +-
ggtags.el | 9 ++++++---
2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/README.rst b/README.rst
index 909a113..acfeeb7 100644
--- a/README.rst
+++ b/README.rst
@@ -196,7 +196,7 @@ turned on to facilitate locating the right match.
``M-=``
- Move to the file where navigation session starts
+ Move to the file where navigation session starts.
``M-<``
diff --git a/ggtags.el b/ggtags.el
index 4ea03f2..e590b33 100644
--- a/ggtags.el
+++ b/ggtags.el
@@ -711,10 +711,13 @@ Do nothing if GTAGS exceeds the oversize limit unless
FORCE."
(setf (ggtags-project-mtime (ggtags-find-project)) (float-time))))))
(defun ggtags-update-tags-single (file &optional nowait)
+ ;; NOTE: NOWAIT is ignored if file is remote file; see
+ ;; `tramp-sh-handle-process-file'.
(cl-check-type file string)
- (ggtags-with-current-project
- (process-file (ggtags-program-path "global") nil (and nowait 0) nil
- "--single-update" (ggtags-project-relative-file file))))
+ (let ((nowait (unless (file-remote-p file) nowait)))
+ (ggtags-with-current-project
+ (process-file (ggtags-program-path "global") nil (and nowait 0) nil
+ "--single-update" (ggtags-project-relative-file file)))))
(defun ggtags-delete-tags ()
"Delete file GTAGS, GRTAGS, GPATH, ID etc. generated by gtags."