From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jean Louis Newsgroups: gmane.emacs.devel Subject: Re: Set X primary selection with Emacs in xterm Date: Sat, 11 Jun 2022 09:56:08 +0300 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18162"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mutt/+ () (2022-05-21) Cc: emacs-devel@gnu.org To: Duncan Findlay Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Jun 11 18:18:28 2022 Return-path: Envelope-to: ged-emacs-devel@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 1o03oi-0004Wo-Lg for ged-emacs-devel@m.gmane-mx.org; Sat, 11 Jun 2022 18:18:28 +0200 Original-Received: from localhost ([::1]:51206 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o03og-0000JH-Vj for ged-emacs-devel@m.gmane-mx.org; Sat, 11 Jun 2022 12:18:27 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38798) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o03nF-00082y-NY for emacs-devel@gnu.org; Sat, 11 Jun 2022 12:16:57 -0400 Original-Received: from stw1.rcdrun.com ([217.170.207.13]:46245) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o03nD-0000xq-Oq for emacs-devel@gnu.org; Sat, 11 Jun 2022 12:16:57 -0400 Original-Received: from localhost ([::ffff:102.81.237.245]) (AUTH: PLAIN admin, TLS: TLS1.3,256bits,ECDHE_RSA_AES_256_GCM_SHA384) by stw1.rcdrun.com with ESMTPSA id 0000000000087C62.0000000062A4BFF4.00007E70; Sat, 11 Jun 2022 09:16:51 -0700 Mail-Followup-To: Duncan Findlay , emacs-devel@gnu.org Content-Disposition: inline In-Reply-To: Received-SPF: pass client-ip=217.170.207.13; envelope-from=bugs@gnu.support; helo=stw1.rcdrun.com X-Spam_score_int: -3 X-Spam_score: -0.4 X-Spam_bar: / X-Spam_report: (-0.4 / 5.0 requ) BAYES_00=-1.9, DATE_IN_PAST_06_12=1.543, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:291040 Archived-At: * Duncan Findlay [2022-06-10 09:45]: > On Mon, Jun 6, 2022 at 7:39 AM Jean Louis wrote: > > > > * Duncan Findlay [2022-06-03 08:24]: > > > I frequently use Emacs over ssh and I'd really like to get both > > > primary and clipboard selections to work as close as possible to > > > running Emacs on X natively. I'd like to kill text in Emacs and have > > > that show up in my system clipboard so I can paste into other > > > applications. > > > > I have these settings and it works for me exactly how you explained > > above. > > > > (setq select-enable-clipboard t) > > (setq select-enable-primary t) > > As I understand it, this configuration will cause killed text to be > put in both your clipboard and primary selection buffers. > > I suppose that technically meets the criteria I outlined above -- it > should work identically over ssh and on X natively, but it's not quite > what I meant. > > > > Similarly, if I select text with mark and keyboard (or mouse with > > > xterm-mouse-mode), I'd like it to update my local X's primary > > > selection so I can middle-click to paste it elsewhere. I have two > > > patches attached that got this working for me. > > > > For me your explained situation works without patches. I have the > > above settings. But I may miss something as you mention > > xterm-mouse-mode which I am not even using it ever. On my side it > > works. > > Sorry, I should have been more precise. > > I would like the primary selection to be updated with the contents of > the region, as described here: > https://www.gnu.org/software/emacs/manual/html_node/emacs/Primary-Selection.html > > This requires `select-active-regions' to be non-nil. Do you have this > set in your configuration? Yes, it is T in my configuration. When I select region, I can use second (among three) mouse button to insert selection into XTerm. -- Jean Take action in Free Software Foundation campaigns: https://www.fsf.org/campaigns In support of Richard M. Stallman https://stallmansupport.org/