[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: x-selection-exists-p vs x-get-selection
From: |
Eli Zaretskii |
Subject: |
Re: x-selection-exists-p vs x-get-selection |
Date: |
Sun, 04 May 2008 07:02:42 +0300 |
> From: "Drew Adams" <address@hidden>
> 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.