Skip to content

Commit

Permalink
Run browse project from buffers.
Browse files Browse the repository at this point in the history
* helm-buffers.el (helm-buffer-map): Bind it.
(helm-buffers-browse-project): The action.
(helm-buffers-run-browse-project): The interactive wrapper.
* helm-types.el (helm-type-buffer-actions): New action.
* helm-help.el (helm-buffer-help-message): Document it.
  • Loading branch information
Thierry Volpiatto committed May 25, 2016
1 parent 8411589 commit f234758
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
11 changes: 11 additions & 0 deletions helm-buffers.el
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ Only buffer names are fuzzy matched when this is enabled,
;; So use zgrep for both as it is capable to handle non--compressed files.
(define-key map (kbd "M-g s") 'helm-buffer-run-zgrep)
(define-key map (kbd "C-s") 'helm-buffers-run-multi-occur)
(define-key map (kbd "C-x C-d") 'helm-buffers-run-browse-project)
(define-key map (kbd "C-c o") 'helm-buffer-switch-other-window)
(define-key map (kbd "C-c C-o") 'helm-buffer-switch-other-frame)
(define-key map (kbd "C-c =") 'helm-buffer-run-ediff)
Expand Down Expand Up @@ -842,6 +843,16 @@ Can be used by any source that list buffers."
(helm-force-update))))
(put 'helm-buffers-toggle-show-hidden-buffers 'helm-only t)

(defun helm-buffers-browse-project (buf)
"Browse project from buffer."
(with-current-buffer buf
(call-interactively 'helm-browse-project)))

(defun helm-buffers-run-browse-project ()
"Run `helm-buffers-browse-project' from key."
(interactive)
(with-helm-alive-p
(helm-exit-and-execute-action 'helm-buffers-browse-project)))

;;; Candidate Transformers
;;
Expand Down
1 change: 1 addition & 0 deletions helm-help.el
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ Italic => A non--file buffer.
\\[helm-buffers-run-multi-occur]\t\tMulti Occur buffer or marked buffers. (C-u toggle force searching current-buffer).
\\[helm-buffer-switch-other-window]\t\tSwitch other window.
\\[helm-buffer-switch-other-frame]\t\tSwitch other frame.
\\[helm-buffers-run-browse-project]\t\tBrowse Project from buffer.
\\[helm-buffer-run-query-replace-regexp]\t\tQuery replace regexp in marked buffers.
\\[helm-buffer-run-query-replace]\t\tQuery replace in marked buffers.
\\[helm-buffer-run-ediff]\t\tEdiff current buffer with candidate. If two marked buffers ediff those buffers.
Expand Down
2 changes: 2 additions & 0 deletions helm-types.el
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,8 @@
(lambda () (and (locate-library "elscreen")
"Display buffer in Elscreen"))
'helm-find-buffer-on-elscreen
"Browse project from buffer"
'helm-buffers-browse-project
"Query replace regexp `C-M-%'"
'helm-buffer-query-replace-regexp
"Query replace `M-%'" 'helm-buffer-query-replace
Expand Down

0 comments on commit f234758

Please sign in to comment.