From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.help Subject: Re: Substiotution of tabs with spaces... Date: Fri, 15 Apr 2005 19:55:42 +0000 Organization: muc.de e.V. -- private internet access Message-ID: References: NNTP-Posting-Host: main.gmane.org X-Trace: sea.gmane.org 1113666126 20410 80.91.229.2 (16 Apr 2005 15:42:06 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 16 Apr 2005 15:42:06 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Apr 16 17:42:01 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DMpQW-0005ul-UK for geh-help-gnu-emacs@m.gmane.org; Sat, 16 Apr 2005 17:41:45 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DMpUG-0004zy-2U for geh-help-gnu-emacs@m.gmane.org; Sat, 16 Apr 2005 11:45:36 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!newsmi-us.news.garr.it!newsmi-eu.news.garr.it!NewsITBone-GARR!irazu.switch.ch!switch.ch!news.belwue.de!informatik.tu-muenchen.de!news.muc.de!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 33 Original-NNTP-Posting-Host: acm.muc.de Original-X-Trace: marvin.muc.de 1113665461 81881 193.149.49.134 (16 Apr 2005 15:31:01 GMT) Original-X-Complaints-To: news-admin@muc.de Original-NNTP-Posting-Date: 16 Apr 2005 15:31:01 GMT User-Agent: tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (Linux/2.0.35 (i686)) Original-Xref: shelby.stanford.edu gnu.emacs.help:130184 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor 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:25752 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:25752 luca.spinacci@seleniacomms.com wrote on Fri, 15 Apr 2005 11:06:02 +0200: > Hi, > is there a smart way to replace all tabs with 3 spaces in a buffer edited > in c-mode > (both comments and code lines) Yes, but that might not be what you really want. Assuming you've got tab-width set to 3, a tab extends to the next column which is a multiple of 3. So if you had this in a buffer ab it would look like this: a b If you replaced the tab with three spaces, you'd end up with this a b. I suggest you do this: C-x h (to mark the entire buffer) followed by M-x untabify. > Thank you very much. And the best of luck! -- Alan Mackenzie (Munich, Germany) Email: aacm@muuc.dee; to decode, wherever there is a repeated letter (like "aa"), remove half of them (leaving, say, "a").