From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kevin Rodgers Newsgroups: gmane.emacs.help Subject: Re: emacs 23 whitespace-mode, change newline display glyph Date: Tue, 18 Aug 2009 06:55:27 -0600 Message-ID: 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> <33a6e74d-972d-4fab-b67d-937a881087cd@m7g2000prd.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1250600197 11188 80.91.229.12 (18 Aug 2009 12:56:37 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 18 Aug 2009 12:56:37 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Aug 18 14:56:30 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 1MdOEl-0007D4-By for geh-help-gnu-emacs@m.gmane.org; Tue, 18 Aug 2009 14:56:27 +0200 Original-Received: from localhost ([127.0.0.1]:60208 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MdOEk-0001gu-Sd for geh-help-gnu-emacs@m.gmane.org; Tue, 18 Aug 2009 08:56:26 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MdOEK-0001cP-FF for help-gnu-emacs@gnu.org; Tue, 18 Aug 2009 08:56:00 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MdOEF-0001OR-BS for help-gnu-emacs@gnu.org; Tue, 18 Aug 2009 08:55:59 -0400 Original-Received: from [199.232.76.173] (port=36737 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MdOEF-0001OO-3u for help-gnu-emacs@gnu.org; Tue, 18 Aug 2009 08:55:55 -0400 Original-Received: from lo.gmane.org ([80.91.229.12]:52124) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MdOEE-0004Fq-JY for help-gnu-emacs@gnu.org; Tue, 18 Aug 2009 08:55:54 -0400 Original-Received: from list by lo.gmane.org with local (Exim 4.50) id 1MdOE9-0006u4-5k for help-gnu-emacs@gnu.org; Tue, 18 Aug 2009 14:55:49 +0200 Original-Received: from c-71-237-24-138.hsd1.co.comcast.net ([71.237.24.138]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 18 Aug 2009 14:55:49 +0200 Original-Received: from kevin.d.rodgers by c-71-237-24-138.hsd1.co.comcast.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 18 Aug 2009 14:55:49 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 52 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: c-71-237-24-138.hsd1.co.comcast.net User-Agent: Thunderbird 2.0.0.22 (Macintosh/20090605) In-Reply-To: <33a6e74d-972d-4fab-b67d-937a881087cd@m7g2000prd.googlegroups.com> X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) 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:67247 Archived-At: Xah Lee wrote: > On Aug 12, 5:44 am, CHENG Gao wrote: >>> in my emacs 23 both on Windows and Mac, the white space shows as $, >>> not ¶, when in whitespace-mode or whitespace-newline-mode. >>> How to make it show line breaks using ¶ ? >>> 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 > )) Why not just: (require 'whitespace-mode) (setq whitespace-display-mappings (cons '(newline-mark 10 [182 10]) whitespace-display-mappings)) > more detail here: > > • How to use and setup Emacs's whitespace-mode > http://xahlee.org/emacs/whitespace-mode.html > > Xah > ∑ http://xahlee.org/ > > ☄ > -- Kevin Rodgers Denver, Colorado, USA