2

I'm trying to paste accented characters (eg: á, é, í) into Emacs but here's what I get:

accents pasted into emacs
When I paste into some other editor, like Vim, it works fine. I already tried putting this in my init.el

(setq utf-translate-cjk-mode nil)
(set-language-environment 'utf-8)
(set-keyboard-coding-system 'utf-8-unix)
(setq locale-coding-system 'utf-8)
(set-default-coding-systems 'utf-8)
(set-terminal-coding-system 'utf-8)
(set-selection-coding-system 'utf-8)
(prefer-coding-system 'utf-8)
(set-clipboard-coding-system 'utf-8)
(setq x-select-request-type '(UTF8_STRING COMPOUND_TEXT TEXT STRING))

but didn't seem to help. Any ideas?

EDIT: Forgot to mention, my OS is Arch Linux and the system encoding is also UTF-8.

EDIT2: Firstly I thought this was an encoding problem, but I found it's actually related to evil-mode. This only happens when I'm using "+p of evil

6
  • The only other thing I have is: (setq-default buffer-file-coding-system 'utf-8-unix) I also use: (add-to-list 'file-coding-system-alist '("\\.tex" . utf-8-unix) ) for each file extension that I normally use.
    – lawlist
    Aug 27, 2014 at 4:01
  • 2
    Please give some details of how you copy&paste. E.g. are you running inside a terminal emulator?
    – Stefan
    Aug 27, 2014 at 5:13
  • @Stefan I found out it's related to evil mode. Emacs C-y pastes normal, the problem seems to be in "+p of evil. I'll add this to my question
    – Jesse
    Aug 29, 2014 at 17:18
  • What about pasting into X-enabled emacs with the middle mouse button click? It bugs me big time, although pasting with C-y is fine. Feb 6, 2015 at 1:47
  • Possible duplicate of Emacs encoding of pasted text
    – rofrol
    Aug 2, 2018 at 18:37

0

Your Answer

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

Browse other questions tagged or ask your own question.