[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Copy and paste from Emacs 29 to Thunderbird doesn’t work
From: |
Tobias Bading |
Subject: |
Re: Copy and paste from Emacs 29 to Thunderbird doesn’t work |
Date: |
Wed, 3 May 2023 08:05:13 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0 |
On 03.05.23 07:57, Po Lu wrote:
> Thanks. Would you please try this change?
>
> diff --git a/lisp/select.el b/lisp/select.el
> index 7f089c62dd5..09c678867d0 100644
> --- a/lisp/select.el
> +++ b/lisp/select.el
> @@ -807,19 +807,24 @@ xselect-convert-to-save-targets
> (defun xselect-convert-to-username (_selection _type _value)
> (user-real-login-name))
>
> -(defun xselect-convert-to-text-uri-list (_selection _type value)
> - (let ((string
> - (if (stringp value)
> - (xselect--encode-string 'TEXT
> - (concat (url-encode-url value) "\n"))
> - (when (vectorp value)
> - (with-temp-buffer
> - (cl-loop for tem across value
> - do (progn
> - (insert (url-encode-url tem))
> - (insert "\n")))
> - (xselect--encode-string 'TEXT (buffer-string)))))))
> - (cons 'text/uri-list (cdr string))))
> +(defun xselect-convert-to-text-uri-list (selection _type value)
> + ;; While `xselect-uri-list-available-p' ensures that this target
> + ;; will not be reported in the TARGETS of non-drag-and-drop
> + ;; selections, Firefox stupidly converts to it anyway. Check that
> + ;; the conversion request is being made for the correct selection.
> + (and (eq selection 'XdndSelection)
> + (let ((string
> + (if (stringp value)
> + (xselect--encode-string 'TEXT
> + (concat (url-encode-url value)
> "\n"))
> + (when (vectorp value)
> + (with-temp-buffer
> + (cl-loop for tem across value
> + do (progn
> + (insert (url-encode-url tem))
> + (insert "\n")))
> + (xselect--encode-string 'TEXT (buffer-string)))))))
> + (cons 'text/uri-list (cdr string)))))
>
> (defun xselect-convert-to-xm-file (selection _type value)
> (when (and (stringp value)
Yes, that works and (trace-function 'xselect-convert-to-text-uri-list)
produces
1 -> (xselect-convert-to-text-uri-list CLIPBOARD text/uri-list "nopers")
1 <- xselect-convert-to-text-uri-list: nil
- Re: Copy and paste from Emacs 29 to Thunderbird doesn’t work, (continued)
- Re: Copy and paste from Emacs 29 to Thunderbird doesn’t work, Gregor Zattler, 2023/05/02
- Re: Copy and paste from Emacs 29 to Thunderbird doesn’t work, Po Lu, 2023/05/02
- Re: Copy and paste from Emacs 29 to Thunderbird doesn’t work, Gregor Zattler, 2023/05/04
- Re: Copy and paste from Emacs 29 to Thunderbird doesn’t work, Po Lu, 2023/05/04
- Re: Copy and paste from Emacs 29 to Thunderbird doesn’t work, Gregor Zattler, 2023/05/05
- Re: Copy and paste from Emacs 29 to Thunderbird doesn’t work, Po Lu, 2023/05/05
Re: Copy and paste from Emacs 29 to Thunderbird doesn’t work, Tobias Bading, 2023/05/03
- Re: Copy and paste from Emacs 29 to Thunderbird doesn’t work, Po Lu, 2023/05/03
- Re: Copy and paste from Emacs 29 to Thunderbird doesn’t work, Tobias Bading, 2023/05/03
- Re: Copy and paste from Emacs 29 to Thunderbird doesn’t work, Po Lu, 2023/05/03
- Re: Copy and paste from Emacs 29 to Thunderbird doesn’t work,
Tobias Bading <=
- Re: Copy and paste from Emacs 29 to Thunderbird doesn’t work, Po Lu, 2023/05/03
- Re: Copy and paste from Emacs 29 to Thunderbird doesn’t work, Eli Zaretskii, 2023/05/03
- Re: Copy and paste from Emacs 29 to Thunderbird doesn’t work, Po Lu, 2023/05/03