all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Tobias Bading <tbading@web.de>
To: emacs-devel@gnu.org
Subject: Copy and paste from Emacs 29 to Thunderbird doesn’t work
Date: Sun, 30 Apr 2023 15:01:37 +0200	[thread overview]
Message-ID: <9c56cb17-1bc2-9533-31e0-0180f541dd09@web.de> (raw)

Hi.

I think I discovered a new kind of bug. It’s not like a heisenbug that
tries to prevent people from studying it properly — this one tries to
prevent being *reported*! XD

When I was done composing my last mail in Emacs 29
(https://lists.gnu.org/archive/html/emacs-devel/2023-04/msg00771.html),
I tried to copy and paste the text into Thunderbird. Emphasis on trying.
C-v didn’t work. Nothing happened. Double-clicked just a single word in
Emacs, C-v in Thunderbird… nope, nothing. Clicked into Thunderbird’s
‘Subject’ field and pressed C-v… now I see my copied word! What the f…?

Tried the same in Emacs 26 — no problems.

After installing xclip and starting to wonder about the bazillion different
selection formats, I wasn’t really in the mood for reading entire books
about the X11 primary selection and clipboard. So I simply grep’d the
sources for “OWNER_OS” because I have no idea why anyone would want to
associate the operating system’s type with a selection. That led to
selection-converter-alist in select.el.

Long story short, replacing Emacs 29’s selection-converter-alist with the
one from Emacs 26 seems to fix the problem, i.e.:

diff --git a/lisp/select.el b/lisp/select.el
index 7f089c62dd..7f885eafcf 100644
--- a/lisp/select.el
+++ b/lisp/select.el
@@ -894,14 +894,6 @@ xselect-convert-to-dt-netfile
      (COMPOUND_TEXT . xselect-convert-to-string)
      (STRING . xselect-convert-to-string)
      (UTF8_STRING . xselect-convert-to-string)
-    (text/plain . xselect-convert-to-string)
-    (text/plain\;charset=utf-8 . xselect-convert-to-string)
-        (text/uri-list . (xselect-uri-list-available-p
-                          . xselect-convert-to-text-uri-list))
-        (text/x-xdnd-username . (xselect-dnd-target-available-p
-                                 . xselect-convert-to-username))
-        (FILE . (xselect-uri-list-available-p
-                 . xselect-convert-to-xm-file))
      (TARGETS . xselect-convert-to-targets)
      (LENGTH . xselect-convert-to-length)
      (DELETE . xselect-convert-to-delete)
@@ -917,13 +909,7 @@ xselect-convert-to-dt-netfile
      (ATOM . xselect-convert-to-atom)
      (INTEGER . xselect-convert-to-integer)
      (SAVE_TARGETS . xselect-convert-to-save-targets)
-    (_EMACS_INTERNAL . xselect-convert-to-identity)
-        (XmTRANSFER_SUCCESS . (xselect-dnd-target-available-p
-                               . xselect-convert-xm-special))
-        (XmTRANSFER_FAILURE . (xselect-dnd-target-available-p
-                               . xselect-convert-xm-special))
-        (_DT_NETFILE . (xselect-dt-netfile-available-p
-                        . xselect-convert-to-dt-netfile))))
+    (_EMACS_INTERNAL . xselect-convert-to-identity)))

  (provide 'select)

Of course that’s just a quick and dirty hack which will probably lead to
other problems. Could someone who knows this stuff please look into this?

BTW, my Emacs runs with select-enable-clipboard and select-enable-primary
both set to t.

Tobias

PS: please keep me CC’d, thanks



             reply	other threads:[~2023-04-30 13:01 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-30 13:01 Tobias Bading [this message]
2023-05-01  0:02 ` Copy and paste from Emacs 29 to Thunderbird doesn’t work Po Lu
  -- strict thread matches above, loose matches on Subject: below --
2023-05-02  7:25 Pedro Andres Aranda Gutierrez
2023-05-02  8:10 ` Po Lu
2023-05-02 17:22   ` Gregor Zattler
2023-05-02 23:33     ` Po Lu
2023-05-04 18:22       ` Gregor Zattler
2023-05-05  0:16         ` Po Lu
2023-05-05  5:45           ` Gregor Zattler
2023-05-05  6:16             ` Po Lu
2023-05-03  5:11   ` Tobias Bading
2023-05-03  5:20     ` Po Lu
2023-05-03  5:41       ` Tobias Bading
2023-05-03  5:57         ` Po Lu
2023-05-03  6:05           ` Tobias Bading
2023-05-03  6:54             ` Po Lu
2023-05-03 11:19               ` Eli Zaretskii
2023-05-03 12:00                 ` Po Lu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9c56cb17-1bc2-9533-31e0-0180f541dd09@web.de \
    --to=tbading@web.de \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.