From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#53894: 27.2; Clipboard copy -> C-y -> M-y -> Same clipboard copy does not push to kill ring Date: Fri, 01 Apr 2022 15:10:30 +0300 Message-ID: <83czi157ih.fsf@gnu.org> References: <87leyhtv9q.fsf@yahoo.com> <87wni0str6.fsf@yahoo.com> <87h78j6bz0.fsf@yahoo.com> <87czj73xw8.fsf@yahoo.com> <87wnhfoy5h.fsf@hotmail.com> <87sfs233lx.fsf@yahoo.com> <83fso1lsjf.fsf@gnu.org> <871qzlw50r.fsf@yahoo.com> <87sfs0u6n2.fsf@yahoo.com> <87a6d829rx.fsf@yahoo.com> <83h77d5atf.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21469"; mail-complaints-to="usenet@ciao.gmane.io" Cc: luangruo@yahoo.com, larsi@gnus.org, 53894@debbugs.gnu.org To: Ignacio Casso Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Apr 01 14:11:18 2022 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 1naG7a-0005TA-IO for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 01 Apr 2022 14:11:18 +0200 Original-Received: from localhost ([::1]:52330 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1naG7Z-0006Se-9O for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 01 Apr 2022 08:11:17 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:36160) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1naG7K-0006S2-F8 for bug-gnu-emacs@gnu.org; Fri, 01 Apr 2022 08:11:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:47159) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1naG7K-00030n-6H for bug-gnu-emacs@gnu.org; Fri, 01 Apr 2022 08:11:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1naG7K-0004Bm-0H for bug-gnu-emacs@gnu.org; Fri, 01 Apr 2022 08:11:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 01 Apr 2022 12:11:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53894 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 53894-submit@debbugs.gnu.org id=B53894.164881502516059 (code B ref 53894); Fri, 01 Apr 2022 12:11:01 +0000 Original-Received: (at 53894) by debbugs.gnu.org; 1 Apr 2022 12:10:25 +0000 Original-Received: from localhost ([127.0.0.1]:41056 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1naG6i-0004Ax-RE for submit@debbugs.gnu.org; Fri, 01 Apr 2022 08:10:25 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:48312) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1naG6h-0004Ah-2R for 53894@debbugs.gnu.org; Fri, 01 Apr 2022 08:10:23 -0400 Original-Received: from [2001:470:142:3::e] (port=46254 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1naG6b-0002rP-PJ; Fri, 01 Apr 2022 08:10:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=rVH0q4qFDgiXDbPrymlRCulXNBOvug5yNkUwoziAWKw=; b=oREIMR65CIZp WOlXG8RbhGjyvhkXD0NrTIXEJZ3+zkUBRjdG5TcqB127ipr1EnSK1+YIoOdj5b4ci1MVe1A+uXmyx 3Y5d/BeBR/ie5ys24LGeIOcYBl7xwJMF0QbswQQJS75GJMDaugwV6tc+3GE44UkxvQF/4uN27LN7J mk9No98G9xWY7301uWMZvZOyF7kjh6I58E+2KVGj1Nsrh7TM+dO1y9pYYKva3BBb4HtyKgpWcT2Ba J5AK6evrxDOhaLABpigdCH0qHGA1DTiVittmfW5KW2Jw11cNKxZCVvcYoRoEJBPXqNFcPxfZUNCxs NkQVyLzsHBG78h1pBQ78jQ==; Original-Received: from [87.69.77.57] (port=2051 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1naG6b-0000I1-6E; Fri, 01 Apr 2022 08:10:17 -0400 In-Reply-To: (message from Ignacio Casso on Fri, 01 Apr 2022 13:23:27 +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:229219 Archived-At: > From: Ignacio Casso > Cc: luangruo@yahoo.com, 53894@debbugs.gnu.org, larsi@gnus.org > Date: Fri, 01 Apr 2022 13:23:27 +0200 > > >> +(defun gui--set-last-clipboard-selection (text) > >> + "Save last clipboard selection. > >> +Save the selected text, passed as argument, and for window > >> +systems that support it, save the selection timestamp too." > >> + (setq gui--last-selected-text-clipboard text) > >> + (when (memq window-system '(x)) > > > > This should use 'eq', nor 'memq', since you are testing against a > > single value. (There are more of such code elsewhere in the patch.) > > Well the idea is that in the future there could be more window systems > in that list, that's why I used `memq'. Sure, but converting 'eq' comparing to a single value to 'memq' comparing to a list of values is trivial, and thus doesn't need any "provisions for". > I attach the patch using `eq' instead. Thanks.