From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: don provan Newsgroups: gmane.emacs.help Subject: Re: a beginner's emacs troubles Date: Tue, 31 Jul 2007 09:25:18 -0700 Message-ID: References: <1185749317.489626.226270@22g2000hsm.googlegroups.com> <1185843722.747310.212470@19g2000hsx.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1185900041 20015 80.91.229.12 (31 Jul 2007 16:40:41 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 31 Jul 2007 16:40:41 +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 Jul 31 18:40:33 2007 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 1IFult-0000DA-4u for geh-help-gnu-emacs@m.gmane.org; Tue, 31 Jul 2007 18:40:33 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IFuls-00059n-LH for geh-help-gnu-emacs@m.gmane.org; Tue, 31 Jul 2007 12:40:32 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!postnews.google.com!news1.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local01.nntp.dca.giganews.com!nntp.comcast.com!news.comcast.com.POSTED!not-for-mail Original-NNTP-Posting-Date: Tue, 31 Jul 2007 11:22:55 -0500 Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (windows-nt) Cancel-Lock: sha1:8C1h9zoiwQVR+66Y3QbxVZkgnX4= Original-Lines: 47 X-Usenet-Provider: http://www.giganews.com Original-NNTP-Posting-Host: 24.5.238.23 Original-X-Trace: sv3-0XAmncnRjDQpxOcz8DyHYo62mqKSWzl9ZwR7yuOWY02MWzple3TYbSDO8l7LnNMR+Imf0VuXHzfQvEQ!kTMSO2bX5U2aVtMoA1wEYbeMY9iGgajxXMeaR2I5bhGRW8R+WDOyfjQhrv1/76GdKk9h7LiTlP6l!wg== Original-X-Complaints-To: abuse@comcast.net X-DMCA-Complaints-To: dmca@comcast.net X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.35 Original-Xref: shelby.stanford.edu gnu.emacs.help:150651 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:46229 Archived-At: "f33ldead@gmail.com" writes: > I have something similar: > > #define SOMETHING 0x43 > #define SOMETHING_ELSE 0x12 > #define ANYWAY 0x56 > > I need tabs between the defined term and it's value so that it'll be > indented nicely. And I just can't do it. That's what I was actually > referring to. I think it's a bad idea to decide where tabs _can_ to > for an editor. Yes, perfectly reasonable, but for some reason not the default behavior. You're looking for (setq c-tab-always-indent nil) This keeps tab performing the indentation feature you've been hearing about when it's typed near the beginning of the line, but it inserts a normal tab when typed in the middle of a line. Also, it sounds like you'll want to hear that meta-I by default is mapped to "tab-to-tab-stop" (i.e., what you expect tab to do), so you might want to try playing around with the tab key set to the indentation function and getting in the habit of using meta-I when you really want a tab. (It turns out that there's actually a emacs extension you can track down that solves this problem explicitly, allowing you to line up columns like this neatly on command. Alas, I've never felt the need to try them, so I can't tell you what they are.) Similarly, you mapped the enter key to newline-and-indent, but you might be interested to know that control-J is naturally mapped to that function. You might want to try leaving enter for the natrual character the unindented newline and get used to using ^J for the function you expected on Enter. You can customize emacs all you want, of course, but I find it easier to stick to the default mappings even when they aren't always on the keys I expect them to be on. I do this for several reasons, but the most convincing is that when I stick to the default mappings, 9 times out of 10 I discover that there is, in fact, some advantage to the way the keys are mapped out of the box. -don provan