From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: libreville Newsgroups: gmane.emacs.bugs Subject: bug#73830: using one expression to make multiple X selections Date: Wed, 16 Oct 2024 19:42:54 +0000 Message-ID: <52d206ef04fcd08b449bb73e69c73aa3@riseup.net> References: <4a2f64e201951a525ab56fab135c4777@riseup.net> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15087"; mail-complaints-to="usenet@ciao.gmane.io" To: 73830@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Oct 16 21:44:00 2024 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 1t19w7-0003ii-IQ for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 16 Oct 2024 21:43:59 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t19vt-0006tU-5s; Wed, 16 Oct 2024 15:43:45 -0400 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 1t19vq-0006sy-QZ for bug-gnu-emacs@gnu.org; Wed, 16 Oct 2024 15:43:42 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t19vq-0005QP-Ho for bug-gnu-emacs@gnu.org; Wed, 16 Oct 2024 15:43:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=References:In-Reply-To:From:Date:MIME-Version:To:Subject; bh=pARsvtrc98zdrTKHHnfX7He4hyiyPa9XhzAS3AM3d9o=; b=l0/Ch659JfzyBowwrLcSR6yBaWxSpTjNqPKH/cCsg4gu2vBtnypwRtMTJmvSZzOPrQ0b65CVnAv3rS/KKWxUTQh8CvzEscQWHIpQjJizywZN8mXuwJa1wuyh27uq8LIuzXdTtQPFhysnrC0m48ZaWypLFzx++/lVmfQdP499B8YrXcmnjM3Pm/F6BiMaryQDWitEk5ywS/l8lzsy77PoGI+qcPgF0EdOLD/4+7WLVDvtwW5yWO4V+Kz7UTL55Rz6BH1LmSaSYSUW4NrfT39rd1umgLDrfA/fVYlTrYHW305uv7z0j3OJQi4Gg35it+CxgWks7QqNJJthVYHh48qJ8Q==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1t19wA-0001Z4-Du for bug-gnu-emacs@gnu.org; Wed, 16 Oct 2024 15:44:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: libreville Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 16 Oct 2024 19:44:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73830 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.17291078025953 (code B ref -1); Wed, 16 Oct 2024 19:44:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 16 Oct 2024 19:43:22 +0000 Original-Received: from localhost ([127.0.0.1]:60543 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t19vW-0001Xx-3s for submit@debbugs.gnu.org; Wed, 16 Oct 2024 15:43:22 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:47756) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t19vU-0001Xn-EK for submit@debbugs.gnu.org; Wed, 16 Oct 2024 15:43:20 -0400 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 1t19vA-0006r8-6c for bug-gnu-emacs@gnu.org; Wed, 16 Oct 2024 15:43:00 -0400 Original-Received: from mx0.riseup.net ([198.252.153.6]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t19v8-0005NW-4t for bug-gnu-emacs@gnu.org; Wed, 16 Oct 2024 15:42:59 -0400 Original-Received: from fews02-sea.riseup.net (fews02-sea-pn.riseup.net [10.0.1.112]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx0.riseup.net (Postfix) with ESMTPS id 4XTLwb32Mlz9w81 for ; Wed, 16 Oct 2024 19:42:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=riseup.net; s=squak; t=1729107775; bh=OLGySZs2neMjgPs1MIKGGzIToeC7xBSLuAHSZGiaD+0=; h=Date:From:To:Subject:In-Reply-To:References:From; b=C173fLvzT/UEwAu3RH2j19pCB1OqvmQUjLt4CWS5CsNRr7cuzo1TaArI8YPjk7FIU A3iPdtIC5XngIumbJQe6k5vWnXhduJfr3q3v6VgoncrZNG0noM4zeNP0PU2oXMaZnq zokbqaKfMrG17dNguIPAKRCLukjJK1cIso74mvFA= X-Riseup-User-ID: 81E05D036CCED2D69E064E5257D4DB5FABF33DD1EFE01BC49B3E7EFC884DEA94 Original-Received: from [127.0.0.1] (localhost [127.0.0.1]) by fews02-sea.riseup.net (Postfix) with ESMTPSA id 4XTLwb1rHMzFpkK for ; Wed, 16 Oct 2024 19:42:55 +0000 (UTC) In-Reply-To: Received-SPF: pass client-ip=198.252.153.6; envelope-from=libreville@riseup.net; helo=mx0.riseup.net X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:293687 Archived-At: Hi there, going by the list archive, my first email didn't go through. Here it is again in case that's right: Hello, I stumbled on this while trying to elisp a few things into my X clipboard manager. Evaluating these two expressions in turn: (gui-set-selection 'CLIPBOARD "1") (gui-set-selection 'CLIPBOARD "2") results in both "1" and "2" being saved to the clipboard history. However: (progn (gui-set-selection 'CLIPBOARD "1") (gui-set-selection 'CLIPBOARD "2")) results in "2" being saved to the clipboard history but, contrary to what I would expect, not "1". On the other hand this: (progn (gui-set-selection 'CLIPBOARD "3") (sleep-for 1) (gui-set-selection 'CLIPBOARD "4")) gets both "3" and "4" onto the clipboard (history). I get similar results with kill-new in place of gui-set-selection 'CLIBOARD and with other ways of grouping the two kills into one expression. Why does waiting work around the problem? Tested with both copyq and clipman / Emacs 28.2 / Xfce. Best, liv. On 2024-10-15 18:04, libreville wrote: > My apologies, that should of course have read "sleep-for 1", not > "wait-for 1". > > On 2024-10-15 13:59, libreville wrote: > >> >> (progn >> (gui-set-selection 'CLIPBOARD "3") >> (wait-for 1) >> (gui-set-selection 'CLIPBOARD "4")) >>