From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#47642: 28.0.50; (error "Selection owner couldn't convert" UTF8_STRING) Date: Tue, 13 Apr 2021 19:20:47 +0300 Organization: LINKOV.NET Message-ID: <87lf9m88i8.fsf@mail.linkov.net> References: <86czv656gm.fsf@protected.rcdrun.com> <87y2dteurl.fsf@mail.linkov.net> <87im4ryfqn.fsf@gnus.org> <87k0p73e1n.fsf@mail.linkov.net> <87a6q2tzcb.fsf@gnus.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11302"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) Cc: Jean Louis , 47642@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Apr 13 18:22:14 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lWLnq-0002oy-7w for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 13 Apr 2021 18:22:14 +0200 Original-Received: from localhost ([::1]:51632 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lWLnp-0006md-4p for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 13 Apr 2021 12:22:13 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44874) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lWLnf-0006jW-VS for bug-gnu-emacs@gnu.org; Tue, 13 Apr 2021 12:22:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:49079) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lWLnf-0005NT-Ns for bug-gnu-emacs@gnu.org; Tue, 13 Apr 2021 12:22:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lWLnf-0002Ss-KS for bug-gnu-emacs@gnu.org; Tue, 13 Apr 2021 12:22:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 13 Apr 2021 16:22:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47642 X-GNU-PR-Package: emacs Original-Received: via spool by 47642-submit@debbugs.gnu.org id=B47642.16183308749384 (code B ref 47642); Tue, 13 Apr 2021 16:22:03 +0000 Original-Received: (at 47642) by debbugs.gnu.org; 13 Apr 2021 16:21:14 +0000 Original-Received: from localhost ([127.0.0.1]:60620 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lWLmr-0002RI-Uj for submit@debbugs.gnu.org; Tue, 13 Apr 2021 12:21:14 -0400 Original-Received: from relay9-d.mail.gandi.net ([217.70.183.199]:36593) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lWLmq-0002Qg-6M for 47642@debbugs.gnu.org; Tue, 13 Apr 2021 12:21:12 -0400 X-Originating-IP: 91.129.96.157 Original-Received: from mail.gandi.net (m91-129-96-157.cust.tele2.ee [91.129.96.157]) (Authenticated sender: juri@linkov.net) by relay9-d.mail.gandi.net (Postfix) with ESMTPSA id F00D3FF80A; Tue, 13 Apr 2021 16:21:04 +0000 (UTC) In-Reply-To: <87a6q2tzcb.fsf@gnus.org> (Lars Ingebrigtsen's message of "Tue, 13 Apr 2021 09:31:32 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:203971 Archived-At: --=-=-= Content-Type: text/plain >> I wonder why this error should be raised at all >> instead of just returning nil? > > That's a really good point -- this low-level error surely can't be of > interest to the Emacs user. So you're right -- it should just return > nil here. Here's the patch that does this: --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=selection_owner.patch diff --git a/src/xselect.c b/src/xselect.c index 030f624071..cd6d86bdf4 100644 --- a/src/xselect.c +++ b/src/xselect.c @@ -1482,14 +1482,21 @@ x_get_window_property_as_lisp_data (struct x_display_info *dpyinfo, = XGetSelectionOwner (display, selection_atom) != 0; unblock_input (); if (there_is_a_selection_owner) - signal_error ("Selection owner couldn't convert", - actual_type - ? list2 (target_type, - x_atom_to_symbol (dpyinfo, actual_type)) - : target_type); + { + AUTO_STRING (format, "Selection owner couldn't convert: %s"); + CALLN (Fmessage, format, + actual_type + ? list2 (target_type, + x_atom_to_symbol (dpyinfo, actual_type)) + : target_type); + return Qnil; + } else - signal_error ("No selection", - x_atom_to_symbol (dpyinfo, selection_atom)); + { + AUTO_STRING (format, "No selection: %s"); + CALLN (Fmessage, format, x_atom_to_symbol (dpyinfo, selection_atom)); + return Qnil; + } } if (actual_type == dpyinfo->Xatom_INCR) --=-=-=--