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

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

Re: Problems with KDE and Clipboard.


From: Emanuel Berg
Subject: Re: Problems with KDE and Clipboard.
Date: Sun, 19 Jan 2014 21:09:55 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

alexandre.bustico@gmail.com writes:

> After a year, did you resolve your problem ? I'am
> interested since still suffering from the same
> problem.

I spent so much time on this acursed X clipboard/Emacs
kill ring many years ago. Half of it worked, the other
half didn't. It always works to insert the X clipboard
at point (and then move point to the end of the
insertion). But to push an item to the X clipboard,
that process never completes. And I don't understand
that because that exact line works in the shell, in a
shell function, and in a script... (though not if the
script is called from Emacs). I'm absolutely sure: it
is a mystery.

(defun insert-X-clipboard ()
  (interactive)
  ;; 1 below = into current buffer
  (shell-command "xclip -d :0 -selection clipboard -o" 1)
  (goto-char (mark)) )

(defun set-X-clipboard ()
  (interactive)
  (let ((str (shell-quote-argument
              (string-make-unibyte (car kill-ring)) ))
        (cmd "xclip -d :0 -selection clipboard") )
    (shell-command (format "echo %s | %s" str cmd)) ))

(insert-X-clipboard) ; works
(set-X-clipboard)    ; hangs

-- 
underground experts united:
http://user.it.uu.se/~embe8573


reply via email to

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