10

I am using Emacs 24 for macOS. I'm having some problem with pasting code from clipboard to Emacs. The code that I usually select already is nicely formatted (with tab, indent, ...).

However, when I paste it to Emacs, this redoes the formatting, so it is extremely slow for thousands of lines of code.

Is there a way to paste from clipboard without formatting?

Paulo Tomé
  • 3,754
  • 6
  • 26
  • 38
Think Pl
  • 473
  • 1
  • 5
  • 7

2 Answers2

5

try: c-toggle-syntactic-indentation before your paste.

Momo
  • 745
  • 1
  • 9
  • 17
1

I use clipboard-yank and clipboard-kill-region to interact with the clipboard from inside emacs. I never had indentation problems.

Does the problem persist when you use these two functions?

rahmu
  • 19,673
  • 28
  • 87
  • 128