From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Xah Lee Newsgroups: gmane.emacs.help Subject: Re: emacs 23 whitespace-mode, change newline display glyph Date: Sat, 15 Aug 2009 01:45:18 -0700 (PDT) Organization: http://groups.google.com Message-ID: <33a6e74d-972d-4fab-b67d-937a881087cd@m7g2000prd.googlegroups.com> References: <3cf016b2-6cfc-4898-9ffc-7ace62268be9@z4g2000prh.googlegroups.com> <87ljlw6ro3.fsf@lola.goethe.zz> <2a9a261c-bcd4-411b-9038-912cf5627ba1@y10g2000prf.googlegroups.com> <20090812110617$355d@prunille.vinc17.org> <87eirhb75k.fsf@iki.fi> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1250445745 19224 80.91.229.12 (16 Aug 2009 18:02:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 16 Aug 2009 18:02:25 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Aug 16 20:02:18 2009 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.50) id 1Mck3c-0004FG-F4 for geh-help-gnu-emacs@m.gmane.org; Sun, 16 Aug 2009 20:02:16 +0200 Original-Received: from localhost ([127.0.0.1]:54483 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mck3c-0006qr-2l for geh-help-gnu-emacs@m.gmane.org; Sun, 16 Aug 2009 14:02:16 -0400 Original-Path: news.stanford.edu!headwall.stanford.edu!news.glorb.com!news2.glorb.com!postnews.google.com!m7g2000prd.googlegroups.com!not-for-mail Original-Newsgroups: comp.emacs,gnu.emacs.help Original-Lines: 41 Original-NNTP-Posting-Host: 76.102.12.87 Original-X-Trace: posting.google.com 1250325919 17637 127.0.0.1 (15 Aug 2009 08:45:19 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Sat, 15 Aug 2009 08:45:19 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: m7g2000prd.googlegroups.com; posting-host=76.102.12.87; posting-account=bRPKjQoAAACxZsR8_VPXCX27T2YcsyMA User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US) AppleWebKit/530.5 (KHTML, like Gecko) Chrome/2.0.172.39 Safari/530.5, gzip(gfe), gzip(gfe) Original-Xref: news.stanford.edu comp.emacs:98594 gnu.emacs.help:171987 X-Mailman-Approved-At: Sun, 16 Aug 2009 14:01:54 -0400 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:67197 Archived-At: On Aug 12, 5:44 am, CHENG Gao wrote: > > in my emacs 23 both on Windows and Mac, the white space shows as $, > > not =C2=B6, when in whitespace-mode or whitespace-newline-mode. > > > How to make it show line breaks using =C2=B6 ? > > > i tried to read the doc... which took me too See also `whitespace- > > style', `whitespace-newline' and `whitespace-display-mappings', and > > customize... but its rather confusing. > Through reading whitespace-mode source, I found this works: > (setq whitespace-display-mappings '( > (newline-mark 10 > [182 10]))) it turns out, you have to set the whole list, not just one. The above will basically make it not display any glyphs to tabs and spaces. I spent several hours looking into this, here's the solution: (setq whitespace-display-mappings '( (space-mark 32 [183] [46]) ; normal space (space-mark 160 [164] [95]) (space-mark 2208 [2212] [95]) (space-mark 2336 [2340] [95]) (space-mark 3616 [3620] [95]) (space-mark 3872 [3876] [95]) (newline-mark 10 [182 10]) ; newlne (tab-mark 9 [9655 9] [92 9]) ; tab )) more detail here: =E2=80=A2 How to use and setup Emacs's whitespace-mode http://xahlee.org/emacs/whitespace-mode.html Xah =E2=88=91 http://xahlee.org/ =E2=98=84