help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Substiotution of tabs with spaces...


From: Pascal Bourguignon
Subject: Re: Substiotution of tabs with spaces...
Date: 15 Apr 2005 15:15:01 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3

Peter Dyballa <Peter_Dyballa@Web.DE> writes:

> Am 15.04.2005 um 11:06 schrieb luca.spinacci@seleniacomms.com:
> 
> > is there a smart way to replace all tabs with 3 spaces in a buffer
> > edited
> >
> 
> How about: replace-regexp RET TAB + RET SPC SPC SPC RET ?
> Or: replace-string RET TAB RET SPC SPC SPC RET ?

It's not satisfactory.  For example, try it on:

(progn
    (find-file "/tmp/exemple")
    (erase-buffer)
    (insert "\n\ta\ta\n\taa\taa\n\taaa\taaa\n"))


Also, with my emacs configuration, 
M-x replace-string RET TAB
tries to substitute a string of four spaces, not one tabulation.

Try:

 M-x replace-regexp RET C-q TAB + RET SPC SPC SPC RET 
 M-x replace-string RET C-q TAB RET SPC SPC SPC RET 

-- 
__Pascal Bourguignon__                     http://www.informatimago.com/
You never feed me.
Perhaps I'll sleep on your face.
That will sure show you.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]