From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: mccormick.bob@gmail.com Newsgroups: gmane.emacs.help Subject: Re: Plain text indentation problem Date: Mon, 14 Jan 2008 14:51:26 -0800 (PST) Organization: http://groups.google.com Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1200368274 19941 80.91.229.12 (15 Jan 2008 03:37:54 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 15 Jan 2008 03:37:54 +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 Jan 15 04:38:16 2008 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 1JEccx-00015Z-1x for geh-help-gnu-emacs@m.gmane.org; Tue, 15 Jan 2008 04:38:15 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JEccY-0004lT-La for geh-help-gnu-emacs@m.gmane.org; Mon, 14 Jan 2008 22:37:50 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!postnews.google.com!e25g2000prg.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 42 Original-NNTP-Posting-Host: 24.9.163.205 Original-X-Trace: posting.google.com 1200351086 21693 127.0.0.1 (14 Jan 2008 22:51:26 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Mon, 14 Jan 2008 22:51:26 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: e25g2000prg.googlegroups.com; posting-host=24.9.163.205; posting-account=2QmtOAoAAAD6drnKnc5Ky9fI7oS10V1t User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.4) Gecko/20070515 Firefox/2.0.0.4,gzip(gfe),gzip(gfe) X-HTTP-Via: 1.1 dvr:3128 (squid/2.6.STABLE1) Original-Xref: shelby.stanford.edu gnu.emacs.help:155306 X-Mailman-Approved-At: Mon, 14 Jan 2008 22:36:10 -0500 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:50723 Archived-At: On Jan 14, 9:46 am, "oliver.g.char...@googlemail.com" wrote: > > 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, , 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 Honestly I'm still undecided whether I like rspec stories or not. I agree it could be fun to write a major mode for rspec stories, but only if I do decide to continue using rspec. But really I was primarily posting because I confused about the odd indentation behavior in text mode. I still can't figure out why that would *be* the behavior. :-(