From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "oliver.g.charles@googlemail.com" Newsgroups: gmane.emacs.help Subject: Re: Plain text indentation problem Date: Mon, 14 Jan 2008 08:46:31 -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 1200343966 14319 80.91.229.12 (14 Jan 2008 20:52:46 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 14 Jan 2008 20:52:46 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Jan 14 21:53:06 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 1JEWIs-0007by-8r for geh-help-gnu-emacs@m.gmane.org; Mon, 14 Jan 2008 21:53:06 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JEWIU-0000jX-3U for geh-help-gnu-emacs@m.gmane.org; Mon, 14 Jan 2008 15:52:42 -0500 Original-Path: shelby.stanford.edu!headwall.stanford.edu!newshub.sdsu.edu!postnews.google.com!j78g2000hsd.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 33 Original-NNTP-Posting-Host: 194.80.32.9 Original-X-Trace: posting.google.com 1200329192 19400 127.0.0.1 (14 Jan 2008 16:46:32 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Mon, 14 Jan 2008 16:46:32 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: j78g2000hsd.googlegroups.com; posting-host=194.80.32.9; posting-account=NIvSNQoAAABjbJg94MhSuWZT55OotKBM User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3,gzip(gfe),gzip(gfe) X-HTTP-Via: 1.1 wwwcache1.lancs.ac.uk:8080 (squid/2.6.STABLE16) Original-Xref: shelby.stanford.edu gnu.emacs.help:155297 X-Mailman-Approved-At: Mon, 14 Jan 2008 15:51:40 -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:50712 Archived-At: > 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