branch: elpa/isl
commit 043773040509e2f4278e0d18d6a65914fcd2ce2e
Author: Thierry Volpiatto <[email protected]>
Commit: Thierry Volpiatto <[email protected]>
Add a new command to jump to helm-occur
---
isearch-light.el | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/isearch-light.el b/isearch-light.el
index 1a953b6a816..f73c26c77d2 100644
--- a/isearch-light.el
+++ b/isearch-light.el
@@ -31,6 +31,8 @@
(require 'cl-lib)
+(declare-function helm-multi-occur-1 "ext:helm-occur.el")
+
;; Internals
(defvar isl-pattern "")
(defvar isl-current-buffer nil)
@@ -117,6 +119,7 @@ in pattern."
(define-key map (kbd "M-r") 'isl-toggle-style-matching)
(define-key map (kbd "M-<") 'isl-goto-first)
(define-key map (kbd "M->") 'isl-goto-last)
+ (define-key map (kbd "M-s") 'isl-jump-to-helm-occur)
map))
;;; Actions
@@ -399,6 +402,17 @@ appended at end."
(isl-cleanup))
(quit (goto-char isl-initial-pos))))
+(defun isl-jump-to-helm-occur ()
+ "Invoke `helm-occur' from isl.
+
+To use this bind it to a key in `isl-map'."
+ (interactive)
+ (cl-assert (require 'helm-occur nil t))
+ (let ((input isl-pattern)
+ (bufs (list isl-current-buffer)))
+ (run-at-time 0.1 nil #'helm-multi-occur-1 bufs input)
+ (abort-recursive-edit)))
+
;;;###autoload
(defun isl-narrow-to-defun ()
"Start incremental searching in current defun."