all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "oliver.g.charles@googlemail.com" <oliver.g.charles@googlemail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: Plain text indentation problem
Date: Mon, 14 Jan 2008 08:46:31 -0800 (PST)	[thread overview]
Message-ID: <c2173c3a-d27e-41fd-985b-f305128de56d@j78g2000hsd.googlegroups.com> (raw)
In-Reply-To: d7b9efcf-ed4f-468e-b2ea-063eeed0f1ad@d21g2000prf.googlegroups.com


> The problem is, when I get to the second "Scenario" line that needs to
> be indented less than the line before it.  Emacs automatically indents
> it the same as the previous line (which I'd expect), but what's the
> best way to get the line back to the same indentation as the previous
> line?  I've been doing M-b's until I get to the beginning of the first
> word ("Scenario"), then backspacing.  The problem is if I backspace
> back to the beginning of the line, then hit tab again, emacs indents
> the line in one space more than the first "Scenario" line.   In other
> words, it looks kind of like this:
>
> ** SNIP **
>
> Any ideas what I'm doing wrong?  Is there an easier way to move a line
> back one TAB width?
>
> (BTW.. For anyone whose interested, the file format in question is for
> the Ruby Rspec Story Runner tool)

Well, the simple answer I can think of would be to write your own lisp
function (or a keyboard macro) that would do the equivlient of C-a, C-
f, <DEL>, C-e. Alternativly, you could store the location of the point
and then jump back to that instead of the end of the line.

However, I think a much more elegant and useful solution would be to
write your own major mode for ruby rspec stories. More information on
doing this can be found at [1], you are most likely most interested in
[2].

Hope this helps :)

[1]: http://two-wugs.net/emacs/mode-tutorial.html
[2]: http://two-wugs.net/emacs/mode-tutorial.html#indent

  reply	other threads:[~2008-01-14 16:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-14  5:17 Plain text indentation problem mccormick.bob
2008-01-14 16:46 ` oliver.g.charles [this message]
2008-01-14 22:51   ` mccormick.bob

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=c2173c3a-d27e-41fd-985b-f305128de56d@j78g2000hsd.googlegroups.com \
    --to=oliver.g.charles@googlemail.com \
    --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.