Autodetect coding system when yanking media
Some browers send eg 'text/html' selections formatted as UTF-8, but with a type of STRING, which actually means iso-latin-1. Autodetect the correct coding system to use by calling 'gui-get-selection'. * lisp/yank-media.el (yank-media--get-selection): Call 'gui-get-selection' instead of 'gui-backend-get-selection'.
This commit is contained in:
parent
e0244f5804
commit
587efce9fa
1 changed files with 1 additions and 1 deletions
|
@ -81,7 +81,7 @@ all the different selection types."
|
|||
(gui-get-selection 'CLIPBOARD 'TARGETS)))
|
||||
|
||||
(defun yank-media--get-selection (data-type)
|
||||
(when-let ((data (gui-backend-get-selection 'CLIPBOARD data-type)))
|
||||
(when-let ((data (gui-get-selection 'CLIPBOARD data-type)))
|
||||
(if (string-match-p "\\`text/" (symbol-name data-type))
|
||||
(yank-media-types--format data-type data)
|
||||
data)))
|
||||
|
|
Loading…
Add table
Reference in a new issue