all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: help-gnu-emacs@gnu.org
Subject: Re: whitespace-mode and visual-line-mode
Date: Wed, 25 Apr 2012 17:31:59 +0300	[thread overview]
Message-ID: <8362cng9wg.fsf@gnu.org> (raw)
In-Reply-To: <CAJELnLH51eHXvmqvffp03+MNC_uWRW8Xc+05nUhf9Z9_dN-uaA@mail.gmail.com>

> Date: Wed, 25 Apr 2012 10:17:07 -0400
> From: Matt McClure <matthewlmcclure@gmail.com>
> Cc: help-gnu-emacs@gnu.org
> 
> > Customize whitespace-display-mappings so that the whitespace
> > characters are displayed as themselves, instead of as fancy non-ASCII
> > glyphs.  (You will still have the faces to show the whitespace.)
> >
> 
> Hm. I tried, but Emacs still didn't wrap at word boundaries.

Try this:

    (setq whitespace-display-mappings
	  '(
	    (space-mark   ?\     [?\ ]     [?.])
	    (space-mark   ?\xA0  [?\u00A4] [?_])
	    (space-mark   ?\x8A0 [?\x8A4]  [?_])
	    (space-mark   ?\x920 [?\x924]  [?_])
	    (space-mark   ?\xE20 [?\xE24]  [?_])
	    (space-mark   ?\xF20 [?\xF24]  [?_])
	    (newline-mark ?\n    [?$ ?\n])
	    (tab-mark     ?\t    [?\t] [?\\ ?\t])))

The main point is to have the space and TAB be displayed as
themselves.  You tried to display a '.' instead of a space, which
won't fly with word wrap: it needs to see the space character to break
the line.



  reply	other threads:[~2012-04-25 14:31 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-23  0:29 whitespace-mode and visual-line-mode Matt McClure
2012-04-25  9:57 ` Eli Zaretskii
2012-04-25 14:17   ` Matt McClure
2012-04-25 14:31     ` Eli Zaretskii [this message]
     [not found]       ` <CAJELnLGRG9XPtqnwWNErZwfzsku=4iCD_Pxq5BXh6UeSLOPz+Q@mail.gmail.com>
     [not found]         ` <83397rg7e2.fsf@gnu.org>
2012-04-25 15:41           ` Matt McClure
2012-04-25 15:45             ` Eli Zaretskii
     [not found] <mailman.452.1335141019.751.help-gnu-emacs@gnu.org>
2012-04-25  8:16 ` Xah Lee

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

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

  git send-email \
    --in-reply-to=8362cng9wg.fsf@gnu.org \
    --to=eliz@gnu.org \
    --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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.