From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Emanuel Berg Newsgroups: gmane.emacs.help Subject: Re: send selection or current line to Terminal/iTerm Date: Thu, 12 Jun 2014 17:47:15 +0200 Organization: Aioe.org NNTP Server Message-ID: <874mzqw2nw.fsf@debian.uxu> References: <1402261104327-324145.post@n5.nabble.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1402588229 17279 80.91.229.3 (12 Jun 2014 15:50:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 12 Jun 2014 15:50:29 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jun 12 17:50:24 2014 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Wv7Gh-0005dM-Vw for geh-help-gnu-emacs@m.gmane.org; Thu, 12 Jun 2014 17:50:24 +0200 Original-Received: from localhost ([::1]:54462 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wv7Gh-00077F-Ho for geh-help-gnu-emacs@m.gmane.org; Thu, 12 Jun 2014 11:50:23 -0400 Original-Path: usenet.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed.xs4all.nl!newsfeed3a.news.xs4all.nl!xs4all!news.stack.nl!aioe.org!.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 42 Original-NNTP-Posting-Host: SIvZRMPqRkkTHAHL6NkRuw.user.speranza.aioe.org Original-X-Complaints-To: abuse@aioe.org User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) X-Notice: Filtered by postfilter v. 0.8.2 Cancel-Lock: sha1:IqsZdw8TSBwkbHnYhMw9R/RgYO0= Mail-Copies-To: never Original-Xref: usenet.stanford.edu gnu.emacs.help:205907 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:98177 Archived-At: klebsiella writes: > Hi Guys, No reply to my request. Does anyone knows > how to deal with the above mentioned issue or at > least give me some advises/hints? I think you didn't get a reply because the issue was stated so software-specific - I actually never heard of iTerm (or Aquamacs for that matter), though perhaps that is common knowledge... But, I've done a lot of similar stuff from/to Emacs (in a Linux VT) to/from tmux which runs on top of other VTs (or xterm in X). The easiest way is to setup a function in Emacs that writes the line (or region) to a file. Then setup a shortcut in Mac OS X (or iTerm, or the shell that runs in iTerm: bash, zsh, etc. in the Linux world) to insert the line at the cursor position. I can't be more specific but perhaps that'll get you going. If you are familiar with Emacs Lisp, perhaps how I did it [1] for the Linux VTs, tmux, and X - using a tool called xsel - is of interest (which works cross-system as long as X runs) - but most likely it will only confuse you, so try the file solution first, I think :) Depending on how the clipboard works in Mac OS X, you can use the variable interprogram-cut-function to get a completely transparent kill ring. I got that working, but I thought it was too much overhead for every single kill, because many (most) of them are intended either simply to remove stuff, or to yank somewhere else in Emacs. [1] http://user.it.uu.se/~embe8573/conf/emacs-init/x-clipboard.el -- underground experts united: http://user.it.uu.se/~embe8573