[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 4086298 68/92: add ztree-find-file as the action for ztree
From: |
Alexey Veretennikov |
Subject: |
[elpa] master 4086298 68/92: add ztree-find-file as the action for ztree-dir |
Date: |
Thu, 11 Jun 2015 19:48:14 +0000 |
branch: master
commit 40862989b66a589025eb2cfc4e52f30570a58a54
Author: Jonathan Kotta <address@hidden>
Commit: Jonathan Kotta <address@hidden>
add ztree-find-file as the action for ztree-dir
---
ztree-dir.el | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
diff --git a/ztree-dir.el b/ztree-dir.el
index 5d67b64..29939b0 100644
--- a/ztree-dir.el
+++ b/ztree-dir.el
@@ -89,6 +89,16 @@ including . and ..")
(not (string-match ztree-hidden-files-regexp
(file-short-name filename))))
+(defun ztree-find-file (node hard)
+ "Finds the file at NODE.
+
+If HARD is non-nil, the file is opened in another window.
+Otherwise, the ztree window is used to find the file."
+ (when (and (stringp node) (file-readable-p node))
+ (if hard
+ (save-selected-window (find-file-other-window node))
+ (find-file node))))
+
;;;###autoload
(defun ztree-dir (path)
"Creates an interactive buffer with the directory tree of the path given"
@@ -104,7 +114,7 @@ including . and ..")
'string-equal
'(lambda (x) (directory-files x 'full))
nil ; face
- nil)))) ; action
+ 'ztree-find-file)))) ; action
(provide 'ztree-dir)
- [elpa] master 865afb0 59/92: Implemented partial rescan/refresh feature ('r' hotkey), (continued)
- [elpa] master 865afb0 59/92: Implemented partial rescan/refresh feature ('r' hotkey), Alexey Veretennikov, 2015/06/11
- [elpa] master 15f376d 63/92: Add -pkg.el file, Alexey Veretennikov, 2015/06/11
- [elpa] master 7530053 64/92: Merge pull request #2 from yasuyk/patch-1, Alexey Veretennikov, 2015/06/11
- [elpa] master 0642c05 61/92: Updated readme, Alexey Veretennikov, 2015/06/11
- [elpa] master bd7547b 66/92: Add autoload cookies, Alexey Veretennikov, 2015/06/11
- [elpa] master c81ae1f 65/92: Merge pull request #3 from yasuyk/patch-2, Alexey Veretennikov, 2015/06/11
- [elpa] master 635eb9a 67/92: Merge pull request #4 from yasuyk/patch-3, Alexey Veretennikov, 2015/06/11
- [elpa] master b772a0c 71/92: Merge branch 'master' of github.com:fourier/ztree, Alexey Veretennikov, 2015/06/11
- [elpa] master 557024f 72/92: Merge pull request #6 from jpkotta/master, Alexey Veretennikov, 2015/06/11
- [elpa] master fa043b6 70/92: Fixed issue #5 with electric-indent-mode by turning it off, Alexey Veretennikov, 2015/06/11
- [elpa] master 4086298 68/92: add ztree-find-file as the action for ztree-dir,
Alexey Veretennikov <=
- [elpa] master d44da81 69/92: Fixed issue #1 with electric-indent-mode by turning it off, Alexey Veretennikov, 2015/06/11
- [elpa] master 111afc6 73/92: Issue #8: Added hotkey 'x' to toggle between expanded/collapsed state of the current directory and its children, Alexey Veretennikov, 2015/06/11
- [elpa] master 2dd7c7b 75/92: Fixed vertical line for separator - now it is not rounded, Alexey Veretennikov, 2015/06/11
- [elpa] master f037979 74/92: Added rounding at the end of vertical line, Alexey Veretennikov, 2015/06/11
- [elpa] master 364eced 76/92: Make it work over TRAMP, Alexey Veretennikov, 2015/06/11
- [elpa] master 32db847 78/92: Fixed files with spaces comparison error, Alexey Veretennikov, 2015/06/11
- [elpa] master cefecf1 77/92: Merge pull request #9 from Silex/master, Alexey Veretennikov, 2015/06/11
- [elpa] master 9b1f994 79/92: Fixed tree offset on the right side, Alexey Veretennikov, 2015/06/11
- [elpa] master b217776 80/92: Added reference to zdircmp, Alexey Veretennikov, 2015/06/11
- [elpa] master 7156104 81/92: Updated ztree-diff-filter-list, Alexey Veretennikov, 2015/06/11