From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Francis Moreau Newsgroups: gmane.emacs.help Subject: Re: Tabs and Spaces Date: Tue, 26 May 2009 05:29:59 -0700 (PDT) Organization: http://groups.google.com Message-ID: <8ee3e6a7-3251-44bd-a3a9-3c5ba707ca38@f16g2000vbf.googlegroups.com> References: <77vbbiF1jhhubU1@mid.individual.net> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1243341897 7976 80.91.229.12 (26 May 2009 12:44:57 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 26 May 2009 12:44:57 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue May 26 14:44:51 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 1M8w1S-0007nE-Hs for geh-help-gnu-emacs@m.gmane.org; Tue, 26 May 2009 14:44:50 +0200 Original-Received: from localhost ([127.0.0.1]:40317 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M8w1S-0004Xj-1w for geh-help-gnu-emacs@m.gmane.org; Tue, 26 May 2009 08:44:50 -0400 Original-Path: news.stanford.edu!newsfeed.stanford.edu!postnews.google.com!f16g2000vbf.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 38 Original-NNTP-Posting-Host: 82.235.205.153 Original-X-Trace: posting.google.com 1243340999 29689 127.0.0.1 (26 May 2009 12:29:59 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Tue, 26 May 2009 12:29:59 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: f16g2000vbf.googlegroups.com; posting-host=82.235.205.153; posting-account=ekTE0goAAADiVCThPmo4ph0C5bTUhQOx User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.0.10) Gecko/2009042708 Fedora/3.0.10-1.fc10 Firefox/3.0.10, gzip(gfe), gzip(gfe) Original-Xref: news.stanford.edu gnu.emacs.help:169495 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:64723 Archived-At: On 25 mai, 18:15, B Smith-Mannschott wrote: > On Mon, May 25, 2009 at 12:48, Chris Gordon-Smith > > > > wrote: > > Hello All > > > I have recenly started using emacs for programming, after years using > > KDevelop. One problem I have is indenting code. I have my own indentation > > style. and ideally I would like to setup emacs to support it automatically. > > However, in the short term I'll settle for having emacs convert a TAB > > keypress into the correct number of spaces to fill whitespace up to the > > next tabstop. > > > At the moment I have > > > (global-set-key (kbd "TAB") 'self-insert-command) > > > in my .emacs to force insertion of a tab, but I have to keep invoking > > untabify manually (otherwise my code looks misaligned when I upload it to > > Google Code). > > > Can anyone help. > > Parital solution: > > By default, emacs has a nasty habit of indenting with a mix of tabs > and spaces. I agree. > you can disable this by setting indent-tabs-mode to nil. > You can do this via M-x customize-apropos or by sprinkling this bit of > elisp into your .emacs: But what should be done if instead I want to keep tabs but don't want to keep the alignment (silly) thing ?