From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.bugs Subject: bug#20707: [PROPOSED PATCH] Use curved quoting in C-generated errors Date: Mon, 1 Jun 2015 17:17:23 +0000 Message-ID: <20150601171723.GB16298@acm.fritz.box> References: <20150601104935.19764.qmail@mail.muc.de> <556C81C4.3010107@cs.ucla.edu> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1433179106 27023 80.91.229.3 (1 Jun 2015 17:18:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 1 Jun 2015 17:18:26 +0000 (UTC) Cc: 20707@debbugs.gnu.org To: Paul Eggert Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Jun 01 19:18:13 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1YzTLp-0006bv-1L for geb-bug-gnu-emacs@m.gmane.org; Mon, 01 Jun 2015 19:18:13 +0200 Original-Received: from localhost ([::1]:53574 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YzTLo-0003cx-DQ for geb-bug-gnu-emacs@m.gmane.org; Mon, 01 Jun 2015 13:18:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54971) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YzTLi-0003Y4-Ks for bug-gnu-emacs@gnu.org; Mon, 01 Jun 2015 13:18:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YzTLe-0008TT-Gr for bug-gnu-emacs@gnu.org; Mon, 01 Jun 2015 13:18:06 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:54613) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YzTLe-0008TP-Dp for bug-gnu-emacs@gnu.org; Mon, 01 Jun 2015 13:18:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1YzTLd-0004uy-S8 for bug-gnu-emacs@gnu.org; Mon, 01 Jun 2015 13:18:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 01 Jun 2015 17:18:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20707 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 20707-submit@debbugs.gnu.org id=B20707.143317902318837 (code B ref 20707); Mon, 01 Jun 2015 17:18:01 +0000 Original-Received: (at 20707) by debbugs.gnu.org; 1 Jun 2015 17:17:03 +0000 Original-Received: from localhost ([127.0.0.1]:36355 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YzTKe-0004tO-Bn for submit@debbugs.gnu.org; Mon, 01 Jun 2015 13:17:02 -0400 Original-Received: from colin.muc.de ([193.149.48.1]:57983 helo=mail.muc.de) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YzTKb-0004tD-Ux for 20707@debbugs.gnu.org; Mon, 01 Jun 2015 13:16:58 -0400 Original-Received: (qmail 25514 invoked by uid 3782); 1 Jun 2015 17:16:56 -0000 Original-Received: from acm.muc.de (p5B14719B.dip0.t-ipconnect.de [91.20.113.155]) by colin.muc.de (tmda-ofmipd) with ESMTP; Mon, 01 Jun 2015 19:16:55 +0200 Original-Received: (qmail 16740 invoked by uid 1000); 1 Jun 2015 17:17:23 -0000 Content-Disposition: inline In-Reply-To: <556C81C4.3010107@cs.ucla.edu> User-Agent: Mutt/1.5.23 (2014-03-12) X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 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.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:103446 Archived-At: Hello, Paul. On Mon, Jun 01, 2015 at 09:01:08AM -0700, Paul Eggert wrote: > On 06/01/2015 03:49 AM, Alan Mackenzie wrote: > > Currently, we can grep C source code (whether on the command line or > > within Emacs), specifically specifying quote characters like " (even if > > they have to be escaped). > Having just gone through this exercise, I can say that it doesn't work > as well as I had hoped. Characters are sometimes escaped, sometimes > not, and even something easy like searching for '`' finds many false > hits in comments. > > OK, there may be some arcane way of specifying these curly quotes > Hmm, well, it's not arcane for me. This shell command: > grep ‘ *.c That begs the question how do you type that left curly quote. I have no way of doing so on my keyboard. Having to memorise a 4 digit hex value would count as arcane for me. In mutt, that curly quote displays as `. However, searching for the ASCII back tick (correctly) fails to find it. This is disconcerting. Dumping the text to a file, visiting that file in Emacs and C-u C-x = shows the character to be LEFT SINGLE QUOTATION MARK, 0x2018. > generates all .c lines that contain left single quotation mark in a > string (after the proposed patch is applied). This is simpler than any > shell command to find apostrophe or double-quote or grave accent. > > Curly quotes display as ? on my terminal, sometimes inverted. > That's not good. What terminal are you using, and why does it not > handle UTF-8? I use the Linux virtual terminal: $TERM = linux consolefont="lat1-16" It doesn't handle UTF-8, because I never put in the effort to make it do so. Looking at the available fonts in /usr/share/consolefonts, there isn't one whose name looks like "utf" or "uni", except for four with names beginning with "UniCyr", which probably means something like "UTF Cyrillic". > What is your operating system and locale settings? (Gentoo) GNU/Linux with: $LANG = en_GB.utf8 , none of the LC_ variables being set. > If this is a common problem among Emacs developers, I suppose we'll > have to come up with a different way. -- Alan Mackenzie (Nuremberg, Germany).