0

I am after the key-binding C-x-TAB S-rightarrow to indent each line in a block by a TAB see - https://www.gnu.org/software/emacs/manual/html_node/emacs/Indentation-Commands.html.

I always open emacs in the -nw mode. On my local computer (Emacs 24.5.1) when I press C-x-TAB I am asked for the arguments to this command:

enter image description here

but on a remote computer (Emacs 24.3.1) the arguments are not asked for and indentation is done immediately with a space.

The goal is to have indentation with a TAB. What is going wrong on the remote computer and how to fix?

4

a remote computer (Emacs 24.3.1) the arguments are not asked for and indentation is done immediately with a space.

The goal is to have indentation with a TAB. What is going wrong on the remote computer and how to fix?

Upgrade Emacs on the remote compute to 24.4 or better, see etc/NEWS (f1 n):

* Editing Changes in Emacs 24.4

*** The behavior of `C-x TAB' (`indent-rigidly') has changed.
When invoked without a prefix argument, it now activates a transient
mode in which typing <left>, <right>, <S-left>, and <S-right> adjusts
the text indentation in the region.  Typing any other key resumes
normal editing behavior.

Alternatively, try backporting these patches (I picked these out with git log --grep=indent-rigidly, I'm not 100% sure these are only applicable ones):

  • 2
    I'd suggest strongly that the OP should not try to apply the individual patches. Upgrading emacs is a much safer option (of course, the OP might not have rights to update emacs on the remote machine, but in that case, he/she would probably not have rights to apply patches either). – NickD Jul 22 '18 at 20:49
  • @NickD "probably not have rights to apply patches" - you could apply the patches to a copy of indent.el, and then load the patched indent.el in your config. Doesn't sound too dangerous to me: if it doesn't work, throw away the patched indent.el, no harm done. – npostavs Jul 22 '18 at 21:04
  • it wouldn't be too dangerous to you, but OP is having trouble with basic directions from the manual. Given the confusion expressed in several questions posted in quick succession, over-writing built-in functions in their config is likely to create more problems – Tyler Jul 23 '18 at 2:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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