Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add transformer function to multi occur.

* helm-regexp.el
(helm-moccur-buffer): new face.
(helm-m-occur-get-line): Use single prop change.
(helm-m-occur-transformer): new use it in helm-c-source-moccur.
  • Loading branch information...
commit 9f15d07959a7b939c01ddad4aafaeb8dd0868c45 1 parent 7288a9a
@thierryvolpiatto thierryvolpiatto authored
Showing with 106 additions and 68 deletions.
  1. +64 −59 helm-config.el
  2. +42 −9 helm-regexp.el
View
123 helm-config.el
@@ -188,7 +188,7 @@
;;;;;; helm-end-of-buffer helm-beginning-of-buffer helm-next-page
;;;;;; helm-previous-page helm-next-line helm-previous-line helm-select-action
;;;;;; helm-force-update helm-other-buffer helm-resume helm-open-last-log)
-;;;;;; "helm" "helm.el" (20508 57999 954682 900000))
+;;;;;; "helm" "helm.el" (20518 24247 654990 453000))
;;; Generated autoloads from helm.el
(autoload 'helm-open-last-log "helm" "\
@@ -444,7 +444,7 @@ Send a bug report of helm.el in helm session.
;;;***
;;;### (autoloads (helm-c-reset-adaptative-history) "helm-adaptative"
-;;;;;; "helm-adaptative.el" (20502 13711 42215 778000))
+;;;;;; "helm-adaptative.el" (20509 62549 748231 350000))
;;; Generated autoloads from helm-adaptative.el
(autoload 'helm-c-reset-adaptative-history "helm-adaptative" "\
@@ -455,8 +455,8 @@ Useful when you have a old or corrupted `helm-c-adaptive-history-file'.
;;;***
-;;;### (autoloads (helm-apt) "helm-apt" "helm-apt.el" (20502 13710
-;;;;;; 558213 379000))
+;;;### (autoloads (helm-apt) "helm-apt" "helm-apt.el" (20518 24247
+;;;;;; 630990 319000))
;;; Generated autoloads from helm-apt.el
(autoload 'helm-apt "helm-apt" "\
@@ -467,8 +467,8 @@ With a prefix arg reload cache.
;;;***
-;;;### (autoloads (helm-bbdb) "helm-bbdb" "helm-bbdb.el" (20502 13705
-;;;;;; 674189 160000))
+;;;### (autoloads (helm-bbdb) "helm-bbdb" "helm-bbdb.el" (20509 62549
+;;;;;; 748231 350000))
;;; Generated autoloads from helm-bbdb.el
(autoload 'helm-bbdb "helm-bbdb" "\
@@ -483,7 +483,7 @@ http://bbdb.sourceforge.net/
;;;***
;;;### (autoloads (helm-bookmark-ext helm-c-bmkext-run-edit) "helm-bmkext"
-;;;;;; "helm-bmkext.el" (20502 13705 514188 366000))
+;;;;;; "helm-bmkext.el" (20518 24247 630990 319000))
;;; Generated autoloads from helm-bmkext.el
(autoload 'helm-c-bmkext-run-edit "helm-bmkext" "\
@@ -503,7 +503,7 @@ Contain also `helm-c-source-google-suggest'.
;;;### (autoloads (helm-c-pp-bookmarks helm-bookmarks helm-c-bookmark-run-delete
;;;;;; helm-c-bookmark-run-jump-other-window) "helm-bookmark" "helm-bookmark.el"
-;;;;;; (20502 13710 398212 582000))
+;;;;;; (20518 24247 634990 339000))
;;; Generated autoloads from helm-bookmark.el
(autoload 'helm-c-bookmark-run-jump-other-window "helm-bookmark" "\
@@ -534,7 +534,7 @@ Preconfigured `helm' for bookmarks (pretty-printed).
;;;;;; helm-buffer-run-zgrep helm-buffer-run-grep helm-buffer-run-kill-buffers
;;;;;; helm-buffer-save-persistent helm-buffer-revert-persistent
;;;;;; helm-buffer-diff-persistent) "helm-buffers" "helm-buffers.el"
-;;;;;; (20502 13704 890185 269000))
+;;;;;; (20525 52500 588188 569000))
;;; Generated autoloads from helm-buffers.el
(autoload 'helm-buffer-diff-persistent "helm-buffers" "\
@@ -606,7 +606,7 @@ It is an enhanced version of `helm-for-buffers'.
;;;***
;;;### (autoloads (helm-simple-call-tree) "helm-call-tree" "helm-call-tree.el"
-;;;;;; (20502 13711 194216 534000))
+;;;;;; (20509 62549 756231 386000))
;;; Generated autoloads from helm-call-tree.el
(autoload 'helm-simple-call-tree "helm-call-tree" "\
@@ -619,8 +619,8 @@ http://www.emacswiki.org/cgi-bin/wiki/download/simple-call-tree.el
;;;***
-;;;### (autoloads (helm-colors) "helm-color" "helm-color.el" (20506
-;;;;;; 58854 165613 626000))
+;;;### (autoloads (helm-colors) "helm-color" "helm-color.el" (20509
+;;;;;; 62549 760231 411000))
;;; Generated autoloads from helm-color.el
(autoload 'helm-colors "helm-color" "\
@@ -630,8 +630,8 @@ Preconfigured `helm' for color.
;;;***
-;;;### (autoloads (helm-M-x) "helm-command" "helm-command.el" (20507
-;;;;;; 46483 873120 590000))
+;;;### (autoloads (helm-M-x) "helm-command" "helm-command.el" (20518
+;;;;;; 24247 634990 339000))
;;; Generated autoloads from helm-command.el
(autoload 'helm-M-x "helm-command" "\
@@ -646,7 +646,7 @@ It is `helm' replacement of regular `M-x' `execute-extended-command'.
;;;;;; helm-c-apropos helm-lisp-completion-or-file-name-at-point
;;;;;; helm-lisp-completion-at-point-or-indent helm-c-complete-file-name-at-point
;;;;;; helm-lisp-completion-at-point) "helm-elisp" "helm-elisp.el"
-;;;;;; (20502 13710 886215 3000))
+;;;;;; (20523 53619 747065 984000))
;;; Generated autoloads from helm-elisp.el
(autoload 'helm-lisp-completion-at-point "helm-elisp" "\
@@ -699,7 +699,7 @@ Preconfigured `helm' for timers.
;;;***
;;;### (autoloads (helm-elscreen) "helm-elscreen" "helm-elscreen.el"
-;;;;;; (20502 13710 78211 4000))
+;;;;;; (20509 62549 772231 472000))
;;; Generated autoloads from helm-elscreen.el
(autoload 'helm-elscreen "helm-elscreen" "\
@@ -709,8 +709,8 @@ Preconfigured helm to list elscreen.
;;;***
-;;;### (autoloads (helm-emms) "helm-emms" "helm-emms.el" (20502 13709
-;;;;;; 918210 210000))
+;;;### (autoloads (helm-emms) "helm-emms" "helm-emms.el" (20518 24247
+;;;;;; 638990 377000))
;;; Generated autoloads from helm-emms.el
(autoload 'helm-emms "helm-emms" "\
@@ -721,7 +721,7 @@ Preconfigured `helm' for emms sources.
;;;***
;;;### (autoloads (helm-eshell-history helm-esh-pcomplete) "helm-eshell"
-;;;;;; "helm-eshell.el" (20502 13709 762209 432000))
+;;;;;; "helm-eshell.el" (20523 53613 611035 557000))
;;; Generated autoloads from helm-eshell.el
(autoload 'helm-esh-pcomplete "helm-eshell" "\
@@ -737,8 +737,8 @@ Preconfigured helm for eshell history.
;;;***
;;;### (autoloads (helm-calcul-expression helm-eval-expression-with-eldoc
-;;;;;; helm-eval-expression) "helm-eval" "helm-eval.el" (20502 13709
-;;;;;; 614208 699000))
+;;;;;; helm-eval-expression) "helm-eval" "helm-eval.el" (20509 62549
+;;;;;; 776231 490000))
;;; Generated autoloads from helm-eval.el
(autoload 'helm-eval-expression "helm-eval" "\
@@ -759,7 +759,7 @@ Preconfigured helm for `helm-c-source-calculation-result'.
;;;***
;;;### (autoloads (helm-c-run-external-command) "helm-external" "helm-external.el"
-;;;;;; (20502 13705 50186 70000))
+;;;;;; (20523 23240 336341 187000))
;;; Generated autoloads from helm-external.el
(autoload 'helm-c-run-external-command "helm-external" "\
@@ -788,7 +788,7 @@ You can set your own list of commands with
;;;;;; helm-ff-run-load-file helm-ff-run-byte-compile-file helm-ff-run-rename-file
;;;;;; helm-ff-run-copy-file helm-ff-run-zgrep helm-ff-run-pdfgrep
;;;;;; helm-ff-run-grep helm-ff-run-switch-to-history helm-ff-run-toggle-auto-update)
-;;;;;; "helm-files" "helm-files.el" (20508 60228 189732 125000))
+;;;;;; "helm-files" "helm-files.el" (20523 24320 769698 734000))
;;; Generated autoloads from helm-files.el
(autoload 'helm-ff-run-toggle-auto-update "helm-files" "\
@@ -1020,7 +1020,7 @@ Preconfigured `helm' for `recentf'.
;;;***
;;;### (autoloads (helm-firefox-bookmarks) "helm-firefox" "helm-firefox.el"
-;;;;;; (20502 13709 446207 865000))
+;;;;;; (20509 62549 784231 526000))
;;; Generated autoloads from helm-firefox.el
(autoload 'helm-firefox-bookmarks "helm-firefox" "\
@@ -1041,7 +1041,7 @@ After closing firefox, you will be able to browse you bookmarks.
;;;***
;;;### (autoloads (helm-ucs helm-select-xfont) "helm-font" "helm-font.el"
-;;;;;; (20502 13707 842199 915000))
+;;;;;; (20509 62549 788231 551000))
;;; Generated autoloads from helm-font.el
(autoload 'helm-select-xfont "helm-font" "\
@@ -1056,8 +1056,8 @@ Preconfigured helm for `ucs-names' math symbols.
;;;***
-;;;### (autoloads (helm-gentoo) "helm-gentoo" "helm-gentoo.el" (20502
-;;;;;; 13709 278207 30000))
+;;;### (autoloads (helm-gentoo) "helm-gentoo" "helm-gentoo.el" (20509
+;;;;;; 62549 788231 551000))
;;; Generated autoloads from helm-gentoo.el
(autoload 'helm-gentoo "helm-gentoo" "\
@@ -1073,8 +1073,8 @@ Preconfigured `helm' for gentoo linux.
;;;;;; helm-grep-mode-jump-other-window helm-grep-mode-jump-other-window-backward
;;;;;; helm-grep-mode-jump-other-window-forward helm-grep-mode-jump
;;;;;; helm-grep-mode-quit helm-gm-precedent-file helm-gm-next-file
-;;;;;; helm-grep-mode) "helm-grep" "helm-grep.el" (20502 36653 74552
-;;;;;; 578000))
+;;;;;; helm-grep-mode) "helm-grep" "helm-grep.el" (20525 18273 59226
+;;;;;; 801000))
;;; Generated autoloads from helm-grep.el
(autoload 'helm-grep-mode "helm-grep" "\
@@ -1152,14 +1152,14 @@ Run grep save results action from `helm-do-grep-1'.
(autoload 'helm-do-grep "helm-grep" "\
Preconfigured helm for grep.
-Contrarily to Emacs `grep' no default directory is given, but
+Contrarily to Emacs `grep', no default directory is given, but
the full path of candidates in ONLY.
That allow to grep different files not only in `default-directory' but anywhere
by marking them (C-<SPACE>). If one or more directory is selected
grep will search in all files of these directories.
-You can use also wildcard in the base name of candidate.
-If a prefix arg is given use the -r option of grep.
-The prefix arg can be passed before or after start.
+You can also use wildcard in the base name of candidate.
+If a prefix arg is given use the -r option of grep (recurse).
+The prefix arg can be passed before or after start file selection.
See also `helm-do-grep-1'.
\(fn)" t nil)
@@ -1180,7 +1180,7 @@ Preconfigured helm for pdfgrep.
;;;;;; helm-esh-help helm-c-bookmark-help helm-c-ucs-help helm-etags-help
;;;;;; helm-pdfgrep-help helm-grep-help helm-generic-file-help helm-read-file-name-help
;;;;;; helm-ff-help helm-c-buffer-help helm-help) "helm-help" "helm-help.el"
-;;;;;; (20502 13706 18190 870000))
+;;;;;; (20509 62549 796231 595000))
;;; Generated autoloads from helm-help.el
(defvar helm-mode-line-string "\\<helm-map>\\[helm-help]:Help \\[helm-select-action]:Act \\[helm-exit-minibuffer]/\\[helm-select-2nd-action-or-end-of-line]/\\[helm-select-3rd-action]:NthAct" "\
@@ -1288,8 +1288,8 @@ HELM-ATTRIBUTE should be a symbol.
;;;***
-;;;### (autoloads (helm-imenu) "helm-imenu" "helm-imenu.el" (20502
-;;;;;; 13709 110206 201000))
+;;;### (autoloads (helm-imenu) "helm-imenu" "helm-imenu.el" (20509
+;;;;;; 62549 800231 605000))
;;; Generated autoloads from helm-imenu.el
(autoload 'helm-imenu "helm-imenu" "\
@@ -1300,7 +1300,7 @@ Preconfigured `helm' for `imenu'.
;;;***
;;;### (autoloads (helm-info-at-point) "helm-info" "helm-info.el"
-;;;;;; (20502 13706 842194 948000))
+;;;;;; (20509 62549 800231 605000))
;;; Generated autoloads from helm-info.el
(autoload 'helm-info-at-point "helm-info" "\
@@ -1311,8 +1311,8 @@ With a prefix-arg insert symbol at point.
;;;***
-;;;### (autoloads (helm-locate) "helm-locate" "helm-locate.el" (20503
-;;;;;; 28963 718805 587000))
+;;;### (autoloads (helm-locate) "helm-locate" "helm-locate.el" (20523
+;;;;;; 41052 79870 32000))
;;; Generated autoloads from helm-locate.el
(autoload 'helm-locate "helm-locate" "\
@@ -1333,8 +1333,8 @@ Where db_path is a filename matched by
;;;***
-;;;### (autoloads (helm-man-woman) "helm-man" "helm-man.el" (20504
-;;;;;; 64746 190843 540000))
+;;;### (autoloads (helm-man-woman) "helm-man" "helm-man.el" (20509
+;;;;;; 62549 804231 630000))
;;; Generated autoloads from helm-man.el
(autoload 'helm-man-woman "helm-man" "\
@@ -1345,7 +1345,7 @@ Preconfigured `helm' for Man and Woman pages.
;;;***
;;;### (autoloads (helm-match-plugin-mode) "helm-match-plugin" "helm-match-plugin.el"
-;;;;;; (20502 13706 202191 780000))
+;;;;;; (20509 62549 804231 630000))
;;; Generated autoloads from helm-match-plugin.el
(defvar helm-match-plugin-mode nil "\
@@ -1367,8 +1367,8 @@ See `helm-mp-matching-method' for the behavior of each method.
;;;### (autoloads (helm-minibuffer-history helm-mini helm-stumpwm-commands
;;;;;; helm-ratpoison-commands helm-eev-anchors helm-c-insert-latex-math
-;;;;;; helm-world-time) "helm-misc" "helm-misc.el" (20502 13707
-;;;;;; 2195 749000))
+;;;;;; helm-world-time) "helm-misc" "helm-misc.el" (20523 53687
+;;;;;; 559402 306000))
;;; Generated autoloads from helm-misc.el
(autoload 'helm-world-time "helm-misc" "\
@@ -1409,7 +1409,7 @@ Preconfigured `helm' for `minibuffer-history'.
;;;***
;;;### (autoloads (helm-mode helm-comp-read) "helm-mode" "helm-mode.el"
-;;;;;; (20502 31799 34482 712000))
+;;;;;; (20520 54077 111844 396000))
;;; Generated autoloads from helm-mode.el
(autoload 'helm-comp-read "helm-mode" "\
@@ -1522,7 +1522,7 @@ Note: This mode will work only partially on Emacs23.
;;;***
;;;### (autoloads (helm-yahoo-suggest helm-google-suggest helm-surfraw)
-;;;;;; "helm-net" "helm-net.el" (20502 13704 382182 686000))
+;;;;;; "helm-net" "helm-net.el" (20518 24247 646990 401000))
;;; Generated autoloads from helm-net.el
(autoload 'helm-surfraw "helm-net" "\
@@ -1543,7 +1543,7 @@ Preconfigured `helm' for Yahoo searching with Yahoo suggest.
;;;***
;;;### (autoloads (helm-org-headlines helm-org-keywords) "helm-org"
-;;;;;; "helm-org.el" (20502 13708 790204 610000))
+;;;;;; "helm-org.el" (20523 53734 415634 593000))
;;; Generated autoloads from helm-org.el
(autoload 'helm-org-keywords "helm-org" "\
@@ -1558,8 +1558,8 @@ Preconfigured helm to show org headlines.
;;;***
-;;;### (autoloads (helm-browse-code helm-occur helm-regexp) "helm-regexp"
-;;;;;; "helm-regexp.el" (20502 13706 526193 385000))
+;;;### (autoloads (helm-browse-code helm-multi-occur helm-occur helm-regexp)
+;;;;;; "helm-regexp" "helm-regexp.el" (20525 53336 356333 25000))
;;; Generated autoloads from helm-regexp.el
(autoload 'helm-regexp "helm-regexp" "\
@@ -1575,6 +1575,11 @@ otherwise search in whole buffer.
\(fn)" t nil)
+(autoload 'helm-multi-occur "helm-regexp" "\
+Preconfigured helm for multi occur.
+
+\(fn)" t nil)
+
(autoload 'helm-browse-code "helm-regexp" "\
Preconfigured helm to browse code.
@@ -1584,7 +1589,7 @@ Preconfigured helm to browse code.
;;;### (autoloads (helm-show-kill-ring helm-register helm-all-mark-rings
;;;;;; helm-global-mark-ring helm-mark-ring) "helm-ring" "helm-ring.el"
-;;;;;; (20502 13641 401870 457000))
+;;;;;; (20523 53766 435793 372000))
;;; Generated autoloads from helm-ring.el
(autoload 'helm-mark-ring "helm-ring" "\
@@ -1618,7 +1623,7 @@ First call open the kill-ring browser, next calls move to next line.
;;;***
;;;### (autoloads (helm-semantic-or-imenu helm-semantic) "helm-semantic"
-;;;;;; "helm-semantic.el" (20502 13708 634203 836000))
+;;;;;; "helm-semantic.el" (20509 62549 820231 709000))
;;; Generated autoloads from helm-semantic.el
(autoload 'helm-semantic "helm-semantic" "\
@@ -1638,7 +1643,7 @@ Fill in the symbol at point by default.
;;;***
;;;### (autoloads (helm-xrandr-set helm-list-emacs-process helm-top)
-;;;;;; "helm-sys" "helm-sys.el" (20507 22114 204897 297000))
+;;;;;; "helm-sys" "helm-sys.el" (20509 62549 820231 709000))
;;; Generated autoloads from helm-sys.el
(autoload 'helm-top "helm-sys" "\
@@ -1659,7 +1664,7 @@ Preconfigured `helm' for emacs process.
;;;***
;;;### (autoloads (helm-c-etags-select) "helm-tags" "helm-tags.el"
-;;;;;; (20502 13710 718214 171000))
+;;;;;; (20518 24247 650990 423000))
;;; Generated autoloads from helm-tags.el
(autoload 'helm-c-etags-select "helm-tags" "\
@@ -1674,7 +1679,7 @@ If tag file have been modified reinitialize cache.
;;;### (autoloads (helm-yank-text-at-point helm-w32-shell-execute-open-file
;;;;;; helm-quit-and-find-file helm-show-all-in-this-source-only)
-;;;;;; "helm-utils" "helm-utils.el" (20502 13706 370192 612000))
+;;;;;; "helm-utils" "helm-utils.el" (20522 1497 233307 450000))
;;; Generated autoloads from helm-utils.el
(autoload 'helm-show-all-in-this-source-only "helm-utils" "\
@@ -1705,8 +1710,8 @@ the entire symbol.
;;;***
-;;;### (autoloads (helm-w3m-bookmarks) "helm-w3m" "helm-w3m.el" (20502
-;;;;;; 13708 482203 81000))
+;;;### (autoloads (helm-w3m-bookmarks) "helm-w3m" "helm-w3m.el" (20509
+;;;;;; 62549 828231 753000))
;;; Generated autoloads from helm-w3m.el
(autoload 'helm-w3m-bookmarks "helm-w3m" "\
@@ -1723,7 +1728,7 @@ http://emacs-w3m.namazu.org/
;;;### (autoloads (helm-yaoddmuse-emacswiki-post-library helm-yaoddmuse-emacswiki-edit-or-view
;;;;;; helm-yaoddmuse-cache-pages) "helm-yaoddmuse" "helm-yaoddmuse.el"
-;;;;;; (20502 13708 322202 288000))
+;;;;;; (20509 62549 828231 753000))
;;; Generated autoloads from helm-yaoddmuse.el
(autoload 'helm-yaoddmuse-cache-pages "helm-yaoddmuse" "\
@@ -1752,8 +1757,8 @@ http://www.emacswiki.org/emacs/download/yaoddmuse.el
;;;***
-;;;### (autoloads nil nil ("helm-pkg.el" "helm-plugin.el") (20508
-;;;;;; 60539 621391 205000))
+;;;### (autoloads nil nil ("helm-pkg.el" "helm-plugin.el") (20525
+;;;;;; 54703 174093 936000))
;;;***
View
51 helm-regexp.el
@@ -48,6 +48,11 @@ type\\|theme\\|var\\|group\\|custom\\|const\\|method\\|class\\)"
to a specific `major-mode'."
:type '(alist :key-type symbol :value-type regexp)
:group 'helm-regexp)
+
+(defface helm-moccur-buffer
+ '((t (:foreground "DarkTurquoise" :underline t)))
+ "Face used to highlight moccur buffer names."
+ :group 'helm-regexp)
(defvar helm-occur-map
@@ -65,7 +70,7 @@ to a specific `major-mode'."
(define-key map (kbd "C-w") 'helm-yank-text-at-point)
(delq nil map))
"Keymap used in Moccur source.")
-
+
(defvar helm-build-regexp-history nil)
(defun helm-c-query-replace-regexp (candidate)
"Query replace regexp from `helm-regexp'.
@@ -200,9 +205,7 @@ i.e Don't replace inside a word, regexp is surrounded with \\bregexp\\b."
;;
;;
(defun helm-m-occur-init (buffers)
- "Create the initial helm multi occur buffer.
-If region is active use region as buffer contents
-instead of whole buffer."
+ "Create the initial helm multi occur buffer."
(helm-init-candidates-in-buffer
"*hmoccur*"
(loop for buf in buffers
@@ -214,16 +217,21 @@ instead of whole buffer."
concat bufstr)))
(defun helm-m-occur-get-line (s e)
+ "Format line for `helm-c-source-moccur'."
(format "%s:%d:%s"
(get-text-property (point-at-bol) 'buffer-name)
(save-restriction
- (narrow-to-region (previous-property-change (point))
- (next-property-change (point)))
+ (narrow-to-region (previous-single-property-change
+ (point) 'buffer-name)
+ (next-single-property-change
+ (point) 'buffer-name))
(line-number-at-pos s))
(buffer-substring s e)))
(defun* helm-m-occur-action (candidate
&optional (method (quote buffer)))
+ "Jump to CANDIDATE with METHOD.
+arg METHOD can be one of buffer, buffer-other-window, buffer-other-frame."
(let* ((split (split-string candidate ":" t))
(buf (car split))
(lineno (string-to-number (nth 1 split))))
@@ -234,6 +242,7 @@ instead of whole buffer."
(helm-goto-line lineno)))
(defun helm-m-occur-goto-line (candidate)
+ "From multi occur, switch to buffer and go to nth 1 CANDIDATE line."
(helm-m-occur-action candidate))
(defvar helm-c-source-moccur
@@ -241,15 +250,35 @@ instead of whole buffer."
(init . (lambda ()
(helm-m-occur-init buffers)))
(candidates-in-buffer)
+ (filtered-candidate-transformer . helm-m-occur-transformer)
+ (nohighlight)
(get-line . helm-m-occur-get-line)
(action . (("Go to Line" . helm-m-occur-goto-line)))
(recenter)
(candidate-number-limit . 9999)
(mode-line . helm-occur-mode-line)
(keymap . ,helm-c-moccur-map)
- (requires-pattern . 3)))
+ (requires-pattern . 3))
+ "Helm source for multi occur.")
+
+(defun helm-m-occur-transformer (candidates source)
+ "Transformer function for `helm-c-source-moccur'."
+ (require 'helm-grep)
+ (loop for i in candidates
+ for split = (split-string i ":" t)
+ for buf = (car split)
+ for lineno = (nth 1 split)
+ for str = (nth 2 split)
+ collect (cons (concat (propertize buf 'face 'helm-moccur-buffer
+ 'buffer-name buf)
+ ":"
+ (propertize lineno 'face 'helm-grep-lineno)
+ ":"
+ (helm-c-grep-highlight-match str))
+ i)))
(defun helm-multi-occur-1 (buffers)
+ "Main function to call `helm-c-source-moccur' with BUFFERS list."
(declare (special buffers))
(helm :sources 'helm-c-source-moccur
:buffer "*helm moccur*"))
@@ -356,9 +385,13 @@ otherwise search in whole buffer."
;;;###autoload
(defun helm-multi-occur ()
- "Preconfigured for helm multi occur."
+ "Preconfigured helm for multi occur."
(interactive)
- (let ((buffers (helm-comp-read
+ (let ((helm-compile-source-functions
+ ;; rule out helm-match-plugin because the input is one regexp.
+ (delq 'helm-compile-source--match-plugin
+ (copy-sequence helm-compile-source-functions)))
+ (buffers (helm-comp-read
"Buffers: " (helm-c-buffer-list)
:marked-candidates t)))
(helm-multi-occur-1 buffers)))
Please sign in to comment.
Something went wrong with that request. Please try again.