unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Giorgos Keramidas <keramida@ceid.upatras.gr>
To: help-gnu-emacs@gnu.org
Subject: Re: making TAB in text major mode just work
Date: Fri, 23 Nov 2007 04:30:06 +0200	[thread overview]
Message-ID: <87wss9vglt.fsf@kobe.laptop> (raw)
In-Reply-To: 16776938-be7b-4c7b-a8ad-b61ba6ac20a2@i29g2000prf.googlegroups.com

On Thu, 22 Nov 2007 12:35:12 -0800 (PST), jwithers <jpwithers@gmail.com> wrote:
> Folks,
>
> In text mode, or in fundamental mode for that matter, if emacs decides
> you are indenting to some point before a tab stop, it helpfully
> decides that you want that indent on following lines. This is a real
> pita when you are doing bullet points, as follows:
>
>         |<-----the first tab stop
> * This is a bullet point
> * This is another bullet point
>
>   This is a paragraph that is now indented incorrectly because emacs
> has decided that my bullet points mean this line should be indented
> two spaces.
>
> I am looking for some way to stop this behavior, so that emacs doesn't
> decide I need smart indentation, [...]

You can bind TAB to `self-insert-command'.  This should do it.

One way of setting this for `text-mode' and its derivatives is:

    (add-hook 'text-mode-hook
              (lambda ()
                (local-set-key (kbd "TAB") 'self-insert-command)))

> And doing a control-q tab isn't really good in my mind. I don't want
> to have to keep remembering to do something different than just type
> when I am in the flow of working.

TAB is equivalent to `C-i' in many terminals.  You can quickly insert a
literal ASCII TAB character by hitting `M-i', or you can use the hook
change shown above... it's all a matter of preference :)

- Giorgos

  reply	other threads:[~2007-11-23  2:30 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-22 20:35 making TAB in text major mode just work jwithers
2007-11-23  2:30 ` Giorgos Keramidas [this message]
2007-11-23 11:37 ` Bastien
     [not found] ` <mailman.3972.1195817873.18990.help-gnu-emacs@gnu.org>
2007-11-23 16:51   ` Mathias Dahl
2007-11-25 23:26     ` Bastien
2007-11-26 15:53 ` Ehud Karni
2007-11-26 18:20   ` Bastien
2007-11-26 21:23     ` Ehud Karni

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=87wss9vglt.fsf@kobe.laptop \
    --to=keramida@ceid.upatras.gr \
    --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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).