From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: pjb@informatimago.com (Pascal J. Bourguignon) Newsgroups: gmane.emacs.help Subject: Re: display zero with space U+200B Date: Fri, 10 Sep 2010 03:42:20 +0200 Organization: Informatimago Message-ID: <87bp869xxf.fsf@kuiper.lan.informatimago.com> References: <460c5513-10aa-45f5-9449-11fca22068b5@z25g2000vbn.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1291865075 28463 80.91.229.12 (9 Dec 2010 03:24:35 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 9 Dec 2010 03:24:35 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Dec 09 04:24:29 2010 Return-path: Envelope-to: geh-help-gnu-emacs@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 1PQX7N-0006po-03 for geh-help-gnu-emacs@m.gmane.org; Thu, 09 Dec 2010 04:24:29 +0100 Original-Received: from localhost ([127.0.0.1]:41055 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PQX7M-0000iS-BQ for geh-help-gnu-emacs@m.gmane.org; Wed, 08 Dec 2010 22:24:28 -0500 Original-Path: usenet.stanford.edu!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 36 Original-X-Trace: individual.net VJt6ft4ikAkRsuxu8dBh0AVZPjXzidxnFCESK004MakvrT3QZM Cancel-Lock: sha1:MzcxNzQ2N2Y4ZTJiMjZiNDA4NDhlYjg3ZDliYWQwY2U4N2Q0ZjJkNA== sha1:zylOWot7pWjJKHbbplzRxo/t3+s= Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAQMAAABtzGvEAAAABlBMVEUAAAD///+l2Z/dAAAA oElEQVR4nK3OsRHCMAwF0O8YQufUNIQRGIAja9CxSA55AxZgFO4coMgYrEDDQZWPIlNAjwq9 033pbOBPtbXuB6PKNBn5gZkhGa86Z4x2wE67O+06WxGD/HCOGR0deY3f9Ijwwt7rNGNf6Oac l/GuZTF1wFGKiYYHKSFAkjIo1b6sCYS1sVmFhhhahKQssRjRT90ITWUk6vvK3RsPGs+M1RuR mV+hO/VvFAAAAABJRU5ErkJggg== X-Accept-Language: fr, es, en X-Disabled: X-No-Archive: no User-Agent: Gnus/5.101 (Gnus v5.10.10) Emacs/23.2 (gnu/linux) Original-Xref: usenet.stanford.edu gnu.emacs.help:181220 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:76540 Archived-At: Florian Kaufmann writes: > I have a file containing zero with space characters (unicode code > point U+200B). Any idea how I can get a visual feedback where they > are? I tried to customize whitespace-display-mappings of whitespace.el > like this: > > (defcustom whitespace-display-mappings '( (space-mark ?\x200B [?\xB7] > [?.]) ... > > But I still don't see it. Normal spaces are displayed as intented by > whitespace.el. My advice would be to delete them from the file. Since they have a null width, you cannot see them, obviously. But you could show the characters that are around them. (let ((zws ?\u200b)) (re-search-forward (format "\\(^%c.\\|.%c.\\|.%c$\\|^%c$\\)" zws zws zws zws))) Another way to do it would involve compose-region: (font-lock-add-keywords nil `((,(format "\\(%c\\)" ?\u200b) ; #\ZERO_WIDTH_SPACE (1 (progn (compose-region (match-beginning 1) (match-end 1) ?\u2b1b ; #\BLACK_LARGE_SQUARE 'decompose-region) nil))))) -- __Pascal Bourguignon__ http://www.informatimago.com/