[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Copy Paste in no-x11 mode (emacs -nw)
From: |
Thierry Volpiatto |
Subject: |
Re: Copy Paste in no-x11 mode (emacs -nw) |
Date: |
Fri, 26 Sep 2008 12:35:28 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) |
Second part, using screen to communicate (kill/yank)
between terminal/emacs.
With this code you can copy text in emacs and retrieve it in screen.
,----
| (defun tv-copy-for-screen (beg end)
| (interactive "r")
| (let ((k-region (buffer-substring-no-properties beg end))
| (require-final-newline nil))
| (save-excursion
| (find-file "~/.screen_exchange")
| (goto-char (point-min))
| (erase-buffer)
| (insert (replace-regexp-in-string "\n" "" k-region))
| (save-buffer)
| (kill-buffer (current-buffer)))))
|
| (global-set-key (kbd "C-c C") 'tv-copy-for-screen)
`----
When you are in screen, first read paste-buffer with
"<screen-prefix-key> <"
and then paste with "<screen-prefix-key> ]"
--
A + Thierry Volpiatto
Location: Saint-Cyr-Sur-Mer - France
- Re: Copy Paste in no-x11 mode (emacs -nw), (continued)
Re: Copy Paste in no-x11 mode (emacs -nw), Sébastien Vauban, 2008/09/26
Re: Copy Paste in no-x11 mode (emacs -nw), Simeon Nifos, 2008/09/26
Re: Copy Paste in no-x11 mode (emacs -nw), Dan Espen, 2008/09/26