all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Issues with X selection handling
@ 2004-08-17 18:52 Davis Herring
  2004-08-19 18:07 ` Jan D.
  0 siblings, 1 reply; 6+ messages in thread
From: Davis Herring @ 2004-08-17 18:52 UTC (permalink / raw)


[Emacs version: 21.3.1 of May 22 2003, although I see few relevant 
changes in CVS]
I have been experimenting with different semantics for handling X 
selections (particularly `PRIMARY'), and have run across several snags in 
the x-*-selection-* functions and hooks:

 + `x-disown-selection-internal' doesn't seem to do anything.
 + `x-lost-selection-hooks' is not always executed when one would expect:
  - using the mouse to select text in Emacs and then elsewhere seems to 
never call the hooks
  - losing the clipboard usually (but not always) calls the hooks
  - explicitly owning a selection with M-: (x-own-selection-internal
'PRIMARY "foo") seems to cause the hooks to be called (later)
  - killing text with the keyboard also seems to guarantee hooks
 + Occasionally, Emacs itself (i.e. xselect.c) seems to miss a
notification that it has lost the selection -- I have, once, seen Emacs
insist that it owns the clipboard selection despite the fact that other
applications are owning and using it.

There may be some sort of race condition in xselect.c, since (if I read it
correctly) it uses 1-second-resolution time values to decide on the
relevance of X events.  But most of the time, `Vselection-alist' has the
correct values (as reported by the x-get-* methods) even when the Lisp
hooks aren't called.

I am unfortunately sufficiently familiar with neither X nor Emacs' C to
properly diagnose (much less correct) these problems; however, I have
attached an Emacs Lisp file with X-selection investigative tools;
hopefully it will be of use in discovering and/or testing fixes for the
bug(s).  Could someone please have a look at this?

Thanks in advance,
Davis Herring

-- 
This product is sold by volume, not by mass.  If it seems too dense or too 
sparse, it means mass-energy conversion has occurred during shipping.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2004-08-25 16:05 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-08-17 18:52 Issues with X selection handling Davis Herring
2004-08-19 18:07 ` Jan D.
2004-08-24  1:18   ` Davis Herring
2004-08-24  1:38     ` Davis Herring
2004-08-24 11:44     ` Jan D.
2004-08-25 16:05       ` Mouse-drags wait to call post-command-hook Davis Herring

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.