From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.devel Subject: RE: highlighting non-ASCII characters Date: Tue, 30 Mar 2010 07:04:05 -0700 Message-ID: <130527C5CEED43598D8CDF4324E475B7@us.oracle.com> References: <6932BBFEB09A4BA09156ED7F598569CE@us.oracle.com> <87pr2uv8e1.fsf@lifelogs.com> <87aatyuj9s.fsf@lifelogs.com><87pr2rj89j.fsf@lifelogs.com> <87ljdeke5k.fsf@lifelogs.com><87eij3ht2c.fsf@lifelogs.com> <87aatqj0ti.fsf@lifelogs.com> <87vdcegdco.fsf@lifelogs.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1269957965 29091 80.91.229.12 (30 Mar 2010 14:06:05 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 30 Mar 2010 14:06:05 +0000 (UTC) To: "'Ted Zlatanov'" , Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Mar 30 16:05:56 2010 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Nwc4q-0004UV-0n for ged-emacs-devel@m.gmane.org; Tue, 30 Mar 2010 16:05:56 +0200 Original-Received: from localhost ([127.0.0.1]:52038 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nwc4p-0005Ap-2C for ged-emacs-devel@m.gmane.org; Tue, 30 Mar 2010 10:05:55 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Nwc3Y-0004GG-Qj for emacs-devel@gnu.org; Tue, 30 Mar 2010 10:04:36 -0400 Original-Received: from [140.186.70.92] (port=51850 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nwc3X-0004D4-Ax for emacs-devel@gnu.org; Tue, 30 Mar 2010 10:04:36 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Nwc3V-0006Ji-Np for emacs-devel@gnu.org; Tue, 30 Mar 2010 10:04:35 -0400 Original-Received: from rcsinet11.oracle.com ([148.87.113.123]:36684) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Nwc3V-0006Jb-Im for emacs-devel@gnu.org; Tue, 30 Mar 2010 10:04:33 -0400 Original-Received: from rcsinet15.oracle.com (rcsinet15.oracle.com [148.87.113.117]) by rcsinet11.oracle.com (Switch-3.4.2/Switch-3.4.2) with ESMTP id o2UE4MSY023961 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 30 Mar 2010 14:04:24 GMT Original-Received: from acsmt354.oracle.com (acsmt354.oracle.com [141.146.40.154]) by rcsinet15.oracle.com (Switch-3.4.2/Switch-3.4.1) with ESMTP id o2UE4Faa020092; Tue, 30 Mar 2010 14:04:15 GMT Original-Received: from abhmt002.oracle.com by acsmt353.oracle.com with ESMTP id 129601751269957852; Tue, 30 Mar 2010 07:04:12 -0700 Original-Received: from dradamslap1 (/10.175.209.254) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 30 Mar 2010 07:04:09 -0700 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <87vdcegdco.fsf@lifelogs.com> Thread-Index: AcrQCzlqgADSY0boTUaWfzlw4n5aEQABNC/A X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 X-Source-IP: acsmt354.oracle.com [141.146.40.154] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A090205.4BB204E5.0042:SCFMA4539814,ss=1,fgs=0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:122910 Archived-At: > DA> it can also be useful to highlight a character (e.g. curly quote) > DA> that is similar to but not identical to another character > DA> (e.g. straight quote). > > OK, but can you say how it's useful in a specific example? In SQL, > Perl, Java, Lisp, and TeX editing I would not need the *glyphs* > highlighted because the mode would detect the mismatch, e.g. in Perl > > $result = `run command here[wrong backward quote here]; # comment here > > would highlight "comment here" as part of the command. IOW they are > syntactically significant so a mismatch is not likely to go unnoticed > anyway by the regular font-lock and the parser. > > In regular text it's legitimate to have any combination of quote marks > so I don't see the benefit of looking for suspicious combinations. In > domain names quote marks of any kind are suspicious :) Perhaps you're assuming that the code will be used in Emacs, so you say that Emacs treats all such quotes similarly or highlights them anyway etc. (so no problem). Emacs might be used to write raw documentation (e.g. including code samples) that is used to generate HTML or PDF or... Readers of that doc might then copy and paste such examples into an app other than Emacs for execution - an app that does not treat all such quotes similarly. Just one hypothetical example, extrapolated from why we use straight quotes in our use of Framemaker. Beyond that, I would think that there might be a number of use cases where one might want to visually distinguish characters that are difficult to distinguish - either exact homoglyphs or approximate ones. That's all. Remember that it was only recently that Emacs itself started to treat a non-breaking space in Lisp code the same as a regular space. Nothing guarantees that an app DTRT with chars that look similar but are different. And there's the opposite potential problem: not distinguishing similar chars visually in the case where they do have different behaviors in some app. Suppose you prepare code (for example) in Emacs for use in some other context, and you want to be made aware when you use the wrong char, to avoid a problem downstream. Anyway, you get the point, I think. If you don't think there is a problem, I'm OK with that.