all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Copying text from emacs to another application using M-w
@ 2009-09-20  0:17 Corey Foote
  2009-09-20  4:31 ` Wang Lei
  0 siblings, 1 reply; 20+ messages in thread
From: Corey Foote @ 2009-09-20  0:17 UTC (permalink / raw
  To: help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 711 bytes --]





	
	
	
	

When I copy region of text using M-w
I'm able to paste it in Emacs just fine using C-y. However, when I
try to paste it in another application it doesn't seem to have been
copied for use outside of emacs. For this to work, I need to select
the region I wish to copy and choose copy from the menu. Is there
anyway to get it to copy for use outside emacs by using just M-w and
not having to use the menu? I'm using Emacs 23 on Ubuntu 9.04.
Thanks!
 		 	   		  
_________________________________________________________________
Microsoft brings you a new way to search the web.  Try  Bing™ now
http://www.bing.com?form=MFEHPG&publ=WLHMTAG&crea=TEXT_MFEHPG_Core_tagline_try bing_1x1

[-- Attachment #2: Type: text/html, Size: 1162 bytes --]

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Copying text from emacs to another application using M-w
       [not found] <mailman.7074.1253405883.2239.help-gnu-emacs@gnu.org>
@ 2009-09-20  4:06 ` Tim X
  2009-09-20 17:32   ` Harry Putnam
       [not found]   ` <mailman.7102.1253467990.2239.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 20+ messages in thread
