From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Pascal Bourguignon Newsgroups: gmane.emacs.help Subject: Re: Substiotution of tabs with spaces... Date: 15 Apr 2005 15:15:01 +0200 Organization: [posted via Easynet Spain] Message-ID: <87is2o9o6i.fsf@thalassa.informatimago.com> References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1113571925 18072 80.91.229.2 (15 Apr 2005 13:32:05 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 15 Apr 2005 13:32:05 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Apr 15 15:32:01 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DMQtr-0001Hr-JR for geh-help-gnu-emacs@m.gmane.org; Fri, 15 Apr 2005 15:30:23 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DMQxM-00012v-S5 for geh-help-gnu-emacs@m.gmane.org; Fri, 15 Apr 2005 09:34:00 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!newsfeed.news.ucla.edu!canoe.uoregon.edu!newshub.sdsu.edu!npeer.de.kpn-eurorings.net!news.rh-tec.net!newsfeed.freenet.de!feed.news.tiscali.de!easynet-monga!easynet.net!easynet-post2!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 Original-Lines: 33 Original-NNTP-Posting-Host: 62.93.174.79 Original-X-Trace: DXC=1DXIn78G6l[Ge5DFM`XO4V7]>Uh List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:25714 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:25714 Peter Dyballa 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.