[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master fcb4d836f0: Fix file name encoding of Motif drop protocol file se
From: |
Po Lu |
Subject: |
master fcb4d836f0: Fix file name encoding of Motif drop protocol file selections |
Date: |
Sun, 5 Jun 2022 09:16:48 -0400 (EDT) |
branch: master
commit fcb4d836f01cbec30cb5f906941179c566414b81
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>
Fix file name encoding of Motif drop protocol file selections
* lisp/select.el (xselect-convert-to-filename):
(xselect-convert-to-dt-netfile): Encode in the file name coding
system instead of `raw-text-unix'.
---
lisp/select.el | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/lisp/select.el b/lisp/select.el
index c5412f2a73..83dc137e23 100644
--- a/lisp/select.el
+++ b/lisp/select.el
@@ -633,7 +633,8 @@ two markers or an overlay. Otherwise, it is nil."
;; Motif expects this to be STRING, but it treats the data as
;; a sequence of bytes instead of a Latin-1 string.
(cons 'STRING (encode-coding-string (expand-file-name value)
- 'raw-text-unix))
+ (or file-name-coding-system
+
default-file-name-coding-system)))
(when (vectorp value)
(with-temp-buffer
(cl-loop for file across value
@@ -643,7 +644,8 @@ two markers or an overlay. Otherwise, it is nil."
(delete-char -1))
;; Motif wants STRING.
(cons 'STRING (encode-coding-string (buffer-string)
- 'raw-text-unix)))))))
+ (or file-name-coding-system
+
default-file-name-coding-system))))))))
(defun xselect-convert-to-charpos (_selection _type value)
(when (setq value (xselect--selection-bounds value))
@@ -771,8 +773,11 @@ VALUE should be SELECTION's local value."
(stringp value)
(file-exists-p value)
(not (file-remote-p value)))
- (encode-coding-string (xselect-tt-net-file value)
- 'raw-text-unix t)))
+ (cons 'STRING
+ (encode-coding-string (xselect-tt-net-file value)
+ (or file-name-coding-system
+ default-file-name-coding-system)
+ t))))
(setq selection-converter-alist
'((TEXT . xselect-convert-to-string)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master fcb4d836f0: Fix file name encoding of Motif drop protocol file selections,
Po Lu <=