From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Newsgroups: gmane.emacs.bugs Subject: bug#49836: Support ripgrep in semantic-symref-tool-grep Date: Sat, 18 Sep 2021 15:53:51 +0200 Message-ID: <34778BC0-8D97-4266-8B1F-9D1839E858B5@acm.org> References: <87sfzrbke1.fsf_-_@mail.linkov.net> Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.21\)) Content-Type: multipart/mixed; boundary="Apple-Mail=_F9F033EA-E663-4753-8BED-DB88E54C473B" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19845"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Lars Ingebrigtsen , 49836@debbugs.gnu.org, Dmitry Gutov To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Sep 18 15:55:16 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mRaoF-0004yI-6k for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 18 Sep 2021 15:55:15 +0200 Original-Received: from localhost ([::1]:54738 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mRaoD-0000Fq-5h for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 18 Sep 2021 09:55:13 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48382) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mRao2-0000Fi-KN for bug-gnu-emacs@gnu.org; Sat, 18 Sep 2021 09:55:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:50590) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mRao2-0002rX-Cl for bug-gnu-emacs@gnu.org; Sat, 18 Sep 2021 09:55:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mRao2-0001yg-4y for bug-gnu-emacs@gnu.org; Sat, 18 Sep 2021 09:55:02 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: <87sfzrbke1.fsf_-_@mail.linkov.net> Resent-From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 18 Sep 2021 13:55:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49836 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 49836-submit@debbugs.gnu.org id=B49836.16319732457522 (code B ref 49836); Sat, 18 Sep 2021 13:55:02 +0000 Original-Received: (at 49836) by debbugs.gnu.org; 18 Sep 2021 13:54:05 +0000 Original-Received: from localhost ([127.0.0.1]:33900 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mRan6-0001xG-Nz for submit@debbugs.gnu.org; Sat, 18 Sep 2021 09:54:04 -0400 Original-Received: from mail212c50.megamailservers.eu ([91.136.10.222]:59350 helo=mail194c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mRan3-0001wh-CG for 49836@debbugs.gnu.org; Sat, 18 Sep 2021 09:54:03 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1631973234; bh=aDqovr7SMdvgJMcst59fXmE/TzQ+ynEzj+O0pHLsBBM=; h=From:Subject:Date:Cc:To:From; b=OP4lXKlDK2ZDwNCH+FNvG4vWABUBZCPT+c5HfgAQ9bSoyiJWmU78XzXGQroltKpcD e2gqyT5IpbpukcWm24LQUpCrZ3MywvQntlpzuwlJQphmFaTndBQ9+vXhyrNK/4NNg+ mrUb8FHQRunxB6qbgBMvPXMqcLFx7ZtpXpXw9Sis= Feedback-ID: mattiase@acm.or Original-Received: from [192.168.0.4] (c188-150-171-71.bredband.tele2.se [188.150.171.71]) (authenticated bits=0) by mail194c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 18IDrphJ014939; Sat, 18 Sep 2021 13:53:53 +0000 X-Mailer: Apple Mail (2.3445.104.21) X-CTCH-RefID: str=0001.0A742F1C.6145EF72.0017, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.4 cv=H7G4f8Ui c=1 sm=1 tr=0 ts=6145ef72 a=SF+I6pRkHZhrawxbOkkvaA==:117 a=SF+I6pRkHZhrawxbOkkvaA==:17 a=M51BFTxLslgA:10 a=F_HoH42_FPgxv3Mm73wA:9 a=7Zwj6sZBwVKJAoWSPKxL6X1jA+E=:19 a=CjuIK1q_8ugA:10 a=dUQJr0O9WMbI_d5h5swA:9 a=B2y7HmGcmWMA:10 X-Origin-Country: SE X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:214630 Archived-At: --Apple-Mail=_F9F033EA-E663-4753-8BED-DB88E54C473B Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Attached is a straw-man patch that is not production-quality but = illustrates some of the concepts I'd like to see: * ripgrep supported for M-? * ripgrep auto-detected and used by default if available * treat ripgrep as a search method of its own and not just a different = grep program * corollary: selection of search method should be made symbolically and = not by supplying shell command strings Concerns not addressed by the patch: * unify back-ends and customisation options in xref.el and = symref/grep.el * tramp * correct way to auto-detect ripgrep -- I have no idea, really, and = would gladly settle for something dead simple, perhaps looking at the = output of rg --version, instead of the voodoo code in the patch * other search methods -- for example, it would be interesting to allow = use of Spotlight or similar indexed searching tools in some cases. * speeding up the parts that are not ripgrep. If the actual command = (ripgrep or something else) takes zero seconds, what if anything = prevents a crisp snappy response from Emacs? That said, it appears to work. Right now I'm not near my Linux machine = and can just compare against the fairly slow BSD grep that comes with = macOS, so obviously the speed-up is tremendous. --Apple-Mail=_F9F033EA-E663-4753-8BED-DB88E54C473B Content-Disposition: attachment; filename=0001-xref-ripgrep-support.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="0001-xref-ripgrep-support.patch" Content-Transfer-Encoding: quoted-printable =46rom=200d3fa647fd6a0c3a27bc5f9905e24103a3d6b617=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20=3D?UTF-8?q?Mattias=3D20Engdeg=3DC3=3DA5rd?=3D=20= =0ADate:=20Thu,=2016=20Sep=202021=2017:14:33=20+0200=0A= Subject:=20[PATCH]=20xref=20ripgrep=20support=0A=0AAuto-detect=20= presence=20of=20ripgrep=20and=20use=20it=20if=20available.=0AIt=20speeds=20= up=20`xref-find-references`=20(M-q),=20between=20a=20little=20and=20very=20= much.=0A---=0A=20lisp/cedet/semantic/symref/grep.el=20|=20121=20= +++++++++++++++++++++--------=0A=201=20file=20changed,=2088=20= insertions(+),=2033=20deletions(-)=0A=0Adiff=20--git=20= a/lisp/cedet/semantic/symref/grep.el=20= b/lisp/cedet/semantic/symref/grep.el=0Aindex=201e282c3052..106d46dc76=20= 100644=0A---=20a/lisp/cedet/semantic/symref/grep.el=0A+++=20= b/lisp/cedet/semantic/symref/grep.el=0A@@=20-79,16=20+79,7=20@@=20= semantic-symref-derive-find-filepatterns=0A=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20;;=20Only=20take=20in=20simple=20patterns,=20= so=20try=20to=20convert=20this=20one.=0A=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20(string-match=20"\\\\\\.\\([^\\'>]+\\)\\\\'"=20= (car=20X)))=0A=20=20=20=20=20=20=20=20=20=20=20(push=20(concat=20"*."=20= (match-string=201=20(car=20X)))=20pat))))=0A-=20=20=20=20;;=20Convert=20= the=20list=20into=20some=20find-flags.=0A-=20=20=20=20(if=20(null=20pat)=0A= -=20=20=20=20=20=20=20=20(error=20"Customize=20= `semantic-symref-filepattern-alist'=20for=20%S"=0A-=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20major-mode)=0A-=20=20=20=20=20=20(let=20((args=20= `("-name"=20,(car=20pat))))=0A-=20=20=20=20=20=20=20=20(if=20(null=20= (cdr=20pat))=0A-=20=20=20=20=20=20=20=20=20=20=20=20args=0A-=20=20=20=20=20= =20=20=20=20=20`("("=20,@args=0A-=20=20=20=20=20=20=20=20=20=20=20=20= ,@(mapcan=20(lambda=20(s)=20`("-o"=20"-name"=20,s))=20(cdr=20pat))=0A-=20= =20=20=20=20=20=20=20=20=20=20=20")"))))))=0A+=20=20=20=20pat))=0A=20=0A=20= (defvar=20semantic-symref-grep-flags)=0A=20=0A@@=20-133,12=20+124,91=20= @@=20semantic-symref-grep-shell=0A=20=20=20:group=20'semantic=0A=20=20=20= :type=20'string)=0A=20=0A+(defcustom=20semantic-symref-grep-tool=20= 'auto-detect=0A+=20=20"The=20tool=20to=20use=20for=20searching=20in=20= files."=0A+=20=20:type=20'(choice=20(const=20:tag=20"Auto-detect"=20= auto-detect)=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (const=20:tag=20"Ripgrep"=20ripgrep)=0A+=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20(const=20:tag=20"find=20+=20grep"=20find-grep))=0A+=20=20= :group=20'semantic)=0A+=0A+(defcustom=20= semantic-symref-grep-ripgrep-command=20"rg"=0A+=20=20"Name=20of=20the=20= ripgrep=20command=20to=20use."=0A+=20=20:type=20'file=0A+=20=20:group=20= 'semantic)=0A+=0A+(defun=20semantic-symref-grep--auto-detect-tool=20()=0A= +=20=20(let=20((have-rg=0A+=20=20=20=20=20=20=20=20=20(with-temp-buffer=0A= +=20=20=20=20=20=20=20=20=20=20=20(let=20((hello-file=20= (grep-hello-file)))=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20(let=20= ((process-file-side-effects=20nil))=0A+=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20(unwind-protect=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20(eql=20(ignore-errors=0A+=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20(process-file=0A+=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= semantic-symref-grep-ripgrep-command=0A+=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20nil=20t=20nil=20= "^Copyright"=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20(file-local-name=20hello-file)))=0A+=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=200)=0A+=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20(when=20(file-remote-p=20= hello-file)=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (delete-file=20hello-file))))))))=0A+=20=20=20=20(if=20have-rg=0A+=20=20=20= =20=20=20=20=20'ripgrep=0A+=20=20=20=20=20=20'find-grep)))=0A+=0A=20= (defun=20semantic-symref-grep--quote-extended=20(string)=0A=20=20=20= "Quote=20STRING=20as=20an=20extended-syntax=20regexp."=0A=20=20=20= (replace-regexp-in-string=20(rx=20(in=20".^$*+?|{}[]()|\\"))=0A=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (lambda=20(s)=20(concat=20"\\"=20s))=0A=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20string=20nil=20t))=0A=20= =0A+(defun=20semantic-symref-grep--command=20(rootdir=20filepatterns=20= file-name-only=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20pattern-type=20= pattern)=0A+=20=20"Compute=20search=20command=20to=20run.=0A+ROOTDIR=20= is=20the=20root=20of=20the=20tree=20to=20search.=20=20FILEPATTERNS=20is=20= a=0A+list=20of=20glob=20patterns=20that=20match=20the=20files=20to=20= search.=0A+If=20FILE-NAME-ONLY=20is=20non-nil,=20the=20search=20only=20= wants=20the=20names=20of=20files.=0A+PATTERN-TYPE=20indicates=20the=20= type=20of=20PATTERN:=0A+=20`regexp'=20=20=20=20=20--=20PATTERN=20is=20an=20= extended=20(egrep)=20regexp.=0A+=20`symbol'=20=20=20=20=20--=20PATTERN=20= is=20a=20literal=20identifier.=0A+=0A+Return=20the=20command=20and=20= arguments=20as=20a=20list=20of=20strings."=0A+=20=20(when=20(eq=20= semantic-symref-grep-tool=20'auto-detect)=0A+=20=20=20=20(setq=20= semantic-symref-grep-tool=0A+=20=20=20=20=20=20=20=20=20=20= (semantic-symref-grep--auto-detect-tool)))=0A+=20=20(cond=0A+=20=20=20= ((eq=20semantic-symref-grep-tool=20'ripgrep)=0A+=20=20=20=20(let=20= ((filepat-args=0A+=20=20=20=20=20=20=20=20=20=20=20(mapcan=20(lambda=20= (s)=20(list=20"-g"=20s))=20filepatterns))=0A+=20=20=20=20=20=20=20=20=20=20= (flags=20(cond=20(file-name-only=20"-l")=0A+=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20((eq=20pattern-type=20'symbol)=20= "-nw")=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20(t=20"-n")))=0A+=20=20=20=20=20=20=20=20=20=20(pat-arg=20(if=20(eq=20= pattern-type=20'symbol)=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20(semantic-symref-grep--quote-extended=20pattern)=0A= +=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= pattern))=0A+=20=20=20=20=20=20=20=20=20=20(dir=20(expand-file-name=20= rootdir)))=0A+=20=20=20=20=20=20`(,semantic-symref-grep-ripgrep-command=0A= +=20=20=20=20=20=20=20=20,@filepat-args=20,flags=20"-e"=20,pat-arg=20= ,dir)))=0A+=20=20=20(t=0A+=20=20=20=20(let*=20((filepat-args=0A+=20=20=20= =20=20=20=20=20=20=20=20=20;;=20Convert=20the=20list=20into=20some=20= find-flags.=0A+=20=20=20=20=20=20=20=20=20=20=20=20(let=20((args=20= `("-name"=20,(car=20filepatterns))))=0A+=20=20=20=20=20=20=20=20=20=20=20= =20=20=20(if=20(cdr=20filepatterns)=0A+=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20`("("=20,@args=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20,@(mapcan=20(lambda=20(s)=20(list=20"-o"=20"-name"=20= s))=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20(cdr=20filepatterns))=0A+=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20")")=0A+=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20args)))=0A+=20=20=20=20=20=20=20=20=20=20=20= (filepattern=20(mapconcat=20#'shell-quote-argument=20filepat-args=20"=20= "))=0A+=20=20=20=20=20=20=20=20=20=20=20(grepflags=20(cond=20= (file-name-only=20"-l=20")=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20((eq=20pattern-type=20'regexp)=20= "-nE=20")=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20(t=20"-nwE=20")))=0A+=20=20=20=20=20=20=20=20=20=20= =20(pat-arg=20(if=20(eq=20pattern-type=20'symbol)=0A+=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (semantic-symref-grep--quote-extended=20pattern)=0A+=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20pattern))=0A+=20=20=20=20=20= =20=20=20=20=20=20(cmd=20(semantic-symref-grep-use-template=0A+=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20(directory-file-name=20= (file-local-name=20rootdir))=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20filepattern=20grepflags=20pat-arg)))=0A+=20=20=20=20=20=20= `(,semantic-symref-grep-shell=20,shell-command-switch=20,cmd)))))=0A+=0A=20= (cl-defmethod=20semantic-symref-perform-search=20((tool=20= semantic-symref-tool-grep))=0A=20=20=20"Perform=20a=20search=20with=20= Grep."=0A=20=20=20;;=20Grep=20doesn't=20support=20some=20types=20of=20= searches.=0A@@=20-150,33=20+220,18=20@@=20semantic-symref-perform-search=0A= =20=20=20(let*=20(;;=20Find=20the=20file=20patterns=20to=20use.=0A=20=09=20= (rootdir=20(semantic-symref-calculate-rootdir))=0A=20=09=20(filepatterns=20= (semantic-symref-derive-find-filepatterns))=0A-=20=20=20=20=20=20=20=20=20= (filepattern=20(mapconcat=20#'shell-quote-argument=20filepatterns=20"=20= "))=0A-=09=20;;=20Grep=20based=20flags.=0A-=09=20(grepflags=20(cond=20= ((eq=20(oref=20tool=20resulttype)=20'file)=0A-=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20"-l=20")=0A-=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= ((eq=20(oref=20tool=20searchtype)=20'regexp)=0A-=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20"-nE=20")=0A-=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (t=20"-nw=20")))=0A-=20=20=20=20=20=20=20=20=20(searchfor=20(oref=20tool=20= searchfor))=0A-=20=20=20=20=20=20=20=20=20(greppat=20(if=20(eq=20(oref=20= tool=20searchtype)=20'regexp)=0A-=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20searchfor=0A-=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20(semantic-symref-grep--quote-extended=20= searchfor)))=0A-=09=20;;=20Misc=0A-=09=20(b=20(get-buffer-create=20= "*Semantic=20SymRef*"))=0A-=09=20(ans=20nil)=0A-=09=20)=0A+=20=20=20=20=20= =20=20=20=20(greppat=20(oref=20tool=20searchfor))=0A+=20=20=20=20=20=20=20= =20=20(file-names-only=20(eq=20(oref=20tool=20resulttype)=20'file))=0A+=20= =20=20=20=20=20=20=20=20(search-type=20(oref=20tool=20searchtype))=0A+=20= =20=20=20=20=20=20=20=20(command=20(semantic-symref-grep--command=0A+=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20rootdir=20= filepatterns=20file-names-only=20search-type=20greppat))=0A+=09=20(b=20= (get-buffer-create=20"*Semantic=20SymRef*")))=0A=20=0A=20=20=20=20=20= (with-current-buffer=20b=0A=20=20=20=20=20=20=20(erase-buffer)=0A=20=20=20= =20=20=20=20(setq=20default-directory=20rootdir)=0A-=20=20=20=20=20=20= (let=20((cmd=20(semantic-symref-grep-use-template=0A-=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20(directory-file-name=20(file-local-name=20= rootdir))=0A-=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= filepattern=20grepflags=20greppat)))=0A-=20=20=20=20=20=20=20=20= (process-file=20semantic-symref-grep-shell=20nil=20b=20nil=0A-=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= shell-command-switch=20cmd)))=0A-=20=20=20=20(setq=20ans=20= (semantic-symref-parse-tool-output=20tool=20b))=0A-=20=20=20=20;;=20= Return=20the=20answer=0A-=20=20=20=20ans))=0A+=20=20=20=20=20=20(apply=20= #'process-file=20(car=20command)=20nil=20b=20nil=20(cdr=20command)))=0A+=20= =20=20=20(semantic-symref-parse-tool-output=20tool=20b)))=0A=20=0A=20= (cl-defmethod=20semantic-symref-parse-tool-output-one-line=20((tool=20= semantic-symref-tool-grep))=0A=20=20=20"Parse=20one=20line=20of=20grep=20= output,=20and=20return=20it=20as=20a=20match=20list.=0A--=20=0A2.21.1=20= (Apple=20Git-122.3)=0A=0A= --Apple-Mail=_F9F033EA-E663-4753-8BED-DB88E54C473B--