[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: OSX: Interprogram cut/paste issues ///
From: |
David Reitter |
Subject: |
Re: OSX: Interprogram cut/paste issues /// |
Date: |
Fri, 29 Apr 2005 14:55:53 +0100 |
On 29 Apr 2005, at 08:40, YAMAMOTO Mitsuharu wrote:
On Fri, 29 Apr 2005 08:32:19 +0100, David Reitter
<address@hidden> said:
The problems (below) go away if mouse-sel is not used, yet I cannot
get it to not copy the region into the clipboard (killring) when
some region is selected.
Is (setq x-select-enable-clipboard nil) what you want? I tried to use
with this setting for a while and noticed that the patch below may be
needed.
OK, obviously yes. I'm a little confused with regards to the
documentation of this variable, which says that
"Non-nil means cutting and pasting uses the clipboard.
This is in addition to the primary selection."
So since I want to use the clipboard, I'd set it to t. But that's
wrong. So it's set to nil now.
to make the Services menu work when x-select-enable-clipboard is set
to nil.
Right, will do that, but I suggest this be integrated directly, as the
documentation of x-select-enable-clipboard does not mention that a
value of nil breaks the Services menu, and I guess it shouldn't do so
either way.
Thanks for the two patches. With them applied an the below code in
place (attached for everybody's reference), things seem to get better,
but only if cua-mode is disabled.
If do a manual M-x clipboard-yank, everything is fine. If I do an M-x
cua-paste, I get the old faulty behavior.
The following code in cua-base might contribute to the problem:
(define-key cua-global-keymap [remap yank] 'cua-paste)
(define-key cua-global-keymap [remap clipboard-yank] 'cua-paste)
I commented them out and everything works.
Previously, I never had a problem with this - possibly because I was
just mapping my own H-v to 'yank (or now, 'clipboard-yank) and that was
it. But it looks like CUA is remapping the key binding instead of just
it's own C-v, so that's majorly incompatible with what is documented
about cua-mode.
Of course, I can now try to undefine this [remap ...] stuff myself
after cua-mode is loaded, but that, honestly, would be yet another hack
that'll probably be broken sooner or later.
Or I could use my own cua-mode in AquaMacs and ditch the default cua
alltogether.
A further problem is that I have set
(setq cua-keep-region-after-copy t)
which is broken now. Region is deleted after clipboard-copy.
Also, I still have the "No overlay corresponding..." error when trying
to close a frame with the mouse.
Thanks again for your help
-- Dave
=====
(setq mouse-sel-default-bindings 'interprogram-cut-paste)
(mouse-sel-mode 1)
(setq mouse-sel-set-selection-function
(lambda (selection value)
(if (eq selection 'PRIMARY)
(x-select-text value)
(X-set-selection selection value))))
(defalias 'x-cut-buffer-or-selection-value 'x-get-selection-value)
(setq x-select-enable-clipboard nil)
(put 'PRIMARY 'mac-scrap-name "org.gnu.Emacs.selection.PRIMARY")
(setq mac-services-selection 'PRIMARY)