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

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

Re: send selection or current line to Terminal/iTerm


From: Emanuel Berg
Subject: Re: send selection or current line to Terminal/iTerm
Date: Thu, 12 Jun 2014 17:47:15 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

klebsiella <address@hidden> 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


reply via email to

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