Emacs started adding extra tabs when I insert them in OS X

This always worked fine, but all of a sudden, when I paste emacs from another place on OS X (using cmd-c cmd-v), I get a bunch of extra spaces / tabs. For example, I have the following YML:

- name: something hosts: some_host gather_facts: False tasks: - name: do something some_module: group: something 

When I copy this and then paste it into emacs, it is unexpectedly formatted:

 - name: something hosts: some_host gather_facts: False tasks: - name: do something some_module: group: something 

It looks like it doubles the number of spaces in each line. I tried this in both barley mode and main mode. Everything works well. What gives?

+6
source share
1 answer

Well, this is very strange. It seems like this was because I upgraded emacs to 24.4 (I was updating a lot of stuff through homebrew and didn't notice). It turns out that this is somehow possible "feature", although, how far from me. You can disable it by adding (electric-indent-mode 0) to your .emacs. More details here .

+9
source

Source: https://habr.com/ru/post/980417/


All Articles