16 September 2005
Dear Stephen,
thank you very much for your email.
In your email, you wrote:
Ernst> When working with Xemacs, I normally can mark a region
with
Ernst> the left mouse button. This marked region is copied to the
Ernst> kill ring and I should be able to paste this region to a
Ernst> different location in the file via the middle mouse
Ernst> button. However, in my case, the operation produces the
Ernst> correct result only if the kill ring had been empty.
Do you mean that the contents of the kill ring, instead of the
marked region (in X11 terms, the primary selection), are copied? or
what?
Ernst> Accordingly, after marking a region with the left
Ernst> mouse button, I have to explicitly give a command like
Ernst> Alt-w in order to copy the marked region into the kill
Ernst> ring. After that, pasting via the middle mouse button
Ernst> works.
Let me explain this by a simple example. Assume that we have in my
version of Xemacs a file with the following text:
Jo> 1111
Jo>
Jo> 2222
Jo>
Jo> 3333
Jo>
Jo> 4444
Let us also assume that I have not done any operation affecting the kill
ring (for example Alt-w or Ctl-w).
Now I mark 1111 with the left mouse button. After that, I move the cursor
behind 2222 by clicking the left mouse cursor immediately behind
2222. Then, by pressing the middle mouse button I obtain
Jo> 1111
Jo>
Jo> 22221111
Jo>
Jo> 3333
Jo>
Jo> 4444
Let us now start again from the same situation (again assuming that
nothing had been done that affects the kill ring):
Jo> 1111
Jo>
Jo> 2222
Jo>
Jo> 3333
Jo>
Jo> 4444
Now, I mark 4444 with the left mouse button and type Ctl-w, which copies
4444 to the kill wring. Then, I again mark 1111 via the left mouse
button. If I now move behind 2222 as in the previous example, and click
with the middle mouse button, I get instead:
Jo> 1111
Jo>
Jo> 22224444
Jo>
Jo> 3333
Jo>
Jo>
Thus, if the kill ring is not empty, the primary selection is not copied
to the kill ring and the previous content of the kill ring is copied.
Accordingly, the functionality of the mouse is now severely restricted
which is quite annoying.
I hope this clarifies the situation.
Then you also asked:
X11 primary selection, X11 clipboard, Motif clipboard, and Emacs
region semantics vary substantially. It's not possible to satisfy
them all simultaneously, so XEmacs selection treatment is
customizable. Please let me know what the contents of the variables
`interprogram-cut-function' and `interprogram-paste-function' are (C-h
v VARIABLE RET will tell you that).
The command
Ctl-h v interprogram-cut-function
yielded the following result
Jo> `interprogram-cut-function' is a variable declared in Lisp.
Jo> -- loaded from "/usr/share/xemacs/21.5.18/lisp/simple.elc"
Jo>
Jo> Value: own-clipboard
and the command
Ctl-h v interprogram-paste-function
yielded the following result
Jo> `interprogram-paste-function' is a variable declared in Lisp.
Jo> -- loaded from "/usr/share/xemacs/21.5.18/lisp/simple.elc"
Jo>
Jo> Value: get-clipboard-foreign
Thank you very much for your help.
Yours sincerely
Ernst Joachim Weniger
#-------------------------------------------------------|
| PD Dr. Ernst Joachim Weniger |
| Institut für Physikalische und Theoretische Chemie |
| Universität Regensburg |
| D-93040 Regensburg, Germany |
| Tel: +49 (0)941-943-4722 |
| Fax: +49 (0)941-943-4719 |
| Email: Joachim.Weniger(a)chemie.uni-regensburg.de |
#-------------------------------------------------------|