[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: Tue, 3 May 2005 11:19:41 +0100

On 3 May 2005, at 10:24, Kim F. Storm wrote:

OK, we're still not completely done - because cua-mode breaks things

Does this patch give good results?

No it doesn't, because clipboard-yank takes no arguments, yet you pass it 'arg'.

+        ((eq this-original-command 'clipboard-yank)
+       (clipboard-yank arg))
         (t (yank arg)))))))

I would also wonder why the menu-bar functions copy/paste are bound to the clipboard-X functions that set x-select-enable... temporarily, but keyboard commands should be bound to cua-paste (and friends).

Wouldn't it be a better solution to make sure clipboard-kill-ring-save and clipboard-yank respect cua-mode?

On a related note, clipboard-yank doesn't respect things like cua-keep-region-after-copy. One can tinker with setting transient-mark-mode to nil, if only temporarily, but that would be yet another hack in an architecture needs a bit more design:

(defun clipboard-kill-ring-save (beg end)
  "Copy region to kill ring, and save in the X clipboard."
  (interactive "r")
  (let ((x-select-enable-clipboard t)
        (transient-mark-mode nil))
    (kill-ring-save beg end)))

The clipboard-functions also don't allow people to do stuff like C-3 H-c as was possible when cua-mode was used. That's where I'm stuck - like I said, the new clipboard functions need to play ball with cua-mode.

reply via email to

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