From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: TriKri Newsgroups: gmane.emacs.help Subject: Re: Indentation settings problems Date: Thu, 1 Oct 2009 15:44:36 -0700 (PDT) Message-ID: <25707803.post@talk.nabble.com> References: <25520490.post@talk.nabble.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1254458332 2092 80.91.229.12 (2 Oct 2009 04:38:52 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 2 Oct 2009 04:38:52 +0000 (UTC) To: Help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Oct 02 06:38:44 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 1MtZul-0001Gs-TI for geh-help-gnu-emacs@m.gmane.org; Fri, 02 Oct 2009 06:38:44 +0200 Original-Received: from localhost ([127.0.0.1]:53326 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MtZul-0007gR-EJ for geh-help-gnu-emacs@m.gmane.org; Fri, 02 Oct 2009 00:38:43 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MtUOA-0004wK-BI for help-gnu-emacs@gnu.org; Thu, 01 Oct 2009 18:44:42 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MtUO6-0004vC-UN for Help-gnu-emacs@gnu.org; Thu, 01 Oct 2009 18:44:42 -0400 Original-Received: from [199.232.76.173] (port=52259 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MtUO6-0004v5-Ok for Help-gnu-emacs@gnu.org; Thu, 01 Oct 2009 18:44:38 -0400 Original-Received: from kuber.nabble.com ([216.139.236.158]:46240) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MtUO6-0007vf-5E for Help-gnu-emacs@gnu.org; Thu, 01 Oct 2009 18:44:38 -0400 Original-Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1MtUO4-0001q7-0N for Help-gnu-emacs@gnu.org; Thu, 01 Oct 2009 15:44:36 -0700 In-Reply-To: <25520490.post@talk.nabble.com> X-Nabble-From: kristoferkrus@hotmail.com X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) X-Mailman-Approved-At: Fri, 02 Oct 2009 00:38:12 -0400 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:68620 Archived-At: TriKri wrote: > > 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 > Hi! I think I maybe have found the way to configure Emacs in the right way. Since I got so happy when I got it to work and I thought I had found the way to do it, I wrote a small article about it which covers how to change the indentation settings: http://setup.wikia.com/wiki/GNU_Emacs http://setup.wikia.com/wiki/GNU_Emacs Since it's a wiki, anybody can change it. Please feel free to contribute; add more stuff you feel is important to know as a beginner (although the article probably could be extended to cover more advanced things as well), and change what you feel is wrong or incorrect. Currently some of the text is written in first-person pronoun, which should be changed too. -- View this message in context: http://www.nabble.com/Indentation-settings-problems-tp25520490p25707803.html Sent from the Emacs - Help mailing list archive at Nabble.com.