From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.devel Subject: Re: [Emacs-diffs] master 9ce1d38: Use curved quotes in core elisp diagnostics Date: Mon, 17 Aug 2015 09:39:38 -0700 Organization: UCLA Computer Science Department Message-ID: <55D20E4A.4060107@cs.ucla.edu> References: <20150816160149.9416.80132@vcs.savannah.gnu.org> <55D1043C.3030909@yandex.ru> <55D15899.2070105@cs.ucla.edu> <87mvxqkw7m.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1439829608 30231 80.91.229.3 (17 Aug 2015 16:40:08 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 17 Aug 2015 16:40:08 +0000 (UTC) Cc: emacs-devel@gnu.org, Dmitry Gutov To: Bastien Guerry Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Aug 17 18:39:59 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZRNS2-00080f-2i for ged-emacs-devel@m.gmane.org; Mon, 17 Aug 2015 18:39:58 +0200 Original-Received: from localhost ([::1]:58956 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZRNS0-0006IS-QQ for ged-emacs-devel@m.gmane.org; Mon, 17 Aug 2015 12:39:56 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55505) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZRNRt-0006Ht-6P for emacs-devel@gnu.org; Mon, 17 Aug 2015 12:39:54 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZRNRs-0008Uf-CQ for emacs-devel@gnu.org; Mon, 17 Aug 2015 12:39:49 -0400 Original-Received: from zimbra.cs.ucla.edu ([131.179.128.68]:36855) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZRNRn-0008TW-IU; Mon, 17 Aug 2015 12:39:43 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 491CB1605AF; Mon, 17 Aug 2015 09:39:42 -0700 (PDT) Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id dUkmLowWny0h; Mon, 17 Aug 2015 09:39:41 -0700 (PDT) Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 92BA4160D79; Mon, 17 Aug 2015 09:39:41 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id tugcsMKNVpl5; Mon, 17 Aug 2015 09:39:41 -0700 (PDT) Original-Received: from [192.168.1.9] (pool-100-32-155-148.lsanca.fios.verizon.net [100.32.155.148]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 701FA1605AF; Mon, 17 Aug 2015 09:39:41 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.8.0 In-Reply-To: <87mvxqkw7m.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 131.179.128.68 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:188847 Archived-At: Bastien Guerry wrote: > I sometimes use something like > > find . -type f -exec grep --color -nH -e "\`.\+'" {} + > > from M-x fing-grep to match variables in docstrings among various > files. > > If the code is using =E2=80=98...=E2=80=99 quotes, how can I grep to ma= tch quoted > strings? You can use curved quotes in the grep pattern. I just now tried the abov= e=20 command in the Emacs source code and got 108,000 hits, mostly false alarm= s. I=20 had better luck with this: find . -name test -prune -o '(' -name '*.el' -o -name '*.c' ')' -exec \ grep --color -nH -Ee \ "[\`'=E2=80=98][[:alpha:]][[:alnum:]]*-[[:alnum:]-]*[[:alnum:]][=E2=80= =99']" \ {} + This yields only 39,000 hits, mostly not false alarms. Although this is = the=20 sort of thing one would want to package up rather than type by hand, the = curved=20 quotes aren't the major reason for needing packaging.