bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

x-get-selection


From: Luc Teirlinck
Subject: x-get-selection
Date: Wed, 7 Mar 2001 20:10:33 -0600

This bug report will be sent to the Free Software Foundation,
 not to your local site managers!!
Please write in English, because the Emacs maintainers do not have
translators to read other languages for them.

In GNU Emacs 20.6.1 (sparc-sun-solaris2.5.1, X toolkit)
 of Thu Mar 23 2000 on manatee
configured using `configure  --with-gcc=no --prefix=/usr/local/emacs20'

Please describe exactly what actions triggered the bug
and the precise symptoms of the bug:

Transcript of an ielm-session in Emacs20 -q:

*** Welcome to IELM ***  Type (describe-mode) for help.
ELISP> (x-set-selection 'PRIMARY "selection")                       1
"selection"
ELISP> (x-set-cut-buffer "cut")                                     2
"cut"
ELISP> (x-set-selection 'PRIMARY nil)                               3
nil
ELISP> (x-get-selection)                                            4
"selection"
ELISP> kill-ring                                                    5
nil
ELISP> selection                                                    6
*** Eval error ***  Symbol's value as variable is void: selection
ELISP> kill-ring                                                    7
("selection")

ELISP>

Notes:

After line 2, yanking with Mouse-2 in an Xterm produces "selection",
as expected.  After line 3, yanking in an Xterm produces "cut",
showing that x-set-selection correctly did its work.  (Except maybe
in as far as its communication with x-get-selection or other parts
of Emacs is concerned.) 
What about x-get-selection however on line 4?
The kill-ring is still empty at this stage (line 5).
Line 6 is the result of internal Emacs yanking (with C-y, although Mouse-2
produces the same result) and seems to indicate that Emacs indeed still 
considers the primary selection to be "selection".
Yanking had the result of adding "selection" officially to the kill-ring.
(Line 7).
The documentation of x-get-selection clearly suggests that the function
returns the general "X" value of the primary selection, not a private 
Emacs-version of it.
A transcript of a second ielm-session shows that the same problem exists
for other selection types:

*** Welcome to IELM ***  Type (describe-mode) for help.
ELISP> (x-set-selection 'SECONDARY "secondary")
"secondary"
ELISP> (x-set-selection 'SECONDARY nil)
nil
ELISP> (x-get-selection 'SECONDARY)
"secondary"
ELISP>  

Recent input:
- b u f f e r SPC " c u t " ) return C-up C-up left
backspace backspace backspace backspace backspace backspace
backspace backspace backspace backspace backspace n
i l return ( x - g e t - s e l e c t i o n ) return
k i l l - r i n g return C-y return up down C-up C-up
return C-x C-s i e l m f i l e return y M-x r e p o
t backspace r t - e m a c s - b u g return

Recent messages:
Loading ielm...
Loading ielm...done
History item: 1
History item: 2
Mark set
History item: 1
History item: 2
Wrote /home/teirllm/ielmfile
Loading emacsbug...
Loading emacsbug...done



reply via email to

[Prev in Thread] Current Thread [Next in Thread]