From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: roodwriter@ureach.com Newsgroups: gmane.emacs.help Subject: Re: Need a simple text mode Date: 06 Dec 2006 12:46:50 -0500 Organization: Linux Private Site Message-ID: <878xhkdiid.fsf@linux.site> References: NNTP-Posting-Host: dough.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1165430441 24153 80.91.229.10 (6 Dec 2006 18:40:41 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 6 Dec 2006 18:40:41 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Dec 06 19:40:36 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by dough.gmane.org with esmtp (Exim 4.50) id 1Gs1h2-0002Gx-H1 for geh-help-gnu-emacs@m.gmane.org; Wed, 06 Dec 2006 19:40:32 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Gs1h2-0007fK-0y for geh-help-gnu-emacs@m.gmane.org; Wed, 06 Dec 2006 13:40:32 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!headwall.stanford.edu!newsfeed.news2me.com!nx01.iad01.newshosting.com!newshosting.com!69.28.186.77.MISMATCH!hwmnpeer03.lga!hwmnpeer01.lga!news.highwinds-media.com!hw-filter.lga!newsfe06.lga.POSTED!53ab2750!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 64 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 Original-X-Trace: lalincmlnekeejjfkannfilpcpbbolnmmdibjlolgmlpcfjeobfcfdnkbaibnpeiekkmcbdohellgiadkffnillbfjhenoekffjdlppccacmcfebaleknnmjeokkdjmphgindeflifgphkdl Original-NNTP-Posting-Date: Wed, 06 Dec 2006 10:47:09 MST Original-Xref: shelby.stanford.edu gnu.emacs.help:143688 Original-To: help-gnu-emacs@gnu.org 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:39290 Archived-At: hemant writes: > Hi, > > I wanted a simple text mode, in which all the newlines should be > started at the previous indentation level and If i want to change the > indentation level from any given line I would press key, which > would insert 2 spaces from the current indentation level and indent > the line. > > > Many would claim, this is already the behaviour, but its not so. If I > press TAB sometimes I get indentation width of 2 or 4 or 8 spaces. > Even though I have set tab-stop variable to: > > 2 4 6 8 10 .... > > So for setting up uniform indentation of 2 spaces in text mode, I did: > > (define-key text-mode-map [tab] (lambda > () (interactive) (insert " "))) > > I guess, you would agree this is not the solution. > > Any help? > > > -- > There was only one Road; that it was like a great river: its springs > were at every doorstep, and every path was its tributary. > > You can get a text tab with M-i, C-q C-i or C-q tab. Not convenient, I know, but the default tab is apparently set for programmers, not writers, who like variable indents. You, of course, can define your tab any way you like. I one time tried changing the keybinding on my tab key to M-i but found that some commands (maybe some macros, don't remember) then wouldn't work correctly. Your tabs will work the way you think they will if you write things unfilled, since the tab takes its cue from the first word in the previous line. But writing unfilled isn't as nice for most of us. Another way, which I favor, is to write only in block paragraphs, which is what you're seeing here, and use longlines.el. It's nothing to set up a permanent macro to convert the empty newline (or two newlines in a row) to a tab when you're done. I find writing without tabs faster and you're less prone to accidentally hitting the caps lock AND GETTING A LOT OF TEXT LIKE THIS. If you want the full tabbed-paragraph experience, though, use longlines.el with M-x paragraph-indent-text-mode. You'll still have to M-i etc. though. Hope this was what you were looking for. --Rod ______________________ Author of "Linux for Non-Geeks--Clear-eyed Answers for Practical Consumers" and "Boring Stories from Uncle Rod." To reply by e-mail take the second "o" out of the e-mail address.