From: Andreas Schwab <schwab@suse.de>
To: Mike FABIAN <mfabian@redhat.com>
Cc: 20906@debbugs.gnu.org, monnier@iro.umontreal.ca
Subject: bug#20906: 25.0.50;
Date: Thu, 08 Oct 2015 16:02:05 +0200 [thread overview]
Message-ID: <mvmk2qx1msi.fsf@hawking.suse.de> (raw)
In-Reply-To: <s9dd1wp7b7w.fsf@ari.site> (Mike FABIAN's message of "Thu, 08 Oct 2015 15:15:31 +0200")
Mike FABIAN <mfabian@redhat.com> writes:
> Eli Zaretskii <eliz@gnu.org> さんはかきました:
>
>> If the data we receive is different, I guess the only explanation
>> could be that we request it in some different way?
>
> Yes, in the old code
>
> (defun x-get-selection (&optional type data-type)
>
> is called with “'UTF8_STRING” in data-type,
> in the new code
>
> (defun gui-get-selection (&optional type data-type)
>
> is called with “nil” in data type.
>
> That seems to make the difference, evaluating
>
> (gui-get-selection 'PRIMARY 'UTF8_STRING)
>
> gets the selection correctly using the new code,
>
> (gui-get-selection 'PRIMARY)
>
> produces the problem I am seeing.
>
> I still now know why this is called differently, looking ...
This:
diff --git a/lisp/mouse.el b/lisp/mouse.el
index 93bd628..f569ec3 100644
--- a/lisp/mouse.el
+++ b/lisp/mouse.el
@@ -1068,24 +1068,7 @@ regardless of where you click."
(let (select-active-regions)
(deactivate-mark)))
(or mouse-yank-at-point (mouse-set-point click))
- (let ((primary
- (if (fboundp 'x-get-selection-value)
- (if (eq (framep (selected-frame)) 'w32)
- ;; MS-Windows emulates PRIMARY in x-get-selection, but not
- ;; in x-get-selection-value (the latter only accesses the
- ;; clipboard). So try PRIMARY first, in case they selected
- ;; something with the mouse in the current Emacs session.
- (or (x-get-selection 'PRIMARY)
- (x-get-selection-value))
- ;; Else MS-DOS or X.
- ;; On X, x-get-selection-value supports more formats and
- ;; encodings, so use it in preference to x-get-selection.
- (or (x-get-selection-value)
- (x-get-selection 'PRIMARY)))
- ;; FIXME: What about xterm-mouse-mode etc.?
- (x-get-selection 'PRIMARY))))
- (unless primary
- (error "No selection is available"))
+ (let ((primary (gui-get-primary-selection)))
(push-mark (point))
(insert-for-yank primary)))
The comment is there for a reason...
Andreas.
--
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."
next prev parent reply other threads:[~2015-10-08 14:02 UTC|newest]
Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-26 20:35 bug#20906: 25.0.50; Pasting unicode from external applications with mouse wheel on Unix Boris Kheyfets
2015-06-26 21:37 ` Kaushal
2015-06-26 21:41 ` Boris Kheyfets
2015-06-27 7:27 ` Eli Zaretskii
2015-06-27 7:58 ` Boris Kheyfets
2015-06-27 8:12 ` Eli Zaretskii
[not found] ` <CADVzOS83fAf1na7ThotyD3mGOJak-U=ZayhGd=cC3=xT2JZuKQ@mail.gmail.com>
2015-06-27 8:33 ` Eli Zaretskii
2015-06-27 8:34 ` Eli Zaretskii
2015-06-27 10:02 ` Boris Kheyfets
2015-06-27 11:44 ` Eli Zaretskii
2015-10-03 13:15 ` bug#20906: 25.0.50; Mike FABIAN
2015-10-03 14:00 ` Eli Zaretskii
2015-10-05 4:34 ` Mike FABIAN
2015-10-05 6:21 ` Eli Zaretskii
2015-10-05 6:30 ` Mike FABIAN
2015-10-05 7:06 ` Eli Zaretskii
2015-10-05 10:07 ` Mike FABIAN
2015-10-05 10:29 ` Eli Zaretskii
2015-10-05 11:20 ` Mike FABIAN
2015-10-05 11:39 ` Eli Zaretskii
2015-10-05 12:04 ` Andreas Schwab
2015-10-05 12:30 ` Eli Zaretskii
2015-10-05 15:08 ` Mike FABIAN
2015-10-05 17:06 ` Eli Zaretskii
2015-10-06 6:30 ` Mike FABIAN
2015-10-06 16:29 ` Eli Zaretskii
2015-10-06 19:44 ` Mike FABIAN
2015-10-07 6:35 ` Mike FABIAN
2015-10-07 15:33 ` Eli Zaretskii
2015-10-08 8:10 ` Mike FABIAN
2015-10-08 13:15 ` Mike FABIAN
2015-10-08 13:25 ` Mike FABIAN
2015-10-08 14:02 ` Andreas Schwab [this message]
2015-10-08 14:58 ` Eli Zaretskii
2015-10-08 15:08 ` Andreas Schwab
2015-10-08 15:15 ` Eli Zaretskii
2015-10-08 15:33 ` Andreas Schwab
2015-10-08 15:42 ` Eli Zaretskii
2015-10-08 16:56 ` Mike FABIAN
2015-10-09 15:34 ` Mike FABIAN
2015-10-12 8:39 ` Andreas Schwab
2015-10-12 12:20 ` Mike FABIAN
2015-10-12 15:56 ` Eli Zaretskii
2015-10-05 14:24 ` Mike FABIAN
2015-10-05 14:55 ` Mike FABIAN
2015-10-05 15:01 ` Mike FABIAN
2015-10-05 15:05 ` Mike FABIAN
2015-10-05 17:05 ` Eli Zaretskii
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=mvmk2qx1msi.fsf@hawking.suse.de \
--to=schwab@suse.de \
--cc=20906@debbugs.gnu.org \
--cc=mfabian@redhat.com \
--cc=monnier@iro.umontreal.ca \
/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.