From: Tim X @ 2009-09-20  4:06 UTC (permalink / raw
  To: help-gnu-emacs

Corey Foote <coreyfoote@hotmail.com> writes:

> When I copy region of text using M-w I'm able to paste it in Emacs
> just fine using C-y. However, when I try to paste it in another
> application it doesn't seem to have been copied for use outside of
> emacs. For this to work, I need to select the region I wish to copy
> and choose copy from the menu. Is there anyway to get it to copy for
> use outside emacs by using just M-w and not having to use the menu?
> I'm using Emacs 23 on Ubuntu 9.04. Thanks!
>

How are you pasting into the other application? Are you using the middle
mouse button?

I follow the following process and it all works fine.

1. mark the region 
2. cut/copy the region with C-w or M-w
3. Go tot he app I want to paste to
4. Put the cursor where I want to paste and hit the middle mouse button

note that I'm not using CUA mode - not sure if that has any impact.

Tim


>

-- 
tcross (at) rapttech dot com dot au


^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Copying text from emacs to another application using M-w
  2009-09-20  0:17 Corey Foote
@ 2009-09-20  4:31 ` Wang Lei
  0 siblings, 0 replies; 20+ messages in thread
From: Wang Lei @ 2009-09-20  4:31 UTC (permalink / raw
  To: Corey Foote; +Cc: help-gnu-emacs

(setq x-select-enable-clipboard t)
It should be ok.

On 9/20/09, Corey Foote <coreyfoote@hotmail.com> wrote:
>
>
>
>
> 	
> 	
> 	
> 	
>
> When I copy region of text using M-w
> I'm able to paste it in Emacs just fine using C-y. However, when I
> try to paste it in another application it doesn't seem to have been
> copied for use outside of emacs. For this to work, I need to select
> the region I wish to copy and choose copy from the menu. Is there
> anyway to get it to copy for use outside emacs by using just M-w and
> not having to use the menu? I'm using Emacs 23 on Ubuntu 9.04.
> Thanks!
>  		 	   		
> _________________________________________________________________
> Microsoft brings you a new way to search the web.  Try  Bing™ now
> http://www.bing.com?form=MFEHPG&publ=WLHMTAG&crea=TEXT_MFEHPG_Core_tagline_try
> bing_1x1


-- 
Regards,
Lei




^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Copying text from emacs to another application using M-w
  2009-09-20  4:06 ` Copying text from emacs to another application using M-w Tim X
@ 2009-09-20 17:32   ` Harry Putnam
       [not found]   ` <mailman.7102.1253467990.2239.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 20+ messages in thread
From: Harry Putnam @ 2009-09-20 17:32 UTC (permalink / raw
  To: help-gnu-emacs

Tim X <timx@nospam.dev.null> writes:

> How are you pasting into the other application? Are you using the middle
> mouse button?
>
> I follow the following process and it all works fine.
>
> 1. mark the region 
> 2. cut/copy the region with C-w or M-w
> 3. Go tot he app I want to paste to
> 4. Put the cursor where I want to paste and hit the middle mouse button
>
> note that I'm not using CUA mode - not sure if that has any impact.

Tim do you mind posting how you do the other way round.

I mean copy outside emacs. Paste inside emacs.
I keep getting really goofed up when I try that.  Seems to take
several attempts before the paste will happen.

I probably have something set wrong somewhere.  But it seems like the
last copy/kill in emacs is what keeps sticking to clipboard or kill ring or
somewhere I don't want it.  So that when I press middle mouse or C-y
to paste into emacs... I get something from an earlier operation.

I'd like to do this:

1. Mouse or keyboard (or C-a) select a region or `all'  (say in firefox)
2. Middle mouse or C-y to paste that region into emacs.
done







^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Copying text from emacs to another application using M-w
       [not found]   ` <mailman.7102.1253467990.2239.help-gnu-emacs@gnu.org>
@ 2009-09-20 19:39     ` John A Pershing Jr
  2009-09-21  7:58     ` Tim X
  1 sibling, 0 replies; 20+ messages in thread
From: John A Pershing Jr @ 2009-09-20 19:39 UTC (permalink / raw
  To: help-gnu-emacs

Harry Putnam <reader@newsguy.com> writes:

> I'd like to do this:
>
> 1. Mouse or keyboard (or C-a) select a region or `all' (say in firefox)
> 2. Middle mouse or C-y to paste that region into emacs.  done

That's exactly how it's supposed to work "out of the box", although I
can't verify the use of mouse button #2, as I've always and only used
C-y (I learned Emacs back before mice had been invented).  However, the
C-y has to be one of the first things that you do after bringing the
focus back to Emacs.

Perhaps you have something in your .emacs file that is interfering with
this default behavior?

  -jp


^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Copying text from emacs to another application using M-w
       [not found]   ` <mailman.7102.1253467990.2239.help-gnu-emacs@gnu.org>
  2009-09-20 19:39     ` John A Pershing Jr
@ 2009-09-21  7:58     ` Tim X
  2009-09-21  9:59       ` Richard Riley
                         ` (2 more replies)
  1 sibling, 3 replies; 20+ messages in thread
From: Tim X @ 2009-09-21  7:58 UTC (permalink / raw
  To: help-gnu-emacs

Harry Putnam <reader@newsguy.com> writes:

> Tim X <timx@nospam.dev.null> writes:
>
>> How are you pasting into the other application? Are you using the middle
>> mouse button?
>>
>> I follow the following process and it all works fine.
>>
>> 1. mark the region 
>> 2. cut/copy the region with C-w or M-w
>> 3. Go tot he app I want to paste to
>> 4. Put the cursor where I want to paste and hit the middle mouse button
>>
>> note that I'm not using CUA mode - not sure if that has any impact.
>
> Tim do you mind posting how you do the other way round.
>
> I mean copy outside emacs. Paste inside emacs.
> I keep getting really goofed up when I try that.  Seems to take
> several attempts before the paste will happen.
>
> I probably have something set wrong somewhere.  But it seems like the
> last copy/kill in emacs is what keeps sticking to clipboard or kill ring or
> somewhere I don't want it.  So that when I press middle mouse or C-y
> to paste into emacs... I get something from an earlier operation.
>
> I'd like to do this:
>
> 1. Mouse or keyboard (or C-a) select a region or `all'  (say in firefox)
> 2. Middle mouse or C-y to paste that region into emacs.
> done
>

That is essentially what I do. I just tested it with firefox. 

1. Started firefox
2. Using the mouse, highlighted the region of interest. 
3. Switched to emacs
4. click mouse 1 to position the cursor where I want the data to be
pasted, theen hit the middle mouse button to paste it. 

Most of the time, when back in emacs, I wouldn't use the mouse, C-y
pastes the selection as well. 

I don't have any special settings in my .emacs relating to this and I
don't use CUA mode.  Currently running emacs 23 on Debian unstable.

Tim





-- 
tcross (at) rapttech dot com dot au


^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Copying text from emacs to another application using M-w
  2009-09-21  7:58     ` Tim X
@ 2009-09-21  9:59       ` Richard Riley
  2009-09-22 15:59       ` Harry Putnam
       [not found]       ` <mailman.7208.1253635229.2239.help-gnu-emacs@gnu.org>
  2 siblings, 0 replies; 20+ messages in thread
From: Richard Riley @ 2009-09-21  9:59 UTC (permalink / raw
  To: help-gnu-emacs

Tim X <timx@nospam.dev.null> writes:

> Harry Putnam <reader@newsguy.com> writes:
>
>> Tim X <timx@nospam.dev.null> writes:
>>
>>> How are you pasting into the other application? Are you using the middle
>>> mouse button?
>>>
>>> I follow the following process and it all works fine.
>>>
>>> 1. mark the region 
>>> 2. cut/copy the region with C-w or M-w
>>> 3. Go tot he app I want to paste to
>>> 4. Put the cursor where I want to paste and hit the middle mouse button
>>>
>>> note that I'm not using CUA mode - not sure if that has any impact.
>>
>> Tim do you mind posting how you do the other way round.
>>
>> I mean copy outside emacs. Paste inside emacs.
>> I keep getting really goofed up when I try that.  Seems to take
>> several attempts before the paste will happen.
>>
>> I probably have something set wrong somewhere.  But it seems like the
>> last copy/kill in emacs is what keeps sticking to clipboard or kill ring or
>> somewhere I don't want it.  So that when I press middle mouse or C-y
>> to paste into emacs... I get something from an earlier operation.
>>
>> I'd like to do this:
>>
>> 1. Mouse or keyboard (or C-a) select a region or `all'  (say in firefox)
>> 2. Middle mouse or C-y to paste that region into emacs.
>> done
>>
>
> That is essentially what I do. I just tested it with firefox. 
>
> 1. Started firefox
> 2. Using the mouse, highlighted the region of interest. 
> 3. Switched to emacs
> 4. click mouse 1 to position the cursor where I want the data to be
> pasted, theen hit the middle mouse button to paste it. 
>
> Most of the time, when back in emacs, I wouldn't use the mouse, C-y
> pastes the selection as well. 
>
> I don't have any special settings in my .emacs relating to this and I
> don't use CUA mode.  Currently running emacs 23 on Debian unstable.
>
> Tim


Just as a point of interest, I noticed something called xclip.el on the
emacs irc channel. It makes cut/paste between a terminal emacs and an X
emacs much more "obvious" for those of who never quite got why x
clipboard enabled was not the obvious default in order to help
newcomers to emacs. Very useful for emacs 23 daemon.



^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Copying text from emacs to another application using M-w
  2009-09-21  7:58     ` Tim X
  2009-09-21  9:59       ` Richard Riley
@ 2009-09-22 15:59       ` Harry Putnam
       [not found]       ` <mailman.7208.1253635229.2239.help-gnu-emacs@gnu.org>
  2 siblings, 0 replies; 20+ messages in thread
From: Harry Putnam @ 2009-09-22 15:59 UTC (permalink / raw
  To: help-gnu-emacs

Tim X <timx@nospam.dev.null> writes:

>> Tim do you mind posting how you do the other way round.
>>
>> I mean copy outside emacs. Paste inside emacs.
>> I keep getting really goofed up when I try that.  Seems to take
>> several attempts before the paste will happen.
>>
>> I probably have something set wrong somewhere.  But it seems like the
>> last copy/kill in emacs is what keeps sticking to clipboard or kill ring or
>> somewhere I don't want it.  So that when I press middle mouse or C-y
>> to paste into emacs... I get something from an earlier operation.
>>
>> I'd like to do this:
>>
>> 1. Mouse or keyboard (or C-a) select a region or `all'  (say in firefox)
>> 2. Middle mouse or C-y to paste that region into emacs.
>> done
>>
>
> That is essentially what I do. I just tested it with firefox. 
>
> 1. Started firefox
> 2. Using the mouse, highlighted the region of interest. 
> 3. Switched to emacs
> 4. click mouse 1 to position the cursor where I want the data to be
> pasted, theen hit the middle mouse button to paste it. 
>
> Most of the time, when back in emacs, I wouldn't use the mouse, C-y
> pastes the selection as well. 
>
> I don't have any special settings in my .emacs relating to this and I
> don't use CUA mode.  Currently running emacs 23 on Debian unstable.

Here is an example of the kind of thing that keeps aggravating me.

I've run a search with homemade grepping tool in an Xterm window
The search results are printing to screen and running off the viewing
area.

I scroll backup up the xterm buffer and find a file name I want to
open.

Highlight the filename (in xterm buffer) by dragging with left mouse.
In emacs I have done C-x C-f and have the command waiting at the
command prompt for a filename.

Now shift mouse from xterm to emacs window and C-y with emacs.

Whoops it pastes something from a different virtual desktop that was
the last thing copied in a separate instance of emacs running there.

Ok... try it all again: shift mouse back to xterm again left mouse
drag to highlight the filename. shift to emacs left click to bring
focus to command prompt in emacs .. C-y  to paste... whoops again
I get the same item from an earlier copy in a separate instance
of emacs.

Now a third attempt of the same procedure: shift mouse to xterm, left
drag to highlight filename ... shift mouse back to emacs and finally
on the third attempt C-y pastes what I copied from the xterm with
mouse.

Very aggravating... the earlier copy seems stuck to C-y or right click
for several attempts... and finally the copy/paste works.





^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Copying text from emacs to another application using M-w
       [not found]       ` <mailman.7208.1253635229.2239.help-gnu-emacs@gnu.org>
@ 2009-09-22 16:11         ` notbob
  2009-09-22 16:49           ` Harry Putnam
  2009-09-22 19:58         ` despen
  2009-09-23  8:26         ` Tim X
  2 siblings, 1 reply; 20+ messages in thread
From: notbob @ 2009-09-22 16:11 UTC (permalink / raw
  To: help-gnu-emacs

On 2009-09-22, Harry Putnam <reader@newsguy.com> wrote:

> Now a third attempt of the same procedure: shift mouse to xterm, left
> drag to highlight filename ... shift mouse back to emacs and finally
> on the third attempt C-y pastes what I copied from the xterm with

Why do you keep using a mouse function to copy and then an emacs
function to paste?  Stick with one related function.  You did a proper
highlight with the left mouse button to copy.  Now, use the middle
mouse button (or whatever is passing for "middle button" on your
mouse) to paste the text you highlighted.  Works for me.

nb





> mouse.
>
> Very aggravating... the earlier copy seems stuck to C-y or right click
> for several attempts... and finally the copy/paste works.
>
>
>


^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Copying text from emacs to another application using M-w
  2009-09-22 16:11         ` notbob
@ 2009-09-22 16:49           ` Harry Putnam
  2009-09-22 18:08             ` Allan Gottlieb
       [not found]             ` <mailman.7219.1253642900.2239.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 20+ messages in thread
From: Harry Putnam @ 2009-09-22 16:49 UTC (permalink / raw
  To: help-gnu-emacs

notbob <notbob@nothome.com> writes:

> On 2009-09-22, Harry Putnam <reader@newsguy.com> wrote:
>
>> Now a third attempt of the same procedure: shift mouse to xterm, left
>> drag to highlight filename ... shift mouse back to emacs and finally
>> on the third attempt C-y pastes what I copied from the xterm with
>
> Why do you keep using a mouse function to copy and then an emacs
> function to paste?  Stick with one related function.  You did a proper
> highlight with the left mouse button to copy.  Now, use the middle
> mouse button (or whatever is passing for "middle button" on your
> mouse) to paste the text you highlighted.  Works for me.

I did all the same stuff with right click as well. I didn't mention it
because every time I mention that (earlier in the thread) someone will
respond with `I only use C-y'  So I attempted to short circuit that
answer.

In fact all the same things happen whether I stick to middle mouse
click or C-y for the copy.

By the way, there should be no difference whether I use C-y or middle
click.  So that is not the problem.





^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Copying text from emacs to another application using M-w
  2009-09-22 16:49           ` Harry Putnam
@ 2009-09-22 18:08             ` Allan Gottlieb
  2009-09-23  1:38               ` Harry Putnam
       [not found]             ` <mailman.7219.1253642900.2239.help-gnu-emacs@gnu.org>
  1 sibling, 1 reply; 20+ messages in thread
From: Allan Gottlieb @ 2009-09-22 18:08 UTC (permalink / raw
  To: help-gnu-emacs

At Tue, 22 Sep 2009 11:49:47 -0500 Harry Putnam <reader@newsguy.com> wrote:

> notbob <notbob@nothome.com> writes:
>
>> On 2009-09-22, Harry Putnam <reader@newsguy.com> wrote:
>>
>>> Now a third attempt of the same procedure: shift mouse to xterm, left
>>> drag to highlight filename ... shift mouse back to emacs and finally
>>> on the third attempt C-y pastes what I copied from the xterm with
>>
>> Why do you keep using a mouse function to copy and then an emacs
>> function to paste?  Stick with one related function.  You did a proper
>> highlight with the left mouse button to copy.  Now, use the middle
>> mouse button (or whatever is passing for "middle button" on your
>> mouse) to paste the text you highlighted.  Works for me.
>
> I did all the same stuff with right click as well. I didn't mention it
> because every time I mention that (earlier in the thread) someone will
> respond with `I only use C-y'  So I attempted to short circuit that
> answer.
>
> In fact all the same things happen whether I stick to middle mouse
> click or C-y for the copy.
>
> By the way, there should be no difference whether I use C-y or middle
> click.  So that is not the problem.

I though on xterm you don't select simply by highlighting with the
mouse.  After it is highlighted, in xterm try right mouse click and
chose copy.

allan




^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Copying text from emacs to another application using M-w
       [not found]       ` <mailman.7208.1253635229.2239.help-gnu-emacs@gnu.org>
  2009-09-22 16:11         ` notbob
@ 2009-09-22 19:58         ` despen
  2009-09-23  1:41           ` Harry Putnam
  2009-09-23  8:26         ` Tim X
  2 siblings, 1 reply; 20+ messages in thread
From: despen @ 2009-09-22 19:58 UTC (permalink / raw
  To: help-gnu-emacs

Harry Putnam <reader@newsguy.com> writes:

> Here is an example of the kind of thing that keeps aggravating me.
>
> I've run a search with homemade grepping tool in an Xterm window
> The search results are printing to screen and running off the viewing
> area.
>
> I scroll backup up the xterm buffer and find a file name I want to
> open.

Does your home made grepping tool output lines in a format similar to
grep?  It should.

That way you can use M-x grep, change the command string to your home
made tool, then edit the file you want by clicking on the name in
the grep buffer.


^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Copying text from emacs to another application using M-w
  2009-09-22 18:08             ` Allan Gottlieb
@ 2009-09-23  1:38               ` Harry Putnam
  2009-09-23  1:43                 ` Harry Putnam
  0 siblings, 1 reply; 20+ messages in thread
From: Harry Putnam @ 2009-09-23  1:38 UTC (permalink / raw
  To: help-gnu-emacs

Allan Gottlieb <gottlieb@nyu.edu> writes:

>> By the way, there should be no difference whether I use C-y or middle
>> click.  So that is not the problem.
>
> I though on xterm you don't select simply by highlighting with the
> mouse.  After it is highlighted, in xterm try right mouse click and
> chose copy.

Far as I know right mouse is used to extend a selection.  I have no
context menu under linux with right click.

For it has always worked like this:

Start a highlight at line 800 in scrollback buffer
hit down arrow which brings you back to command prompt
the press right mouse to select from line 800 to cmd prompt.

That is it extends the selection.  There is no `copy' option at all. 

Do you have other behavior?





^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Copying text from emacs to another application using M-w
  2009-09-22 19:58         ` despen
@ 2009-09-23  1:41           ` Harry Putnam
  2009-09-23  5:21             ` tomas
  0 siblings, 1 reply; 20+ messages in thread
From: Harry Putnam @ 2009-09-23  1:41 UTC (permalink / raw
  To: help-gnu-emacs

despen@verizon.net writes:

> Harry Putnam <reader@newsguy.com> writes:
>
>> Here is an example of the kind of thing that keeps aggravating me.
>>
>> I've run a search with homemade grepping tool in an Xterm window
>> The search results are printing to screen and running off the viewing
>> area.
>>
>> I scroll backup up the xterm buffer and find a file name I want to
>> open.
>
> Does your home made grepping tool output lines in a format similar to
> grep?  It should.
>
> That way you can use M-x grep, change the command string to your home
> made tool, then edit the file you want by clicking on the name in
> the grep buffer.

Your talking about working inside a running emacs... this thread is
about copying to/from external terminal or application to/from emacs
not from inside emacs.





^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Copying text from emacs to another application using M-w
  2009-09-23  1:38               ` Harry Putnam
@ 2009-09-23  1:43                 ` Harry Putnam
  2009-09-23 17:47                   ` Allan Gottlieb
  0 siblings, 1 reply; 20+ messages in thread
From: Harry Putnam @ 2009-09-23  1:43 UTC (permalink / raw
  To: help-gnu-emacs

Harry Putnam <reader@newsguy.com> writes:

> Allan Gottlieb <gottlieb@nyu.edu> writes:
>
>>> By the way, there should be no difference whether I use C-y or middle
>>> click.  So that is not the problem.
>>
>> I though on xterm you don't select simply by highlighting with the
>> mouse.  After it is highlighted, in xterm try right mouse click and
>> chose copy.
>
> Far as I know right mouse is used to extend a selection.  I have no
> context menu under linux with right click.
>
> For it has always worked like this:
     ^ me






^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Copying text from emacs to another application using M-w
  2009-09-23  1:41           ` Harry Putnam
@ 2009-09-23  5:21             ` tomas
  0 siblings, 0 replies; 20+ messages in thread
From: tomas @ 2009-09-23  5:21 UTC (permalink / raw
  To: Harry Putnam; +Cc: help-gnu-emacs

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Tue, Sep 22, 2009 at 08:41:55PM -0500, Harry Putnam wrote:
> despen@verizon.net writes:
> 
> > Harry Putnam <reader@newsguy.com> writes:

[...]

> Your talking about working inside a running emacs...

It's worth a try, anyway. Grep-find was one of the things which dragged
me to Emacs ;)

But to your original problem...

it sounds very much as if there is some misunderstandings between your
apps to whether they use the "primary" or the "secondary" (or even the
"clipboard") selection (X maintans those three).

Refer to the Emacs manual (section 25.1 "Killing and Yanking on
graphical Displays) as to which selection is set/used whithin Emacs.

(The short story is: C-y takes from the primary selection whenever there
is one -- otherwise take from the top of the kill ring, which is an
Emacs-only stash. The long story is too long for here ;)

There is a command-line utility, xsel, which lets you inspect what's in
a selection. It's not installed by default on modern distros (whereas
they insist on installing an avahi daemon and other useless
abominations, but I disgress). In Debian, for example, there's a package
xsel.

Hope that sets you off in the right direction ;-)

Regards
- -- tomás
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFKubBhBcgs9XrR2kYRAlZsAJ0QbLepTe+X8ewyPhItjhXtnYLbmgCfVhbo
mP0Il0huyIH4XUmZ2V/ucEI=
=5MD+
-----END PGP SIGNATURE-----




^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Copying text from emacs to another application using M-w
       [not found]       ` <mailman.7208.1253635229.2239.help-gnu-emacs@gnu.org>
  2009-09-22 16:11         ` notbob
  2009-09-22 19:58         ` despen
@ 2009-09-23  8:26         ` Tim X
  2009-09-24 13:47           ` Harry Putnam
  2 siblings, 1 reply; 20+ messages in thread
From: Tim X @ 2009-09-23  8:26 UTC (permalink / raw
  To: help-gnu-emacs

Harry Putnam <reader@newsguy.com> writes:

> Tim X <timx@nospam.dev.null> writes:
>
>>> Tim do you mind posting how you do the other way round.
>>>
>>> I mean copy outside emacs. Paste inside emacs.
>>> I keep getting really goofed up when I try that.  Seems to take
>>> several attempts before the paste will happen.
>>>
>>> I probably have something set wrong somewhere.  But it seems like the
>>> last copy/kill in emacs is what keeps sticking to clipboard or kill ring or
>>> somewhere I don't want it.  So that when I press middle mouse or C-y
>>> to paste into emacs... I get something from an earlier operation.
>>>
>>> I'd like to do this:
>>>
>>> 1. Mouse or keyboard (or C-a) select a region or `all'  (say in firefox)
>>> 2. Middle mouse or C-y to paste that region into emacs.
>>> done
>>>
>>
>> That is essentially what I do. I just tested it with firefox. 
>>
>> 1. Started firefox
>> 2. Using the mouse, highlighted the region of interest. 
>> 3. Switched to emacs
>> 4. click mouse 1 to position the cursor where I want the data to be
>> pasted, theen hit the middle mouse button to paste it. 
>>
>> Most of the time, when back in emacs, I wouldn't use the mouse, C-y
>> pastes the selection as well. 
>>
>> I don't have any special settings in my .emacs relating to this and I
>> don't use CUA mode.  Currently running emacs 23 on Debian unstable.
>
> Here is an example of the kind of thing that keeps aggravating me.
>
> I've run a search with homemade grepping tool in an Xterm window
> The search results are printing to screen and running off the viewing
> area.
>
> I scroll backup up the xterm buffer and find a file name I want to
> open.
>
> Highlight the filename (in xterm buffer) by dragging with left mouse.
> In emacs I have done C-x C-f and have the command waiting at the
> command prompt for a filename.
>
> Now shift mouse from xterm to emacs window and C-y with emacs.
>
> Whoops it pastes something from a different virtual desktop that was
> the last thing copied in a separate instance of emacs running there.
>
> Ok... try it all again: shift mouse back to xterm again left mouse
> drag to highlight the filename. shift to emacs left click to bring
> focus to command prompt in emacs .. C-y  to paste... whoops again
> I get the same item from an earlier copy in a separate instance
> of emacs.
>
> Now a third attempt of the same procedure: shift mouse to xterm, left
> drag to highlight filename ... shift mouse back to emacs and finally
> on the third attempt C-y pastes what I copied from the xterm with
> mouse.
>
> Very aggravating... the earlier copy seems stuck to C-y or right click
> for several attempts... and finally the copy/paste works.
>
Hi Harry,

when I read your post of how your working, I thought maybe there are
some 'different' key bindings in the mini-buffer. I sometimes get bitten
in a similar way when using i-search and you want to paste in something
you have highlihgted as the search string - I then realised I needed to
use M-y rather than C-y in that situation. 

So, I tried your exact scenario. I am sorry to report that I could not
reproduce your problem. It worked perfectly for me each time, regardless
of whether I used the keyborad or the mouse.  I first did a simple ls
listing in an xterm, highlighted one of the files in the listing and
pasted that as the file to open with C-x C-f. I tried it both with C-x
C-f already waiting for input and with issuing the command after doing
the highlighting of the file to use. I then did a grep for a patter and
got a list of different files with that pattern, selected one of the
files with the mouse in the xterm and tried pasting it as the argument
to open file, but cold not reproduce your issues. All worked fine for me.

Are you using anything like ido, icycles etc? I'm stock standard out of
the box with none of the 'advanced' enhancements to the mini-buffer. I'm
also using a real three button mouse, not one with 2 buttons set to
emulate a 3 button one. I also cut from an xterm rather than some other
terminal emulator, like gnomre-terminal (I'm not saying this means
anything, just trying to eliminate possible differences between our
setup). I'm also running a recent CVS build (about 5 days old) of emacs
23. I do not have any settings in my .emacs relating to clipboard or
anything else - all at default values. I am running emacspeak and it is
possible it has modified something I'm not aware of.

Tim


-- 
tcross (at) rapttech dot com dot au


^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Copying text from emacs to another application using M-w
       [not found]             ` <mailman.7219.1253642900.2239.help-gnu-emacs@gnu.org>
@ 2009-09-23  8:29               ` Tim X
  0 siblings, 0 replies; 20+ messages in thread
From: Tim X @ 2009-09-23  8:29 UTC (permalink / raw
  To: help-gnu-emacs

Allan Gottlieb <gottlieb@nyu.edu> writes:

> At Tue, 22 Sep 2009 11:49:47 -0500 Harry Putnam <reader@newsguy.com> wrote:
>
>> notbob <notbob@nothome.com> writes:
>>
>>> On 2009-09-22, Harry Putnam <reader@newsguy.com> wrote:
>>>
>>>> Now a third attempt of the same procedure: shift mouse to xterm, left
>>>> drag to highlight filename ... shift mouse back to emacs and finally
>>>> on the third attempt C-y pastes what I copied from the xterm with
>>>
>>> Why do you keep using a mouse function to copy and then an emacs
>>> function to paste?  Stick with one related function.  You did a proper
>>> highlight with the left mouse button to copy.  Now, use the middle
>>> mouse button (or whatever is passing for "middle button" on your
>>> mouse) to paste the text you highlighted.  Works for me.
>>
>> I did all the same stuff with right click as well. I didn't mention it
>> because every time I mention that (earlier in the thread) someone will
>> respond with `I only use C-y'  So I attempted to short circuit that
>> answer.
>>
>> In fact all the same things happen whether I stick to middle mouse
>> click or C-y for the copy.
>>
>> By the way, there should be no difference whether I use C-y or middle
>> click.  So that is not the problem.
>
> I though on xterm you don't select simply by highlighting with the
> mouse.  After it is highlighted, in xterm try right mouse click and
> chose copy.
>

I just highlight with the mouse and thats it. No need to right click
anything. This is with an xterm. 
>
>Tim


-- 
tcross (at) rapttech dot com dot au


^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Copying text from emacs to another application using M-w
  2009-09-23  1:43                 ` Harry Putnam
@ 2009-09-23 17:47                   ` Allan Gottlieb
  0 siblings, 0 replies; 20+ messages in thread
From: Allan Gottlieb @ 2009-09-23 17:47 UTC (permalink / raw
  To: help-gnu-emacs

At Tue, 22 Sep 2009 20:43:43 -0500 Harry Putnam <reader@newsguy.com> wrote:

> Harry Putnam <reader@newsguy.com> writes:
>
>> Allan Gottlieb <gottlieb@nyu.edu> writes:
>>
>>>> By the way, there should be no difference whether I use C-y or middle
>>>> click.  So that is not the problem.
>>>
>>> I though on xterm you don't select simply by highlighting with the
>>> mouse.  After it is highlighted, in xterm try right mouse click and
>>> chose copy.
>>
>> Far as I know right mouse is used to extend a selection.  I have no
>> context menu under linux with right click.
>>
>> For it has always worked like this:
>      ^ me

My error, I was thinking of gnome-terminal not xterm.
sorry,
allan




^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: Copying text from emacs to another application using M-w
  2009-09-23  8:26         ` Tim X
@ 2009-09-24 13:47           ` Harry Putnam
  0 siblings, 0 replies; 20+ messages in thread
From: Harry Putnam @ 2009-09-24 13:47 UTC (permalink / raw
  To: help-gnu-emacs

Tim X <timx@nospam.dev.null> writes:


[...]

> Hi Harry,
>
> when I read your post of how your working, I thought maybe there are
> some 'different' key bindings in the mini-buffer. I sometimes get bitten
> in a similar way when using i-search and you want to paste in something
> you have highlihgted as the search string - I then realised I needed to
> use M-y rather than C-y in that situation. 
>
> So, I tried your exact scenario. I am sorry to report that I could not
> reproduce your problem. It worked perfectly for me each time, regardless

[...]

Thanks for taking time to test and report the details.

> Are you using anything like ido, icycles etc? I'm stock standard out of
> the box with none of the 'advanced' enhancements to the mini-buffer. I'm
> also using a real three button mouse, not one with 2 buttons set to
> emulate a 3 button one. I also cut from an xterm rather than some other
> terminal emulator, like gnomre-terminal (I'm not saying this means
> anything, just trying to eliminate possible differences between our
> setup). I'm also running a recent CVS build (about 5 days old) of emacs
> 23. I do not have any settings in my .emacs relating to clipboard or
> anything else - all at default values. I am running emacspeak and it is
> possible it has modified something I'm not aware of.

Ditto to all of the above, except `emacsspeak', including copying from
genuine xterm of Thomas Dickie fame, not one of the pretenders to the
throne and using an actual 3 button mouse.

Oddly, I am not always able to reproduce the problem either.  Which
probably means there is something else involved the times I see the
problem.   Something I haven't really noticed yet so did not include
in my complaint.

Possibly some shortcoming due to wear on the mouse itself?  Its a
razor prosolutions pro V 1.6 ( I got it for exacting work in Photoshop
but it kind of took over all mouse duties)

But for that matter... it if never occurs again from here on I'll be a
happy camper.   But I think not... since it has recurred enough to
prompt me to complain here about it.

Being more conscious of the problem and looking for it to recur... I
haven't got lucky (unlucky) yet... That is, I haven't been able to
reproduce it in several tries now.





^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2009-09-24 13:47 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <mailman.7074.1253405883.2239.help-gnu-emacs@gnu.org>
2009-09-20  4:06 ` Copying text from emacs to another application using M-w Tim X
2009-09-20 17:32   ` Harry Putnam
     [not found]   ` <mailman.7102.1253467990.2239.help-gnu-emacs@gnu.org>
2009-09-20 19:39     ` John A Pershing Jr
2009-09-21  7:58     ` Tim X
2009-09-21  9:59       ` Richard Riley
2009-09-22 15:59       ` Harry Putnam
     [not found]       ` <mailman.7208.1253635229.2239.help-gnu-emacs@gnu.org>
2009-09-22 16:11         ` notbob
2009-09-22 16:49           ` Harry Putnam
2009-09-22 18:08             ` Allan Gottlieb
2009-09-23  1:38               ` Harry Putnam
2009-09-23  1:43                 ` Harry Putnam
2009-09-23 17:47                   ` Allan Gottlieb
     [not found]             ` <mailman.7219.1253642900.2239.help-gnu-emacs@gnu.org>
2009-09-23  8:29               ` Tim X
2009-09-22 19:58         ` despen
2009-09-23  1:41           ` Harry Putnam
2009-09-23  5:21             ` tomas
2009-09-23  8:26         ` Tim X
2009-09-24 13:47           ` Harry Putnam
2009-09-20  0:17 Corey Foote
2009-09-20  4:31 ` Wang Lei

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.