From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Colin S. Miller" Newsgroups: gmane.emacs.help Subject: Re: How to avoid SPACE TAB in a file? Date: Wed, 25 Nov 2009 20:04:11 +0000 Organization: SunSITE.dk - Supporting Open source Message-ID: <4b0d8da3$0$269$14726298@news.sunsite.dk> References: <2009Nov25.202543@mips.complang.tuwien.ac.at> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1259183082 29124 80.91.229.12 (25 Nov 2009 21:04:42 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 25 Nov 2009 21:04:42 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Nov 25 22:04:35 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1NDP2Q-0003mE-Ed for geh-help-gnu-emacs@m.gmane.org; Wed, 25 Nov 2009 22:04:34 +0100 Original-Received: from localhost ([127.0.0.1]:38190 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NDP2Q-0005E0-4G for geh-help-gnu-emacs@m.gmane.org; Wed, 25 Nov 2009 16:04:34 -0500 Original-Path: news.stanford.edu!usenet.stanford.edu!goblin2!goblin.stu.neva.ru!news.net.uni-c.dk!dotsrc.org!filter.dotsrc.org!news.dotsrc.org!not-for-mail User-Agent: Mozilla-Thunderbird 2.0.0.22 (X11/20090706) Original-Newsgroups: gnu.emacs.help In-Reply-To: <2009Nov25.202543@mips.complang.tuwien.ac.at> Original-Lines: 27 Original-NNTP-Posting-Host: 62.56.51.242 Original-X-Trace: news.sunsite.dk DXC=XD; lo[aNL>5N=S_a\VX>h; YSB=nbEKnk; n1=X\QLeN535fdD?L8VmB8OOn[7LY1L_5QScK68eBi57; QNS\SSPXn7=`B>8HMEID8BbE\ZcHPZ64gM2=<32dg]> Original-X-Complaints-To: staff@sunsite.dk Original-Xref: news.stanford.edu gnu.emacs.help:175055 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:70127 Archived-At: Ulrich Neumerkel wrote: > It occurs to me occasionally that I happen to write SPACE TAB in a buffer > saved into a file. This is mostly when I edit files with different > tabbing conventions. > > Is there are general clean minor-mode or other way to avoid writing > this combination in general? Hi Ulrich, If you want emacs to always insert spaces instead of tabs then you can put (setq indent-tabs-mode nil) in your .emacs. This needs to be set for each buffer, so it should be put in a hook like (add-hook 'c-mode-hook '(lambda () (setq indent-tabs-mode nil))) You'll need to replace 'c-mode-hook with the correct hook for the editing mode you use. Most of them are named after the mode's main function. HTH, Colin S. Miller -- Replace the obvious in my email address with the first three letters of the hostname to reply.