# HG changeset patch # User Augie Fackler # Date 1549056305 18000 # Node ID f86c1048a46deca6c98295d3db48c865302fc96d # Parent 79110d94a0c21576135b9e22504d7794e555bfe8 emacs: hack up my textmate.el some more to add searching config This gives up and use a bonus grep for extension filtering because I can't quite make the rg flags work like the grep one, and this gets the job done with minimal fuss. diff --git a/.elisp/textmate.el b/.elisp/textmate.el --- a/.elisp/textmate.el +++ b/.elisp/textmate.el @@ -156,6 +156,8 @@ completing filenames and symbols (`ido' "string to give to grep -V to exclude some VCS paths from being grepped." ) +(defvar *textmate-grep-command* "egrep --color=never -n" "Base grep command.") + (defvar *textmate-find-in-project-default* nil) (defvar *textmate-find-in-project-type-default* nil) @@ -280,7 +282,7 @@ in a grep-mode buffer." ": " ) nil nil *textmate-find-in-project-type-default*))) (setq *textmate-find-in-project-type-default* pat) - (textmate-find-in-project (concat "*." pat)))) + (textmate-find-in-project (concat ".*\\." pat "$")))) (defun textmate-start-compile-in-root (command &optional mode name-function @@ -316,7 +318,6 @@ specific type of file." (if (and default (> (length default) 0)) (format "[\"%s\"]" default)) ": ") nil 'textmate-find-in-project-history default)) - (incpat (if pattern pattern "*")) (type (textmate-project-root-type (textmate-project-root))) (command (cond ((not (string= type "unknown")) @@ -326,8 +327,8 @@ specific type of file." (concat " | egrep --color=never -v " (shell-quote-argument *textmate-vcs-exclude*)) "") - " | xargs egrep --color=never -n " - (if pattern (concat " --include='" pattern "' ") "") + (if pattern (concat " | egrep '" pattern "' ")) + " | xargs " *textmate-grep-command* " " " -- " (shell-quote-argument re))) (t (concat "egrep --color=never -nR --exclude='"