[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 587efce9fae 1/2: Autodetect coding system when yanking media
|
From: |
Robert Pluim |
|
Subject: |
master 587efce9fae 1/2: Autodetect coding system when yanking media |
|
Date: |
Thu, 13 Jul 2023 09:38:30 -0400 (EDT) |
branch: master
commit 587efce9faeb1a0b23b8367c02264a6f988832d0
Author: Robert Pluim <rpluim@gmail.com>
Commit: Robert Pluim <rpluim@gmail.com>
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'.
---
lisp/yank-media.el | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lisp/yank-media.el b/lisp/yank-media.el
index 3e33c1f9994..abc137d9c38 100644
--- a/lisp/yank-media.el
+++ b/lisp/yank-media.el
@@ -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)))