From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Thierry Volpiatto Newsgroups: gmane.emacs.help Subject: Re: Copy Paste in no-x11 mode (emacs -nw) Date: Fri, 26 Sep 2008 12:35:28 +0200 Message-ID: <87hc83p53j.fsf@tux.homenetwork> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1222425670 10903 80.91.229.12 (26 Sep 2008 10:41:10 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 26 Sep 2008 10:41:10 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Sep 26 12:42:08 2008 connect(): Connection refused Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KjAlx-0003QG-JN for geh-help-gnu-emacs@m.gmane.org; Fri, 26 Sep 2008 12:42:05 +0200 Original-Received: from localhost ([127.0.0.1]:46478 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KjAks-00079t-PD for geh-help-gnu-emacs@m.gmane.org; Fri, 26 Sep 2008 06:40:58 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KjAj9-0006lr-1Q for help-gnu-emacs@gnu.org; Fri, 26 Sep 2008 06:39:11 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KjAj6-0006kX-Fk for help-gnu-emacs@gnu.org; Fri, 26 Sep 2008 06:39:09 -0400 Original-Received: from [199.232.76.173] (port=41383 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KjAj6-0006kM-72 for help-gnu-emacs@gnu.org; Fri, 26 Sep 2008 06:39:08 -0400 Original-Received: from nf-out-0910.google.com ([64.233.182.186]:3737) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KjAj6-0006af-AF for help-gnu-emacs@gnu.org; Fri, 26 Sep 2008 06:39:08 -0400 Original-Received: by nf-out-0910.google.com with SMTP id c7so375799nfi.26 for ; Fri, 26 Sep 2008 03:39:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:subject:references :date:in-reply-to:message-id:user-agent:mime-version:content-type; bh=zW6Lu758toTQwmgOLftdxlXsPp/PdEOLqKI2VdOgu68=; b=ZjUxZc64KHhmEpewNex3e+eu0UQHs9/383cg5zPP9wlfxRzWL3zpbRL2dUSmcmKMLv 7qmGpG2qoEJNKXwO5cT/kUATyosfuqiacztBu7ZhkHSewznpeYvprEOEiOAaoPuI5qSu jKKgz+70Um1Xh241ZSgpqNObupc/qsTdAh6xs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:subject:references:date:in-reply-to:message-id:user-agent :mime-version:content-type; b=ncWgCBXp6segguc2HIRmpCKspwwgTDZaOvEoRH0BkxvH7/4ppduqnWDm8iuhsEZyCy OIKE/kCqtQC1VqpD7hriEDg5WgCDm+VN+oEFWITe4WG3iCtCxGn0k937yzDxR72ngynw m4CczLMQ6jJIgwmVwWKfPhDV2zAlUvzmRjKTw= Original-Received: by 10.210.68.17 with SMTP id q17mr1263653eba.82.1222425546839; Fri, 26 Sep 2008 03:39:06 -0700 (PDT) Original-Received: from tux.homenetwork ( [77.197.77.9]) by mx.google.com with ESMTPS id b36sm2543052ika.8.2008.09.26.03.39.04 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 26 Sep 2008 03:39:05 -0700 (PDT) In-Reply-To: (Joost Kremers's message of "26 Sep 2008 08:57:08 GMT") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:58104 Archived-At: 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 " <" and then paste with " ]" -- A + Thierry Volpiatto Location: Saint-Cyr-Sur-Mer - France