about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorCase Duckworth2021-04-19 12:32:21 -0500
committerCase Duckworth2021-04-19 12:32:21 -0500
commit6e6f95570bf255794292d50a7be005db2944de5b (patch)
tree222ac1281c7be1f1844e308c362cc305d4250da0
parentFix `:mode' keyword in `setup' (diff)
downloademacs-6e6f95570bf255794292d50a7be005db2944de5b.tar.gz
emacs-6e6f95570bf255794292d50a7be005db2944de5b.zip
Fix clipboard pasting non-ASCII characters
... at least on Windows.

Solution found here:
https://emacs.stackexchange.com/questions/22727/pasting-text-from-clipboard-why-m-instead-of-linebreaks

Other resources:
https://emacs.stackexchange.com/questions/22727/pasting-text-from-clipboard-why-m-instead-of-linebreaks
https://goyoambrosio.com/2018/06/Dealing-with-utf-8-in-Emacs/
-rw-r--r--init.el9
1 files changed, 7 insertions, 2 deletions
diff --git a/init.el b/init.el index febe047..d7829c3 100644 --- a/init.el +++ b/init.el
@@ -105,7 +105,7 @@
105 (delete-selection-mode +1) 105 (delete-selection-mode +1)
106 106
107 ;; Encoding 107 ;; Encoding
108 (:option local-coding-system 'utf-8-unix 108 (:option locale-coding-system 'utf-8-unix
109 coding-system-for-read 'utf-8-unix 109 coding-system-for-read 'utf-8-unix
110 coding-system-for-write 'utf-8-unix 110 coding-system-for-write 'utf-8-unix
111 buffer-file-coding-system 'utf-8-unix 111 buffer-file-coding-system 'utf-8-unix
@@ -121,8 +121,13 @@
121 (set-default-coding-systems 'utf-8-unix) 121 (set-default-coding-systems 'utf-8-unix)
122 (set-terminal-coding-system 'utf-8-unix) 122 (set-terminal-coding-system 'utf-8-unix)
123 (set-keyboard-coding-system 'utf-8-unix) 123 (set-keyboard-coding-system 'utf-8-unix)
124 (set-selection-coding-system 'utf-8-unix)
125 124
125 (pcase acdw/system
126 (:work (set-clipboard-coding-system 'utf-16-le)
127 (set-selection-coding-system 'utf-16-le))
128 (_ (set-selection-coding-system 'utf-8)
129 (set-clipboard-coding-system 'utf-8)))
130
126 ;; Cursor 131 ;; Cursor
127 (:option cursor-type 'bar 132 (:option cursor-type 'bar
128 cursor-in-non-selected-windows 'hollow 133 cursor-in-non-selected-windows 'hollow