all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* a emacs mode to see newline, tabs, spaces
@ 2009-08-13 19:10 n179911
  2009-08-13 19:16 ` Maurizio Vitale
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: n179911 @ 2009-08-13 19:10 UTC (permalink / raw)
  To: help-gnu-emacs

Hi,

Is there any way to put emacs in a mode which I can visualize newline,
tab, space?

Thank you.




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: a emacs mode to see newline, tabs, spaces
  2009-08-13 19:10 n179911
@ 2009-08-13 19:16 ` Maurizio Vitale
  2009-08-14  1:36   ` n179911
  2009-08-13 20:13 ` Drew Adams
       [not found] ` <mailman.4538.1250194416.2239.help-gnu-emacs@gnu.org>
  2 siblings, 1 reply; 8+ messages in thread
From: Maurizio Vitale @ 2009-08-13 19:16 UTC (permalink / raw)
  To: help-gnu-emacs

>>>>> "n179911" == n179911  <n179911@gmail.com> writes:

    n179911> Hi, Is there any way to put emacs in a mode which I can
    n179911> visualize newline, tab, space?

whitespace.el

-- 





^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: a emacs mode to see newline, tabs, spaces
       [not found] <mailman.4536.1250190656.2239.help-gnu-emacs@gnu.org>
@ 2009-08-13 20:00 ` Teemu Likonen
  0 siblings, 0 replies; 8+ messages in thread
From: Teemu Likonen @ 2009-08-13 20:00 UTC (permalink / raw)
  To: help-gnu-emacs

On 2009-08-13 12:10 (-0700), n179911@gmail.com wrote:
> Is there any way to put emacs in a mode which I can visualize newline,
> tab, space?

Yes, there is. Some reading:

    C-h f whitespace-mode RET
    C-h f whitespace-toggle-options RET
    C-h v whitespace-style RET


^ permalink raw reply	[flat|nested] 8+ messages in thread

* RE: a emacs mode to see newline, tabs, spaces
  2009-08-13 19:10 n179911
  2009-08-13 19:16 ` Maurizio Vitale
@ 2009-08-13 20:13 ` Drew Adams
       [not found] ` <mailman.4538.1250194416.2239.help-gnu-emacs@gnu.org>
  2 siblings, 0 replies; 8+ messages in thread
From: Drew Adams @ 2009-08-13 20:13 UTC (permalink / raw)
  To: 'n179911', help-gnu-emacs

> Is there any way to put emacs in a mode which I can visualize newline,
> tab, space?
http://www.emacswiki.org/emacs/ShowWhiteSpace





^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: a emacs mode to see newline, tabs, spaces
  2009-08-13 19:16 ` Maurizio Vitale
@ 2009-08-14  1:36   ` n179911
  2009-08-14  2:05     ` Maurizio Vitale
  0 siblings, 1 reply; 8+ messages in thread
From: n179911 @ 2009-08-14  1:36 UTC (permalink / raw)
  To: maurizio.vitale; +Cc: help-gnu-emacs

Thank you.
I have installed whitespace.el. And I have read
'http://www.emacswiki.org/emacs/download/whitespace.el'

But is there a way to convert a section of the code (not the whole
file) so that all the tab will be 4 spaces?
I tried 'whitespace-cleanup-region', but that does not change anything.

Thank you.


On Thu, Aug 13, 2009 at 12:16 PM, Maurizio
Vitale<mav@cuma.i-did-not-set--mail-host-address--so-tickle-me> wrote:
>>>>>> "n179911" == n179911  <n179911@gmail.com> writes:
>
>    n179911> Hi, Is there any way to put emacs in a mode which I can
>    n179911> visualize newline, tab, space?
>
> whitespace.el
>
> --
>
>
>
>




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: a emacs mode to see newline, tabs, spaces
  2009-08-14  1:36   ` n179911
@ 2009-08-14  2:05     ` Maurizio Vitale
  0 siblings, 0 replies; 8+ messages in thread
From: Maurizio Vitale @ 2009-08-14  2:05 UTC (permalink / raw)
  To: help-gnu-emacs

>>>>> "n179911" == n179911  <n179911@gmail.com> writes:

    n179911> Thank you.  I have installed whitespace.el. And I have read
    n179911> 'http://www.emacswiki.org/emacs/download/whitespace.el'

    n179911> But is there a way to convert a section of the code (not
    n179911> the whole file) so that all the tab will be 4 spaces?  I
    n179911> tried 'whitespace-cleanup-region', but that does not change
    n179911> anything.

