summaryrefslogtreecommitdiff
path: root/helm-files.el
diff options
context:
space:
mode:
authorChunyang Xu <xuchunyang.me@gmail.com>2016-08-14 06:11:18 +0200
committerThierry Volpiatto <thierry.volpiatto@gmail.com>2016-08-14 06:11:18 +0200
commitebb9c24f3b33f4041986774adbeb7bc29414a0f0 (patch)
treeaf3b50eaf3e6ca5f603d1b0f272b7dcd0d95db6f /helm-files.el
parentc185b6dfe4f97ef7c6fe7aebf2c84aae4ce1d03b (diff)
Add helm-browse-project-history (#1159).
* helm-files.el (helm-browse-project-history): New var. (helm-browse-project-history): New command. (helm-browse-project): Use it.
Diffstat (limited to 'helm-files.el')
-rw-r--r--helm-files.el16
1 files changed, 15 insertions, 1 deletions
diff --git a/helm-files.el b/helm-files.el
index ca1735d2..6a8bb7e5 100644
--- a/helm-files.el
+++ b/helm-files.el
@@ -3225,6 +3225,18 @@ Set `recentf-max-saved-items' to a bigger value if default is too small.")
:ff-transformer-show-only-basename nil
:buffer "*helm browse project*"))
+(defvar helm-browse-project-history nil)
+
+(defun helm-browse-project-history ()
+ (interactive)
+ (helm :sources
+ (helm-build-sync-source "Project history"
+ :candidates helm-browse-project-history
+ :action (lambda (candidate)
+ (with-helm-default-directory candidate
+ (helm-browse-project nil))))
+ :buffer "*helm browse project history*"))
+
;;;###autoload
(defun helm-browse-project (arg)
"Preconfigured helm to browse projects.
@@ -3252,7 +3264,9 @@ and
(helm-buffers-in-project-p t))
(cond ((and (require 'helm-ls-git nil t)
(fboundp 'helm-ls-git-root-dir)
- (helm-ls-git-root-dir))
+ (let ((root (helm-ls-git-root-dir)))
+ (and root (cl-pushnew root helm-browse-project-history
+ :test #'string=))))
(helm-ls-git-ls))
((and (require 'helm-ls-hg nil t)
(fboundp 'helm-hg-root)