all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: don provan <dprovan@comcast.net>
To: help-gnu-emacs@gnu.org
Subject: Re: a beginner's emacs troubles
Date: Tue, 31 Jul 2007 09:25:18 -0700	[thread overview]
Message-ID: <u6440bkwh.fsf@comcast.net> (raw)
In-Reply-To: 1185843722.747310.212470@19g2000hsx.googlegroups.com

"f33ldead@gmail.com" <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

  parent reply	other threads:[~2007-07-31 16:25 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-29 22:48 a beginner's emacs troubles f33ldead
2007-07-30  0:08 ` roodwriter
2007-07-30  1:48 ` Daniel Leidisch
2007-07-30  4:10   ` Tyler Smith
2007-07-30  6:18     ` f33ldead
2007-07-30  7:56     ` Daniel Leidisch
2007-07-30  8:30 ` Mathias Häbich
2007-07-30 12:22   ` Tyler Smith
2007-07-31  1:02     ` f33ldead
2007-07-31  6:23       ` Kevin Rodgers
2007-07-31 16:25       ` don provan [this message]
2007-07-31 20:13         ` f33ldead
2007-07-31 22:45           ` Drew Adams
     [not found]           ` <mailman.4175.1185921962.32220.help-gnu-emacs@gnu.org>
2007-08-01  1:41             ` f33ldead
2007-08-01  8:59               ` Alan Mackenzie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=u6440bkwh.fsf@comcast.net \
    --to=dprovan@comcast.net \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.