From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: x-selection-exists-p vs x-get-selection Date: Sun, 04 May 2008 07:02:42 +0300 Message-ID: References: <002501c8ad70$af83c510$0200a8c0@us.oracle.com> Reply-To: Eli Zaretskii NNTP-Posting-Host: lo.gmane.org X-Trace: ger.gmane.org 1209873816 19439 80.91.229.12 (4 May 2008 04:03:36 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 4 May 2008 04:03:36 +0000 (UTC) Cc: emacs-devel@gnu.org To: Drew Adams Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun May 04 06:04:11 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JsVSL-00006X-0r for ged-emacs-devel@m.gmane.org; Sun, 04 May 2008 06:04:09 +0200 Original-Received: from localhost ([127.0.0.1]:55364 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JsVRd-0006f8-Pq for ged-emacs-devel@m.gmane.org; Sun, 04 May 2008 00:03:25 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JsVRa-0006et-Lv for emacs-devel@gnu.org; Sun, 04 May 2008 00:03:22 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JsVRa-0006eh-14 for emacs-devel@gnu.org; Sun, 04 May 2008 00:03:22 -0400 Original-Received: from [199.232.76.173] (port=49515 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JsVRZ-0006ee-UU for emacs-devel@gnu.org; Sun, 04 May 2008 00:03:21 -0400 Original-Received: from mtaout6.012.net.il ([84.95.2.16]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JsVRZ-00079M-Hf for emacs-devel@gnu.org; Sun, 04 May 2008 00:03:21 -0400 Original-Received: from HOME-C4E4A596F7 ([84.229.228.217]) by i-mtaout6.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0K0B00IE9T8BJEA3@i-mtaout6.012.net.il> for emacs-devel@gnu.org; Sun, 04 May 2008 07:17:00 +0300 (IDT) In-reply-to: <002501c8ad70$af83c510$0200a8c0@us.oracle.com> X-012-Sender: halo1@inter.net.il X-detected-kernel: by monty-python.gnu.org: Solaris 10 (1203?) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:96418 Archived-At: > From: "Drew Adams" > Date: Sat, 3 May 2008 15:54:46 -0700 > > I don't understand `x-selection-exists-p'. I select some text with meta mouse > clicks or drags, to create a secondary selection. (x-get-selection 'SECONDARY) > returns that secondary-selection text, as I would expect. > > But (x-selection-exists-p 'SECONDARY) returns nil - I expected t. The doc string > says: "Whether there is an owner for the given X Selection." I am on Windows, > with `x-select-enable-clipboard' = t, if that is important. > > Is there a bug here? If not can someone please enlighten me? > > How should I understand `x-selection-exists-p'? It is used, for instance, in > menu-bar.el, to determine whether to enable some selection menus, such as Paste. These functions make sense only on X window systems. Their functionality on Windows is tuned to make their callers DTRT, but that's all; there's no underlying theory that would make sense on Windows besides that. There are no ``selections'' on Windows, and no ``owners'' of selections. If you want to understand these functions' semantics on X, read some X manual. If you have specific situations where the code using them misbehaves on Windows, please describe those situations.