From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Bernardo Newsgroups: gmane.emacs.help Subject: Re: Indentation settings problems Date: Sun, 20 Sep 2009 11:55:13 +1000 Message-ID: <4AB58B81.7060806@pobox.com> References: <25520490.post@talk.nabble.com> Reply-To: bernardo.bacic@pobox.com 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 1253411786 25594 80.91.229.12 (20 Sep 2009 01:56:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 20 Sep 2009 01:56:26 +0000 (UTC) Cc: Help-gnu-emacs@gnu.org To: TriKri Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Sep 20 03:56:19 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 1MpBey-0000pC-Vi for geh-help-gnu-emacs@m.gmane.org; Sun, 20 Sep 2009 03:56:17 +0200 Original-Received: from localhost ([127.0.0.1]:41510 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MpBey-0006xE-FZ for geh-help-gnu-emacs@m.gmane.org; Sat, 19 Sep 2009 21:56:16 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MpBed-0006vM-5g for help-gnu-emacs@gnu.org; Sat, 19 Sep 2009 21:55:55 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MpBeY-0006rZ-Hb for Help-gnu-emacs@gnu.org; Sat, 19 Sep 2009 21:55:54 -0400 Original-Received: from [199.232.76.173] (port=49786 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MpBeY-0006rW-Cx for Help-gnu-emacs@gnu.org; Sat, 19 Sep 2009 21:55:50 -0400 Original-Received: from a-pb-sasl-quonix.pobox.com ([208.72.237.25]:43289 helo=sasl.smtp.pobox.com) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MpBeY-00080y-08 for Help-gnu-emacs@gnu.org; Sat, 19 Sep 2009 21:55:50 -0400 Original-Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-quonix.pobox.com (Postfix) with ESMTP id 829AB398CB; Sat, 19 Sep 2009 21:55:49 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=message-id :date:from:reply-to:mime-version:to:cc:subject:references :in-reply-to:content-type:content-transfer-encoding; s=sasl; bh= iR37qKIb6P4lrHZGXyl+J646pcg=; b=YXK08FhU5K1bdFEzNni09kxxVkqaJXmf ILHhHIX16g+X4MNDmXDbnnIpT6hJvQUGVIp3edSHUnA09oQ4ol0fio1bABFmAFPs QupjbUUFQ3FBxi4f+VqekHfkdG/91nceisc6kDqaFDjJCrri+Pn+EZE5FxgHwNc5 fsar858UVVA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=message-id:date :from:reply-to:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; q=dns; s=sasl; b=MGddTI 2RndiGt5HNQ+KreWgpYOPSdXwOroaxzTJdC9tMFzI92mLADy3EVvxmXvq7BTmh0R 2rfjOtrc4qzMTEdKSGhLDLXYlOVmURdQM9zvQJ9kK4Ey/gS7XDhWB6BEp3A3oly1 2YjeB8oeUA7xkh3ojxTTGDnFM/bOCaHRKHpqg= Original-Received: from a-pb-sasl-quonix. (unknown [127.0.0.1]) by a-pb-sasl-quonix.pobox.com (Postfix) with ESMTP id 714BE398C9; Sat, 19 Sep 2009 21:55:48 -0400 (EDT) Original-Received: from [192.168.1.10] (unknown [115.70.111.33]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by a-pb-sasl-quonix.pobox.com (Postfix) with ESMTPSA id 87236398C7; Sat, 19 Sep 2009 21:55:46 -0400 (EDT) User-Agent: Thunderbird 2.0.0.23 (X11/20090812) In-Reply-To: <25520490.post@talk.nabble.com> X-Pobox-Relay-ID: B7BC1F90-A588-11DE-868A-A13518FFA523-14340206!a-pb-sasl-quonix.pobox.com X-detected-operating-system: by monty-python.gnu.org: Solaris 10 (beta) 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:68314 Archived-At: TriKri said the following on 19/09/09 20:46: > Hi. I'm having some trouble getting the size of the indentation right. I'm > writing a .cpp-file, but I guess the indentation will work in about the same > way as for a .c-file. I'm running windows (more specifically windows 7), and > I've just installed GNU Emacs 23.1.1. The indentation is 2 spaces right now. > I prefer a tab instead (with tab width 4), or possibly 4 spaces if tab is > not possible. Here is what I've tried: I enter the options, go to > Editing->Indent, where I find that the variable "Standard Indent" is set to > 4. I get 2 spaces when I indent, why not 4? Okay I get 2 spaces, so how do I > change it? I have also tried changing "C Basic Offset" in > Programming->Languages->C to "Override style settings: 4", but that doesn't > work either. It's still indenting with 2 spaces. > > So, I would prefer 4 spaces instead of 2, or even better, a tab, and having > the tab width set to 4 (how I now can change the tab width) so someone else > with another text editor can apply another indentation size on my code by > simply setting the tab width in their editor. Can someone tell me how to > change this? And I'm an Emacs newbie, so you will have to tell me exactly > which variables to change and how to change them. > > Thanks in advance > > -Kristofer er, don't know about the menus - i never use them and have them turned off, but the following in your .emacs should work: (setq-default tab-width 4 indent-tabs-mode t) you could quickly evaluate it with C-x C-e to see its effect