* emacs 23 whitespace-mode, change newline display glyph [not found] ` <87eirhb75k.fsf@iki.fi> @ 2009-08-12 12:21 ` Xah Lee 2009-08-12 12:44 ` CHENG Gao 0 siblings, 1 reply; 6+ messages in thread From: Xah Lee @ 2009-08-12 12:21 UTC (permalink / raw) To: help-gnu-emacs On Aug 12, 4:31 am, Teemu Likonen <tliko...@iki.fi> wrote: > On 2009-08-12 11:23 (UTC), Vincent Lefevre wrote: > > > Otherwise one can still use the Long Lines mode (longlines-mode, that > > was already present in Emacs 22), which shows the logical lines in > > some other way: with a character ("|" in Emacs 22, "¶" in Emacs 23) in > > a different color at the end of the logical line (but with the > > longlines mode, the show-trailing-whitespace variable has no effect). > > One can pretty much replace longlines-mode with this: > > (visual-line-mode 1) > (whitespace-newline-mode 1) > (setq fill-column 999999) > > This is nicer because longlines-mode is a hack which actually modifies > the buffer in order to differentiate between hard and soft newlines. > Emacs 23 has this proper way of doing it. 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. Xah ∑ http://xahlee.org/ ☄ ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: emacs 23 whitespace-mode, change newline display glyph 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-15 8:45 ` Xah Lee 0 siblings, 2 replies; 6+ messages in thread From: CHENG Gao @ 2009-08-12 12:44 UTC (permalink / raw) To: help-gnu-emacs *On Wed, 12 Aug 2009 05:21:00 -0700 (PDT) * Also sprach Xah Lee <xahlee@gmail.com>: > On Aug 12, 4:31 am, Teemu Likonen <tliko...@iki.fi> wrote: >> On 2009-08-12 11:23 (UTC), Vincent Lefevre wrote: >> >> > Otherwise one can still use the Long Lines mode (longlines-mode, that >> > was already present in Emacs 22), which shows the logical lines in >> > some other way: with a character ("|" in Emacs 22, "¶" in Emacs 23) in >> > a different color at the end of the logical line (but with the >> > longlines mode, the show-trailing-whitespace variable has no effect). >> >> One can pretty much replace longlines-mode with this: >> >> (visual-line-mode 1) >> (whitespace-newline-mode 1) >> (setq fill-column 999999) >> >> This is nicer because longlines-mode is a hack which actually modifies >> the buffer in order to differentiate between hard and soft newlines. >> Emacs 23 has this proper way of doing it. > > 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. > > Xah > ∑ http://xahlee.org/ > > ☄ Through reading whitespace-mode source, I found this works: ,---- | (setq whitespace-display-mappings '( | (newline-mark 10 | [182 10]))) `---- ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: emacs 23 whitespace-mode, change newline display glyph 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 1 sibling, 1 reply; 6+ messages in thread From: Xah Lee @ 2009-08-12 13:47 UTC (permalink / raw) To: help-gnu-emacs Xah Lee <xah...@gmail.com>: > > 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 ¶ ? On Aug 12, 5:44 am, CHENG Gao <cheng...@gmail.com> wrote: > Through reading whitespace-mode source, I found this works: > > ,---- > | (setq whitespace-display-mappings '( > | (newline-mark 10 > | [182 10]))) > `---- Thanks! Xah ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: emacs 23 whitespace-mode, change newline display glyph 2009-08-12 13:47 ` Xah Lee @ 2009-08-16 14:19 ` Stefan Vollmar 0 siblings, 0 replies; 6+ messages in thread From: Stefan Vollmar @ 2009-08-16 14:19 UTC (permalink / raw) To: help-gnu-emacs Dear Xah, dear Cheng, On 12.08.2009, at 15:47, Xah Lee wrote: > Xah Lee <xah...@gmail.com>: >>> 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 ¶ ? > > On Aug 12, 5:44 am, CHENG Gao <cheng...@gmail.com> wrote: >> Through reading whitespace-mode source, I found this works: >> >> ,---- >> | (setq whitespace-display-mappings '( >> | (newline-mark 10 >> | [182 10]))) >> `---- I had a problem with Global-Show-Newlines in Aquamacs 2.0pr2 which is possibly related and David Reitter provided a solution which works fine for me: > From: David Reitter <david.reitter@gmail.com> > Date: 16. August 2009 15:12:25 MESZ > To: Emacs on Mac OS X Mailing List <macosx-emacs@email.esm.psu.edu> > Subject: Re: [OS X Emacs] wrong glyphs in Show-Newlines mode > Reply-To: Emacs on Mac OS X Mailing List <macosx-emacs@email.esm.psu.edu > > > > On Aug 16, 2009, at 6:14 AM, Stefan Vollmar wrote: > >> in Aquamacs 2.0preview2, when enabling the menu entry >> Options:View:Show Newlines the message "Global-Show-Newlines mode >> enabled" appears and all newlines are marked with a grey rectangle. >> I observed this with several fonts. > > Thanks, fixed. This lets you set your own symbol: > > (setq show-newlines-newline-code > (vector (make-glyph-code ?\x00B6 'blank-newline) 10)) > > - David -- Dr. Stefan Vollmar, Dipl.-Phys. Max-Planck-Institut für neurologische Forschung Gleuelerstr. 50, 50931 Köln, Germany Tel.: +49-221-4726-213 FAX +49-221-4726-298 Tel.: +49-221-478-5713 Mobile: 0160-93874279 Email: vollmar@nf.mpg.de http://www.nf.mpg.de ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: emacs 23 whitespace-mode, change newline display glyph 2009-08-12 12:44 ` CHENG Gao 2009-08-12 13:47 ` Xah Lee @ 2009-08-15 8:45 ` Xah Lee 2009-08-18 12:55 ` Kevin Rodgers 1 sibling, 1 reply; 6+ messages in thread From: Xah Lee @ 2009-08-15 8:45 UTC (permalink / raw) To: help-gnu-emacs 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/ ☄ ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: emacs 23 whitespace-mode, change newline display glyph 2009-08-15 8:45 ` Xah Lee @ 2009-08-18 12:55 ` Kevin Rodgers 0 siblings, 0 replies; 6+ messages in thread From: Kevin Rodgers @ 2009-08-18 12:55 UTC (permalink / raw) To: help-gnu-emacs Xah Lee wrote: > 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 > )) 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 ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2009-08-18 12:55 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [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 2009-08-18 12:55 ` Kevin Rodgers
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).