help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Indenting paragraphs manually


From: Andrea Crotti
Subject: Re: Indenting paragraphs manually
Date: Sat, 05 Mar 2011 21:26:54 +0100
User-agent: Gnus/5.110014 (No Gnus v0.14) Emacs/24.0.50 (darwin)

Dani Moncayo <dmoncayo@gmail.com> writes:

> Hi!
>
> I'm looking for a simple way of indenting paragraphs manually (in text
> modes), and I've just read this node of the Emacs Manual: (info "(emacs)
> Indentation"). It explains, among other things, the general behavior of
> the <TAB> key in text modes:
>
>       In text modes, <TAB> inserts some combination of space and tab
>    characters to advance point to the next tab stop (*note Tab Stops).
>    If the region is active and spans multiple lines, it advances the first
>    character of each of those lines to the next tab stop (*note Using
>    Region).  [...]
>
>
> I'm used to that behavior in other editors, and I like it, but
> is not what I currently see in Emacs. e.g.:
>  - Start Emacs (emacs -Q)
>  - Set text-mode in the *scratch* buffer. (text-mode).
>  - Set transient-mark-mode on. (transient-mark-mode 1).
>  - Select the first 3 lines.
>  - Type <TAB>
>
> What I was expecting:
>  - The selected lines move to the next tab-stop.
>  - The region remains active, so that I can repeat the indentation
> several times in a row.
>
> What I see:
>  - The selected lines are not not moved at all.
>  - The region is deactivated.
>
> Please, could someone explain this? Am I missing something?  (I guess I
> am, and that's why I'm posting to help-gnu-emacs instead of
> bug-gnu-emacs)
>
> TIA
>
> ---
> Dani Moncayo
>
> In GNU Emacs 24.0.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.22.0)
>  of 2011-02-26 on dani-P5PL2
> Windowing system distributor `The X.Org Foundation', version 11.0.10900000

So you're misunderstanding the use of TAB in this case.
TAB indents, but "smartly", so it actually never really inserts a tab
(apart maybe some modes where this is the good thing to do)

What you want to do can be done with rectangle mode, so
- select the region you want
- C-x r t RET TAB
and you're done



reply via email to

[Prev in Thread] Current Thread [Next in Thread]