emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: highlighting non-ASCII characters


From: Juri Linkov
Subject: Re: highlighting non-ASCII characters
Date: Tue, 30 Mar 2010 19:18:31 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (x86_64-pc-linux-gnu)

> 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.

This is a significant problem.  Often non-ASCII typographical characters
(such as en-dash, em-dash used in the documentation for the long command
line arguments, and different quotation marks used to quote command line
arguments) copied from a Web page to Emacs look like ASCII characters.
They can cause security compromises when pasted into the M-x shell
command line unnoticed.  In the best case, a shell command just signals
an error, in the worst case it overwrites existing files.

-- 
Juri Linkov
http://www.jurta.org/emacs/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]