all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* copy and paste
@ 2007-01-17 12:45 Roger Mason
  0 siblings, 0 replies; 4+ messages in thread
From: Roger Mason @ 2007-01-17 12:45 UTC (permalink / raw)


Hello,

I'm having trouble copying from other (X) applications into emacs:
whenever I use the middle mouse button I always get pasted the last
entry from the emacs kill ring.

I have the following set, as per the wiki:

x-select-enable-clipboard's value is t

interprogram-paste-function's value is
x-cut-buffer-or-selection-value

Thanks for any help,
Roger Mason

^ permalink raw reply	[flat|nested] 4+ messages in thread
[parent not found: <mailman.3198.1169037917.2155.help-gnu-emacs@gnu.org>]
* copy and paste
@ 2009-01-07  5:35 锁住子
  0 siblings, 0 replies; 4+ messages in thread
From: 锁住子 @ 2009-01-07  5:35 UTC (permalink / raw)
  To: help-gnu-emacs

I found the functions below online somewhere, for easing the process
of copying and pasting between emacs and Mac OSX's clipboard. It
works, but doesn't seem to be encoding aware -- if I kill from a
unicode-encoded buffer and paste into a different osx application (eg
Mail), non-ASCII characters come out garbled. My language environment
is set to UTF-8, is there something I can add in the functions below
that will specify string encoding? I'm trying to achieve all Unicode,
all the time.

Thanks!

Eric


(defun copy-from-osx ()
 (shell-command-to-string "pbpaste"))

(defun paste-to-osx (text &optional push)
 (let ((process-connection-type nil))
   (let ((proc (start-process "pbcopy" "*Messages*" "pbcopy")))
     (process-send-string proc text)
     (process-send-eof proc))))

(setq interprogram-cut-function 'paste-to-osx)
(setq interprogram-paste-function 'copy-from-osx)


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

end of thread, other threads:[~2009-01-07  5:35 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-17 12:45 copy and paste Roger Mason
     [not found] <mailman.3198.1169037917.2155.help-gnu-emacs@gnu.org>
2007-01-18 12:39 ` Martin
2007-01-20 14:50   ` Roger Mason
  -- strict thread matches above, loose matches on Subject: below --
2009-01-07  5:35 锁住子

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.