From: Grant Rettke <gcr@wisdomandwonder.com>
To: Quanyang Liu <lqymgt@gmail.com>
Cc: Emacs Help <help-gnu-emacs@gnu.org>
Subject: Re: How to copy and paste from unity to emacs in the terminal version ?
Date: Sat, 16 Aug 2014 07:51:44 -0500 [thread overview]
Message-ID: <CAAjq1mc5RzheObhvREo=_nqVZx6xJ0HgZ5RQ-RMWpp=hVeG2LQ@mail.gmail.com> (raw)
In-Reply-To: <86egwgk6z6.fsf@gmail.com>
Untested:
http://blog.binchen.org/posts/paste-string-from-clipboard-into-minibuffer-in-emacs.html
Grant Rettke | ACM, ASA, FSF, IEEE, SIAM
gcr@wisdomandwonder.com | http://www.wisdomandwonder.com/
“Wisdom begins in wonder.” --Socrates
((λ (x) (x x)) (λ (x) (x x)))
“Life has become immeasurably better since I have been forced to stop
taking it seriously.” --Thompson
On Sat, Aug 16, 2014 at 6:29 AM, Quanyang Liu <lqymgt@gmail.com> wrote:
> On Sat, Aug 16 2014 at 19:09:27 +0800, David Hume wrote:
>> Kro Ly <mnmnmnmna@gmail.com> writes:
>>
>>> Hi, i'm using emacs in the terminal and I'd like to know how to copy
>>> and paste something from firefox to emacs for instance ?
>>> Thanks.
>>
>> That depends on the terminal I think. If it is xterm you can press the
>> middle mouse button to paste.
> Maybe you can try to use xsel. The way I use is below:
>
> ;; use xsel to copy/paste in emacs-nox
> (unless window-system
> (when (getenv "DISPLAY")
> (defun xsel-cut-function (text &optional push)
> (with-temp-buffer
> (insert text)
> (call-process-region (point-min) (point-max) "xsel" nil 0 nil "--clipboard" "--input")))
> (defun xsel-paste-function()
> (let ((xsel-output (shell-command-to-string "xsel --clipboard --output")))
> (unless (string= (car kill-ring) xsel-output)
> xsel-output )))
> (setq interprogram-cut-function 'xsel-cut-function)
> (setq interprogram-paste-function 'xsel-paste-function)
> ))
>
> --
> Quanyang Liu (刘全阳)
> Undergraduate
> Department of Computer Science and Engineering
> Shanghai Jiao Tong University
>
next prev parent reply other threads:[~2014-08-16 12:51 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-16 8:57 How to copy and paste from unity to emacs in the terminal version ? Kro Ly
[not found] ` <7zmwb4vggo.fsf@example.com>
2014-08-16 11:29 ` Quanyang Liu
2014-08-16 12:51 ` Grant Rettke [this message]
[not found] ` <mailman.7137.1408188625.1147.help-gnu-emacs@gnu.org>
2014-08-16 21:45 ` Emanuel Berg
2014-08-17 1:16 ` Quanyang Liu
[not found] ` <mailman.7148.1408238240.1147.help-gnu-emacs@gnu.org>
2014-08-17 2:26 ` Emanuel Berg
2014-08-18 15:22 ` Kro Ly
2014-08-18 15:37 ` Yuri Khan
[not found] ` <7zy4ulojs7.fsf@example.com>
2014-08-18 17:45 ` Subhan Michael Tindall
2014-08-18 17:54 ` Bob Proulx
2014-08-18 18:20 ` Stefan Monnier
2014-08-19 0:17 ` Bob Proulx
2014-08-19 1:41 ` Stefan Monnier
2014-08-18 21:41 ` Emanuel Berg
2014-08-18 22:11 ` Emanuel Berg
[not found] ` <7z7g25za4u.fsf@example.com>
2014-08-18 23:03 ` Emanuel Berg
[not found] ` <7zsiksvpg9.fsf@example.com>
2014-08-19 16:49 ` Emanuel Berg
2014-08-19 22:59 ` Emanuel Berg
[not found] ` <mailman.7192.1408376274.1147.help-gnu-emacs@gnu.org>
2014-08-18 20:12 ` Kro Ly
2014-08-19 2:41 ` Yuri Khan
2014-08-20 5:40 ` Bob Proulx
[not found] ` <mailman.7266.1408513264.1147.help-gnu-emacs@gnu.org>
2014-08-20 17:28 ` Emanuel Berg
2014-08-21 3:43 ` Yuri Khan
[not found] ` <mailman.7303.1408592631.1147.help-gnu-emacs@gnu.org>
2014-08-22 0:09 ` Emanuel Berg
2014-08-16 23:18 ` Emanuel Berg
2014-08-17 1:22 ` Quanyang Liu
[not found] ` <mailman.7149.1408238590.1147.help-gnu-emacs@gnu.org>
2014-08-17 2:34 ` Emanuel Berg
[not found] ` <7zvbpr8qxe.fsf@example.com>
[not found] ` <87sikv9cal.fsf_-_@debian.uxu>
2014-08-17 19:45 ` how to determine if to reply by CC as well (was: Re: How to copy and paste from unity to emacs in the terminal version ?) Emanuel Berg
[not found] ` <7zoavin7e5.fsf@example.com>
2014-08-17 21:53 ` how to determine if to reply by CC as well Emanuel Berg
2014-08-18 0:27 ` Quanyang Liu
2014-08-18 17:46 ` Bob Proulx
2014-08-19 9:07 ` Quanyang Liu
[not found] ` <mailman.7199.1408384010.1147.help-gnu-emacs@gnu.org>
2014-08-18 21:56 ` Emanuel Berg
2014-08-19 0:30 ` Bob Proulx
[not found] ` <mailman.7218.1408408231.1147.help-gnu-emacs@gnu.org>
2014-08-19 1:22 ` Emanuel Berg
2014-08-19 14:25 ` Will Parsons
2014-08-19 14:59 ` Quanyang Liu
2014-08-19 17:06 ` Emanuel Berg
2014-08-18 12:57 ` How to copy and paste from unity to emacs in the terminal version ? Robert Thorpe
2014-08-18 15:46 ` Stefan Monnier
[not found] <7z38cuorvf.fsf@example.com>
2014-08-18 19:02 ` Robert Thorpe
2014-08-18 20:44 ` Dale Snell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAAjq1mc5RzheObhvREo=_nqVZx6xJ0HgZ5RQ-RMWpp=hVeG2LQ@mail.gmail.com' \
--to=gcr@wisdomandwonder.com \
--cc=help-gnu-emacs@gnu.org \
--cc=lqymgt@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.