From d85d96f0ccac409f40b5d2994f0fa10d13e35e92 Mon Sep 17 00:00:00 2001 From: rubikitch Date: Thu, 9 Apr 2015 12:11:52 +0900 Subject: [PATCH] * contrib/anything-grep.el: C-o, right: agrep-next-source-or-detail --- contrib/anything-grep.el | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/contrib/anything-grep.el b/contrib/anything-grep.el index be42cef..3982d96 100644 --- a/contrib/anything-grep.el +++ b/contrib/anything-grep.el @@ -246,6 +246,8 @@ return either nil, or a string, which is the root directory of that file's repos (let ((map (make-sparse-keymap))) (set-keymap-parent map anything-map) (define-key map (kbd "RET") 'agrep-return) + (define-key map (kbd "C-o") 'agrep-next-source-or-detail) + (define-key map (kbd "") 'agrep-next-source-or-detail) map)) (defun agrep-source (command pwd) @@ -271,6 +273,14 @@ return either nil, or a string, which is the root directory of that file's repos (if (string-match ":[0-9]+:." it) (anything-exit-minibuffer) (anything-set-pattern (concat it ": "))))) +(defun agrep-next-source-or-detail () + (interactive) + (anything-move-selection-common + (lambda () + (goto-char (or (re-search-forward " details .+\n" (anything-get-next-header-pos) t) + (anything-get-next-header-pos) + (point-min)))) + 'source 'next)) (defun anything-compile-source--agrep-init (source) (if (assq 'anything-grep source) -- 2.11.4.GIT