How to type S-LEFT during the transient mode after C-x <TAB> (indent-rigidly)?

Particularly, I am after this command

C-x <TAB>

This command is used to change the indentation of all lines that begin in the region, moving the affected lines as a rigid unit. If called with no argument, the command activates a transient mode for adjusting the indentation of the affected lines interactively. While this transient mode is active, typing <LEFT> or <RIGHT> indents leftward and rightward, respectively, by one space. You can also type S-<LEFT> or S-<RIGHT> to indent leftward or rightward to the next tab stop (see Tab Stops). Typing any other key disables the transient mode, and resumes normal editing.

In the above example is S - <LEFT> preceded by C- x ?

Particularly, the steps I follow:

  1. Select the text
  2. Type C-X

enter image description here

  1. Type Shift - left arrow (is it indifferent whether to type left or right shift?)

enter image description here

The result is some other window opened, e.g. scratch and no indentation done. The key combination thus obtained is C-x right

enter image description here

  • 2
    Please take some time to work through the tutorial. Type C-h t which means hold down Ctrl while typing h, and then (without Ctrl) type t.
    – phils
    Commented Jul 22, 2018 at 12:08
  • 2
    "In the above example is S - LEFT preceded by C- x ?" -- It's preceded by C-x <TAB>, just like the documentation you've shown tells you.
    – phils
    Commented Jul 22, 2018 at 12:59
  • Also, make sure you're using GUI emacs rather than running it in a terminal, as your terminal most likely can't send shifted arrow sequences.
    – phils
    Commented Jul 22, 2018 at 13:01
  • 1
    @phils, but now I noticed your comment that the combination should be C-x-TAB Shift-leftarrow. That made the successful indentation. That is the answer.
    – Viesturs
    Commented Jul 22, 2018 at 14:00
  • 1
    The manual distinguishes between notation for physical keyboard keys and the (logical) key-sequence notation that Emacs itself uses, in Help. For the keyboard key, the manual writes S-<RIGHT>. For the key sequence Emacs help writes <S-right>. Note the difference in position of the angle brackets and the position of the Shift modifier. And note the overall highlighting, which is shown differently even here, on Stack Exchange. (I can't show the highlighting difference in comments here.) For 99% of your interaction with Emacs you will see only key-sequence notation, not physical-key notation.
    – Drew
    Commented Jul 23, 2018 at 1:42

1 Answer 1


S- means hold down the shift key, <left> is the left-arrow key.

see the manual for details

The complete sequence is:

C-x <TAB> S-<LEFT>

In emacs version 23.1.1 after you press

C-x <TAB>

the indentation of block is made rigidly by one space and you are not prompted to supply S-<LEFT>.

In emacs version 24.5.1 after pressing C-x <TAB> you are prompted to supply arguments:

Indent region with <left>, <right>, <S-left>, or <S-right>.

After typing S-<LEFT> the indentation is done by a TAB and by a space when pressing <LEFT>.

See also C-x-TAB not followed by options

  • @Viesturs Also remember that Shift is (very appropriately) the upper-case S-, so that you don't confuse it with Super (which is lower-case s-.
    – phils
    Commented Jul 22, 2018 at 12:04
  • I am unsuccessful in applying your solution. I explained the problems in the update of my question.
    – Viesturs
    Commented Jul 22, 2018 at 12:41
  • May be you can include in your answer the complete key sequence C-x-TAB S-rightarrow to minimise confustion?
    – Viesturs
    Commented Jul 22, 2018 at 14:43
  • whether or not you're using indent-rigidly, you enter S-<LEFT> the same way
    – Tyler
    Commented Aug 23, 2018 at 20:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.