* RE: pasting text from other program in emacs
2010-12-31 19:38 pasting text from other program in emacs Javier
@ 2010-12-31 20:20 ` Drew Adams
2010-12-31 20:40 ` Bill O'Connor
` (8 subsequent siblings)
9 siblings, 0 replies; 16+ messages in thread
From: Drew Adams @ 2010-12-31 20:20 UTC (permalink / raw)
To: 'Javier', help-gnu-emacs
> Does anybody know how to do to paste text from external
> programs into an emacs window?
Yes, someone does. ;-)
> I am using emacs 23.2.1 and debian Squezze. Is this a new
> "feature" of emacs 23?
Is what a new feature? pasting text in Emacs copied from outside it? No.
> is it because of the usage of gtk libraries?
Is what because of that?
> It happens in X and also in the console if I try to
> paste text with gpm.
"It happens." What happens?
Please provide a step-by-step recipe, starting from emacs -Q. Include which
keys you hit (in Emacs and outside), what effect you expect, and what effect you
see instead.
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: pasting text from other program in emacs
2010-12-31 19:38 pasting text from other program in emacs Javier
2010-12-31 20:20 ` Drew Adams
@ 2010-12-31 20:40 ` Bill O'Connor
2011-01-01 3:05 ` Ugly Ƨǝɒɳ
2010-12-31 20:58 ` Peter Dyballa
` (7 subsequent siblings)
9 siblings, 1 reply; 16+ messages in thread
From: Bill O'Connor @ 2010-12-31 20:40 UTC (permalink / raw)
To: Javier; +Cc: help-gnu-emacs
Javier <javier@nospam.com> writes:
> Does anybody know how to do to paste text from external programs into
> an emacs window? I am using emacs 23.2.1 and debian Squezze. Is this
> a new "feature" of emacs 23? is it because of the usage of gtk
> libraries? It happens in X and also in the console if I try to paste
> text with gpm.
When you drag the original text with the left mouse button and paste it
into emacs with the middle button, what happens?
^ permalink raw reply [flat|nested] 16+ messages in thread
* RE: pasting text from other program in emacs
2010-12-31 20:40 ` Bill O'Connor
@ 2011-01-01 3:05 ` Ugly Ƨǝɒɳ
0 siblings, 0 replies; 16+ messages in thread
From: Ugly Ƨǝɒɳ @ 2011-01-01 3:05 UTC (permalink / raw)
To: help-gnu-emacs
I admit I have really no problem doing this.
Mind you - I use Windows, but I've successfully copied text from the browser and then used the paste button (as opposed to ctl-Y) and it works quite well for me.
Until recently I was using Xemacs but realizing it may have very little future I've switched to GNU Emacs 23.2.1
-----Original Message-----
From: help-gnu-emacs-bounces+schwa=rogers.com@gnu.org [mailto:help-gnu-emacs-bounces+schwa=rogers.com@gnu.org] On Behalf Of Bill O'Connor
Sent: Friday, December 31, 2010 3:40 PM
To: Javier
Cc: help-gnu-emacs@gnu.org
Subject: Re: pasting text from other program in emacs
Javier <javier@nospam.com> writes:
> Does anybody know how to do to paste text from external programs into
> an emacs window? I am using emacs 23.2.1 and debian Squezze. Is this
> a new "feature" of emacs 23? is it because of the usage of gtk
> libraries? It happens in X and also in the console if I try to paste
> text with gpm.
When you drag the original text with the left mouse button and paste it into emacs with the middle button, what happens?
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: pasting text from other program in emacs
2010-12-31 19:38 pasting text from other program in emacs Javier
2010-12-31 20:20 ` Drew Adams
2010-12-31 20:40 ` Bill O'Connor
@ 2010-12-31 20:58 ` Peter Dyballa
[not found] ` <mailman.1.1293828063.23968.help-gnu-emacs@gnu.org>
` (6 subsequent siblings)
9 siblings, 0 replies; 16+ messages in thread
From: Peter Dyballa @ 2010-12-31 20:58 UTC (permalink / raw)
To: Javier; +Cc: help-gnu-emacs
Am 31.12.2010 um 20:38 schrieb Javier:
> Does anybody know how to do to paste text from external programs
> into an
> emacs window?
Down-mouse-2 or mouse-2 yanks. Usually the mouse's middle button, and
mostly the same for left and right handed people.
Does the external programme paste to clipboard X selections (primary,
secondary) at all?
--
Greetings
Pete
Sending unsolicited commercial eMail to this account incurs a fee of €
500 per message and acknowledges the legality of this contract.
^ permalink raw reply [flat|nested] 16+ messages in thread
[parent not found: <mailman.1.1293828063.23968.help-gnu-emacs@gnu.org>]
* Re: pasting text from other program in emacs
[not found] ` <mailman.1.1293828063.23968.help-gnu-emacs@gnu.org>
@ 2010-12-31 21:22 ` Javier
0 siblings, 0 replies; 16+ messages in thread
From: Javier @ 2010-12-31 21:22 UTC (permalink / raw)
To: help-gnu-emacs
That might work under gnome/kde but I don't use it.
Bill O'Connor <billyoc@gmail.com> wrote:
> Javier <javier@nospam.com> writes:
>
>> Does anybody know how to do to paste text from external programs into
>> an emacs window? I am using emacs 23.2.1 and debian Squezze. Is this
>> a new "feature" of emacs 23? is it because of the usage of gtk
>> libraries? It happens in X and also in the console if I try to paste
>> text with gpm.
>
> When you drag the original text with the left mouse button and paste it
> into emacs with the middle button, what happens?
>
^ permalink raw reply [flat|nested] 16+ messages in thread
[parent not found: <mailman.0.1293826906.23968.help-gnu-emacs@gnu.org>]
* Re: pasting text from other program in emacs
[not found] ` <mailman.0.1293826906.23968.help-gnu-emacs@gnu.org>
@ 2010-12-31 21:30 ` Javier
0 siblings, 0 replies; 16+ messages in thread
From: Javier @ 2010-12-31 21:30 UTC (permalink / raw)
To: help-gnu-emacs
>> I am using emacs 23.2.1 and debian Squezze. Is this a new
>> "feature" of emacs 23?
>
> Is what a new feature? pasting text in Emacs copied from outside it? No.
>
>> is it because of the usage of gtk libraries?
>
> Is what because of that?
>
As emacs23 is compiled with gtk libraries (at least the version of it
that comes with debian), those libraries might be responsible of the
behaviour of copy-paste.
>> It happens in X and also in the console if I try to
>> paste text with gpm.
>
> "It happens." What happens?
>
I cannot paste text between different X applications/ttys in console mode.
I get the message "Kill-Ring is empty".
> Please provide a step-by-step recipe, starting from emacs -Q. Include which
> keys you hit (in Emacs and outside), what effect you expect, and what effect you
> see instead.
>
>
I select text in xterm with left-mouse-button, I try to paste it into
emacs with central-mouse-button and I get the message "Kill ring is
empty".
The same happens in console mode when I try to paste text between
different virtual ttys.
^ permalink raw reply [flat|nested] 16+ messages in thread
* pasting text from other program in emacs
2010-12-31 19:38 pasting text from other program in emacs Javier
` (4 preceding siblings ...)
[not found] ` <mailman.0.1293826906.23968.help-gnu-emacs@gnu.org>
@ 2011-01-01 15:30 ` Steve Revilak
2011-01-01 20:13 ` Jonathan Groll
2011-01-01 19:12 ` prad
` (3 subsequent siblings)
9 siblings, 1 reply; 16+ messages in thread
From: Steve Revilak @ 2011-01-01 15:30 UTC (permalink / raw)
To: help-gnu-emacs
[-- Attachment #1: Type: text/plain, Size: 519 bytes --]
>From: Javier <javier@nospam.com>
>Does anybody know how to do to paste text from external programs into an
>emacs window? I am using emacs 23.2.1 and debian Squezze.
Copy the external program's text to your window manager's clipboard;
then, in an emacs buffer, press C-y to paste the clipboard contents
into the buffer.
You may also want to have a look at
M-x describe-variable x-select-enable-clipboard RET
> Is this a new "feature" of emacs 23?
Clipboard access is not a new feature of emacs 23.
Steve
[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: pasting text from other program in emacs
2011-01-01 15:30 ` Steve Revilak
@ 2011-01-01 20:13 ` Jonathan Groll
0 siblings, 0 replies; 16+ messages in thread
From: Jonathan Groll @ 2011-01-01 20:13 UTC (permalink / raw)
To: help-gnu-emacs
On Sat, 1 Jan 2011 10:30:37 -0500, Steve Revilak <steve@srevilak.net> wrote:
> [1 <text/plain; us-ascii (7bit)>]
> >From: Javier <javier@nospam.com>
>
> >Does anybody know how to do to paste text from external programs into an
> >emacs window? I am using emacs 23.2.1 and debian Squezze.
>
> Copy the external program's text to your window manager's clipboard;
> then, in an emacs buffer, press C-y to paste the clipboard contents
> into the buffer.
You might also want to try the IBM CUA keybinding of Shift-Insert to
perform a 'paste/yank'.
Cheers,
Jonathan
--
jjg: Jonathan J. Groll : groll co za
has_one { :blog => "http://bloggroll.com" }
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: pasting text from other program in emacs
2010-12-31 19:38 pasting text from other program in emacs Javier
` (5 preceding siblings ...)
2011-01-01 15:30 ` Steve Revilak
@ 2011-01-01 19:12 ` prad
[not found] ` <mailman.1.1293909164.32515.help-gnu-emacs@gnu.org>
` (2 subsequent siblings)
9 siblings, 0 replies; 16+ messages in thread
From: prad @ 2011-01-01 19:12 UTC (permalink / raw)
To: help-gnu-emacs
Javier <javier@nospam.com> writes:
> Does anybody know how to do to paste text from external programs into an
> emacs window? I am using emacs 23.2.1 and debian Squezze. Is this a
>
possibly i am misunderstanding, but with linux all i've done is select
text with the mouse-1 and mouse-2 for the paste. this doesn't work in a
console emacs (emacs -nw) unless you active the mouse in .emacs with
(xterm-mouse-mode)
and then hold shift down before doing mouse-2.
--
in friendship,
prad
^ permalink raw reply [flat|nested] 16+ messages in thread
[parent not found: <mailman.1.1293909164.32515.help-gnu-emacs@gnu.org>]
* Re: pasting text from other program in emacs
[not found] ` <mailman.1.1293909164.32515.help-gnu-emacs@gnu.org>
@ 2011-01-01 21:05 ` Javier
0 siblings, 0 replies; 16+ messages in thread
From: Javier @ 2011-01-01 21:05 UTC (permalink / raw)
To: help-gnu-emacs
I think I have always been able to paste in emacs in the console, at
least in previous versions. I think this has to do with the fact that
emacs console seems to have more control on what it does with the mouse,
for example, now it is able to scroll text with the mouse in console.
xterm-mouse-mode only works in X and there should be an equivalent
somewhere for it in the console.
prad <prad@towardsfreedom.com> wrote:
> Javier <javier@nospam.com> writes:
>
>> Does anybody know how to do to paste text from external programs into an
>> emacs window? I am using emacs 23.2.1 and debian Squezze. Is this a
>>
> possibly i am misunderstanding, but with linux all i've done is select
> text with the mouse-1 and mouse-2 for the paste. this doesn't work in a
> console emacs (emacs -nw) unless you active the mouse in .emacs with
> (xterm-mouse-mode)
> and then hold shift down before doing mouse-2.
>
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: pasting text from other program in emacs
2010-12-31 19:38 pasting text from other program in emacs Javier
` (7 preceding siblings ...)
[not found] ` <mailman.1.1293909164.32515.help-gnu-emacs@gnu.org>
@ 2011-01-04 13:58 ` Giacomo Boffi
2011-01-04 14:27 ` Richard Riley
2011-04-13 17:00 ` Hermann Kleier
9 siblings, 1 reply; 16+ messages in thread
From: Giacomo Boffi @ 2011-01-04 13:58 UTC (permalink / raw)
To: help-gnu-emacs
Javier <javier@nospam.com> writes:
> Does anybody know how to do to paste text from external programs
> into an emacs window? I am using emacs 23.2.1 and debian Squeeze.
$ apt-get remove emacs23-gtk
$ apt-get install emacs23-lucid
--
BLOWN UP BY FOUR DESTROYERS. ENGAGING PLOT DEVICE. U-890.
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: pasting text from other program in emacs
2011-01-04 13:58 ` Giacomo Boffi
@ 2011-01-04 14:27 ` Richard Riley
2011-01-04 20:51 ` Jonathan Groll
[not found] ` <mailman.0.1294174308.5476.help-gnu-emacs@gnu.org>
0 siblings, 2 replies; 16+ messages in thread
From: Richard Riley @ 2011-01-04 14:27 UTC (permalink / raw)
To: help-gnu-emacs
Giacomo Boffi <giacomo.boffi@polimi.it> writes:
> Javier <javier@nospam.com> writes:
>
>> Does anybody know how to do to paste text from external programs
>> into an emacs window? I am using emacs 23.2.1 and debian Squeeze.
>
> $ apt-get remove emacs23-gtk
> $ apt-get install emacs23-lucid
This seems very strange advice. How does this solve the problem better
than the documented emacs clipboard variables?
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: pasting text from other program in emacs
2011-01-04 14:27 ` Richard Riley
@ 2011-01-04 20:51 ` Jonathan Groll
[not found] ` <mailman.0.1294174308.5476.help-gnu-emacs@gnu.org>
1 sibling, 0 replies; 16+ messages in thread
From: Jonathan Groll @ 2011-01-04 20:51 UTC (permalink / raw)
To: help-gnu-emacs
On Tue, 04 Jan 2011 15:27:38 +0100, Richard Riley <rileyrg@googlemail.com> wrote:
> Giacomo Boffi <giacomo.boffi@polimi.it> writes:
>
> > Javier <javier@nospam.com> writes:
> >
> >> Does anybody know how to do to paste text from external programs
> >> into an emacs window? I am using emacs 23.2.1 and debian Squeeze.
> >
> > $ apt-get remove emacs23-gtk
> > $ apt-get install emacs23-lucid
>
> This seems very strange advice. How does this solve the problem better
> than the documented emacs clipboard variables?
This has been a very long thread and I may have forgotten now, but I
think the original poster had problems only with copy/paste in `emacs
-nw`.
Hence, emacs22-nox which may be optimised for terminal copy/paste.
Like most of us here I use graphical Emacs though.
In any case, I've been doing some reading tonight and found this
interesting link:
http://shreevatsa.wordpress.com/2006/10/22/emacs-copypaste-and-x/
Which leads to this:
http://hugoheden.wordpress.com/2009/03/08/copypaste-with-emacs-in-terminal/
The provided code makes use of xsel to set the X selection for
terminal based Emacs.
And, this seems to have been covered here before as the code in the
last article has a credit "to Nikolaj Schumacher and Miles Bader on
the help-gnu-emacs mailing list".
Cheers,
Jonathan
--
jjg: Jonathan J. Groll : groll co za
has_one { :blog => "http://bloggroll.com" }
^ permalink raw reply [flat|nested] 16+ messages in thread
[parent not found: <mailman.0.1294174308.5476.help-gnu-emacs@gnu.org>]
* Re: pasting text from other program in emacs
[not found] ` <mailman.0.1294174308.5476.help-gnu-emacs@gnu.org>
@ 2011-01-05 6:31 ` Javier
0 siblings, 0 replies; 16+ messages in thread
From: Javier @ 2011-01-05 6:31 UTC (permalink / raw)
To: help-gnu-emacs
Many thanks for all this info.
I have found another way of solving the behaviour of emacs in
console: run it through gnu/screen; that way the effect of the
mouse buttons is processed by gnu/screen, not by emacs.
Jonathan Groll <lists@groll.co.za> wrote:
> On Tue, 04 Jan 2011 15:27:38 +0100, Richard Riley <rileyrg@googlemail.com> wrote:
>
>> Giacomo Boffi <giacomo.boffi@polimi.it> writes:
>>
>> > Javier <javier@nospam.com> writes:
>> >
>> >> Does anybody know how to do to paste text from external programs
>> >> into an emacs window? I am using emacs 23.2.1 and debian Squeeze.
>> >
>> > $ apt-get remove emacs23-gtk
>> > $ apt-get install emacs23-lucid
>>
>> This seems very strange advice. How does this solve the problem better
>> than the documented emacs clipboard variables?
>
> This has been a very long thread and I may have forgotten now, but I
> think the original poster had problems only with copy/paste in `emacs
> -nw`.
>
> Hence, emacs22-nox which may be optimised for terminal copy/paste.
> Like most of us here I use graphical Emacs though.
>
> In any case, I've been doing some reading tonight and found this
> interesting link:
>
> http://shreevatsa.wordpress.com/2006/10/22/emacs-copypaste-and-x/
>
> Which leads to this:
> http://hugoheden.wordpress.com/2009/03/08/copypaste-with-emacs-in-terminal/
>
> The provided code makes use of xsel to set the X selection for
> terminal based Emacs.
>
> And, this seems to have been covered here before as the code in the
> last article has a credit "to Nikolaj Schumacher and Miles Bader on
> the help-gnu-emacs mailing list".
>
> Cheers,
> Jonathan
> --
> jjg: Jonathan J. Groll : groll co za
> has_one { :blog => "http://bloggroll.com" }
>
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: pasting text from other program in emacs
2010-12-31 19:38 pasting text from other program in emacs Javier
` (8 preceding siblings ...)
2011-01-04 13:58 ` Giacomo Boffi
@ 2011-04-13 17:00 ` Hermann Kleier
9 siblings, 0 replies; 16+ messages in thread
From: Hermann Kleier @ 2011-04-13 17:00 UTC (permalink / raw)
To: help-gnu-emacs
Javier <javier <at> nospam.com> writes:
>
> Hi,
>
> Does anybody know how to do to paste text from external programs into an
> emacs window? I am using emacs 23.2.1 and debian Squezze. Is this a
> new "feature" of emacs 23? is it because of the usage of gtk libraries?
> It happens in X and also in the console if I try to paste text with gpm.
>
>
The magic comes from the file "t-mouse.el" which is part of the gpm-package. The
file has been included in the emacs-package (revision 22.2) and slighly
modified. See the comments for details. In the package "emacs23-el
23+1-4ubuntu7" most of the goodies have been removed and the gpm-support of
emacs is really poor since then. The cure is to use the 22.2 sources.
^ permalink raw reply [flat|nested] 16+ messages in thread