If by this you mean that all tabs are replaced by 4 spaces:

  - set tab-width to 4
  - mark the region of interest
  - M-x untabify

oth,

  Maurizio
-- 





^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: a emacs mode to see newline, tabs, spaces
       [not found] ` <mailman.4538.1250194416.2239.help-gnu-emacs@gnu.org>
@ 2009-08-19 11:45   ` Sébastien Vauban
  2009-08-21 16:07     ` Drew Adams
  0 siblings, 1 reply; 8+ messages in thread
From: Sébastien Vauban @ 2009-08-19 11:45 UTC (permalink / raw)
  To: help-gnu-emacs-mXXj517/zsQ

Hi Drew,

>> Is there any way to put emacs in a mode which I can visualize newline, tab,
>> space?
>
> http://www.emacswiki.org/emacs/ShowWhiteSpace

When highlighting tab characters with the following snippet of code, my Gnus
Group buffer becomes black-and-white only.

--8<---------------cut here---------------start------------->8---
;; highlight tabs
(require 'show-wspace)
(add-hook 'font-lock-mode-hook 'highlight-tabs)
--8<---------------cut here---------------end--------------->8---

Same happens with the following:

--8<---------------cut here---------------start------------->8---
;; highlight tabs in all modes
(add-hook 'font-lock-mode-hook
          '(lambda ()
             (font-lock-add-keywords
              nil
              '(("\t" 0 'trailing-whitespace prepend)))))
--8<---------------cut here---------------end--------------->8---

Any idea why?

Best regards,
  Seb

-- 
Sébastien Vauban


^ permalink raw reply	[flat|nested] 8+ messages in thread

* RE: a emacs mode to see newline, tabs, spaces
  2009-08-19 11:45   ` Sébastien Vauban
@ 2009-08-21 16:07     ` Drew Adams
  0 siblings, 0 replies; 8+ messages in thread
From: Drew Adams @ 2009-08-21 16:07 UTC (permalink / raw)
  To: 'Sébastien Vauban', help-gnu-emacs

> >> Is there any way to put emacs in a mode which I can 
> >> visualize newline, tab, space?
> >
> > http://www.emacswiki.org/emacs/ShowWhiteSpace
> 
> When highlighting tab characters with the following snippet 
> of code, my Gnus Group buffer becomes black-and-white only.
> 
> (require 'show-wspace)
> (add-hook 'font-lock-mode-hook 'highlight-tabs)

I know nothing about a function called `highlight-tabs'. The function defined in
show-wspace.el is `show-ws-highlight-tabs'. Is that what you meant (what you
used)?

> Same happens with the following:
> (add-hook 'font-lock-mode-hook
>           '(lambda ()
>              (font-lock-add-keywords
>               nil
>               '(("\t" 0 'trailing-whitespace prepend)))))

Again, I know nothing about `trailing-whitespace'. show-wspace.el defines this
function: `show-ws-highlight-trailing-whitespace'. 

> Any idea why?

I suspect you might be mixing things from two or more different
whitespace-display packages. If you want to use show-wspace.el to show
whitespace, follow the instructions in the file. For example:

(require 'show-wspace)
;; Highlight tabs
(add-hook 'font-lock-mode-hook
 'show-ws-highlight-tabs)
;; Highlight trailing whitespace
(add-hook 'font-lock-mode-hook
 'show-ws-highlight-trailing-whitespace)
;; Highlight non-breaking spaces
(add-hook 'font-lock-mode-hook
 `show-ws-highlight-hard-spaces')

If that approach doesn't work for you, please send me a recipe to reproduce the
problem, starting with `emacs -Q'. I don't use Gnus, so if you can provide a
simpler recipe, that's good.





^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2009-08-21 16:07 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <mailman.4536.1250190656.2239.help-gnu-emacs@gnu.org>
2009-08-13 20:00 ` a emacs mode to see newline, tabs, spaces Teemu Likonen
2009-08-13 19:10 n179911
2009-08-13 19:16 ` Maurizio Vitale
2009-08-14  1:36   ` n179911
2009-08-14  2:05     ` Maurizio Vitale
2009-08-13 20:13 ` Drew Adams
     [not found] ` <mailman.4538.1250194416.2239.help-gnu-emacs@gnu.org>
2009-08-19 11:45   ` Sébastien Vauban
2009-08-21 16:07     ` Drew Adams

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.