unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Xah Lee <xahlee@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: emacs 23 whitespace-mode, change newline display glyph
Date: Sat, 15 Aug 2009 01:45:18 -0700 (PDT)	[thread overview]
Message-ID: <33a6e74d-972d-4fab-b67d-937a881087cd@m7g2000prd.googlegroups.com> (raw)
In-Reply-To: m2d471qk0x.fsf@cyberhut.org

On Aug 12, 5:44 am, CHENG Gao <cheng...@gmail.com> 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
))

more detail here:

• How to use and setup Emacs's whitespace-mode
  http://xahlee.org/emacs/whitespace-mode.html

  Xah
∑ http://xahlee.org/

  parent reply	other threads:[~2009-08-15  8:45 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <3cf016b2-6cfc-4898-9ffc-7ace62268be9@z4g2000prh.googlegroups.com>
     [not found] ` <87ljlw6ro3.fsf@lola.goethe.zz>
     [not found]   ` <2a9a261c-bcd4-411b-9038-912cf5627ba1@y10g2000prf.googlegroups.com>
     [not found]     ` <20090812110617$355d@prunille.vinc17.org>
     [not found]       ` <87eirhb75k.fsf@iki.fi>
2009-08-12 12:21         ` emacs 23 whitespace-mode, change newline display glyph Xah Lee
2009-08-12 12:44           ` CHENG Gao
2009-08-12 13:47             ` Xah Lee
2009-08-16 14:19               ` Stefan Vollmar
2009-08-15  8:45             ` Xah Lee [this message]
2009-08-18 12:55               ` Kevin Rodgers

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=33a6e74d-972d-4fab-b67d-937a881087cd@m7g2000prd.googlegroups.com \
    --to=xahlee@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).