11

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?

2 Answers 2

5

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

1
  • Alt-X c-toggle-syntactic-indentation This only works for one paste.
    – the
    Commented Jun 18, 2018 at 5:58
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?

1
  • Yes, the problem persists for me: emacs 24, OSX 10.10. Commented Jan 6, 2015 at 5:40

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .