From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Manuel Giraud via Users list for the GNU Emacs text editor Newsgroups: gmane.emacs.help Subject: Re: multiple kill and paste from X clipboard Date: Fri, 02 Feb 2024 16:58:50 +0100 Message-ID: <87fryakgcl.fsf@ledu-giraud.fr> References: <874jfi1s5l.fsf@ledu-giraud.fr> <83h6jiimbw.fsf@gnu.org> <87zfxazdxs.fsf@ledu-giraud.fr> <87wmse12tb.fsf@yahoo.com> <871qajykib.fsf@ledu-giraud.fr> <871qaizo14.fsf@ledu-giraud.fr> <87ttncm2qo.fsf@ledu-giraud.fr> Reply-To: Manuel Giraud Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16441"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Manuel Giraud via Users list for the GNU Emacs text editor , Po Lu To: Stefan Monnier Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Fri Feb 02 16:59:31 2024 Return-path: Envelope-to: geh-help-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 1rVvww-000401-5a for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 02 Feb 2024 16:59:30 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rVvwc-0006Q9-ML; Fri, 02 Feb 2024 10:59:10 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rVvwS-0006DP-3B for help-gnu-emacs@gnu.org; Fri, 02 Feb 2024 10:59:02 -0500 Original-Received: from ledu-giraud.fr ([51.159.28.247]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rVvwO-00030d-UE for help-gnu-emacs@gnu.org; Fri, 02 Feb 2024 10:58:59 -0500 DKIM-Signature: v=1; a=ed25519-sha256; c=simple/simple; s=ed25519; bh=mygHJF4s Gp8KCR0eGidJXewxrUN36NZ6AcDEOKk0zvo=; h=date:references:in-reply-to: subject:cc:to:from; d=ledu-giraud.fr; b=0c7Q2+W5TwTd4kMVDUQjvKCd2E2uxO EPMKvy0wub7y+6dOC6HpMkA75poMu0g+wcNNv/ZJ3jgQygrgu7e7a5BQ== DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; s=rsa; bh=mygHJF4sGp8KCR0e GidJXewxrUN36NZ6AcDEOKk0zvo=; h=date:references:in-reply-to:subject: cc:to:from; d=ledu-giraud.fr; b=QXaRCPNrugTE5yZML4C693zDzFIZre4UXtqD5K BmJ5iW1hAwvH/fbBiVfR8Rb8m8pLZJh+tR1w+aQlXQzjxEpWmxO7o/xzz+GRvT3KihIM8z j8H+cQax3fkuLL9a+ufZ/yjEpTyjlHq3mz1S0Jvj2OOXQ2nXS05thqzWCy5vsIpa+Ic0Fe Dj5w3IUXF7lDtPpY9c2o2uOQshy2vs21kcQo9n3h3j8Opo6bXUiHw7iW2Tpc9zbmKEeP8z 3lZ0HTYR3Kjn2TlEm3BqLTHdrFari9qkhpn3NTDJE5XuL2T42z9sF9jB7kuz5B06KWWcez +Of8K+3u3bzxHTtv/f/sEZTA== Original-Received: from computer ( [10.1.1.1]) by ledu-giraud.fr (OpenSMTPD) with ESMTPSA id 70550949 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Fri, 2 Feb 2024 16:58:51 +0100 (CET) In-Reply-To: (Stefan Monnier's message of "Wed, 31 Jan 2024 14:27:57 -0500") Received-SPF: pass client-ip=51.159.28.247; envelope-from=manuel@ledu-giraud.fr; helo=ledu-giraud.fr X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:145858 Archived-At: Stefan Monnier writes: >> As I said previously, it works with some X client (like xterm) but with >> a more useful one (Firefox) I just get half of the selections. >> >> I tried to debug this and it seems to me that it is because Firefox >> issues some "PRIMARY TARGETS" requests that ends up =C2=AB=C2=A0consumin= g=C2=A0=C2=BB the >> user data (I'm not sure this is what happen but this is my >> interpretation of it). > > I'm definitely not an expert in the way selection works in GUIs, nor how > this works in Emacs. So I can't judge what your patch does, sorry. > This said, maybe a "safer" change is to propagate the information that > a particular request is a "TARGETS" request to the > `x-sent-selection-functions` so that *your* function can decide whether > that should count as consuming or not. Hi Stefan, This is what is not clear to me because this information is already propagated (and handled) via 'type' in my function 'next-primary'. FWIW, it may also be a bug in firefox because this works in chromium for example. --=20 Manuel Giraud