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.devel Subject: Re: New Context Menu Date: Wed, 18 Aug 2021 22:34:22 +0300 Message-ID: <83h7fm35tt.fsf@gnu.org> References: <20210818120834.i3orh535tb2enpos.ref@Ergus> <20210818120834.i3orh535tb2enpos@Ergus> <8335r7546s.fsf@gnu.org> <20210818124309.wvd4vhzv6sgsujdh@Ergus> <83a6le4rz1.fsf@gnu.org> <20210818181052.qpa7cwhim2i6ftmx@Ergus> <83r1eq39en.fsf@gnu.org> <20210818192318.t63jaljytwogr7pf@Ergus> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15282"; mail-complaints-to="usenet@ciao.gmane.io" Cc: juri@linkov.net, emacs-devel@gnu.org To: Ergus Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Aug 18 22:20:54 2021 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 1mGS3S-0003sM-8Y for ged-emacs-devel@m.gmane-mx.org; Wed, 18 Aug 2021 22:20:54 +0200 Original-Received: from localhost ([::1]:41150 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mGS3Q-0001QD-Ki for ged-emacs-devel@m.gmane-mx.org; Wed, 18 Aug 2021 16:20:52 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60382) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mGRKY-00073d-2E for emacs-devel@gnu.org; Wed, 18 Aug 2021 15:34:30 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:35178) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mGRKW-0001UH-Vg; Wed, 18 Aug 2021 15:34:28 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:4382 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 1mGRKV-0007BC-MT; Wed, 18 Aug 2021 15:34:28 -0400 In-Reply-To: <20210818192318.t63jaljytwogr7pf@Ergus> (message from Ergus on Wed, 18 Aug 2021 21:23:18 +0200) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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:272618 Archived-At: > Date: Wed, 18 Aug 2021 21:23:18 +0200 > From: Ergus > Cc: emacs-devel@gnu.org, juri@linkov.net > > >> Paste calls mouse-yank-primary, but in tty this commands calls > >> gui-get-primary-selection and there is no selection because it tries to > >> get the one on the primary selection not the one in the system > >> (secoundary or clipboard) not the emacs kill-ring either. > >> > >> So I get: error("No selection is available") > > > >Which is the correct response. If you run on an xterm that supports > >pasting, you will get the result as on GUI frames. Why is this a > >problem? > > > If within Emacs I "Copy" throw context-menu, then I expect I could paste > the copied thing in the same way. I expect C-y not action. > > And if I copy from the browser, the context's menu paste must do the > same and take it from the clipboard right? That's what a normal "Paste" > do. > > In my case I use the xclip.el package from Stefan, so, everything could > go throw Yank in my case. But that's a different beast. > > >And how do you get "Paste" in the context menu, btw? > > It is just there... what do you mean? Ahh, I see now. Yes, it's wrong to call mouse-yank-primary here, as that doesn't work on TTY frames. We should have a wrapper function that calls yank if the selection doesn't exist.