all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Copy/Paste from console emacs client
@ 2010-01-04  4:43 Richard Riley
  2010-01-04 12:45 ` Richard Riley
  0 siblings, 1 reply; 6+ messages in thread
From: Richard Riley @ 2010-01-04  4:43 UTC (permalink / raw
  To: help-gnu-emacs


OK, <deep breath>, I've been trying to get some half sensible cut/paste
going with emacs (x and console) and other apps.

The one that has me stumped is uing M-w to copy in console emacs - why
can than not be made the primary and clipboard X contents if X is
running? The issue is that the interprogram cut function calls
x-select-text which determines that the emacs frame is not X and
therefore does not set the X buckets.

Is there an easy way around this? It seems (to me who is tired and
confused) that it would be better to just set the X buckets if X is
running, not if the emacs itself is an x frame.

(I am running emacsclient -nw in urxvt)

regards

r.





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

* Re: Copy/Paste from console emacs client
  2010-01-04  4:43 Copy/Paste from console emacs client Richard Riley
@ 2010-01-04 12:45 ` Richard Riley
  2010-01-04 13:03   ` Leo
                     ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Richard Riley @ 2010-01-04 12:45 UTC (permalink / raw
  To: help-gnu-emacs

Richard Riley <rileyrgdev@gmail.com> writes:

> OK, <deep breath>, I've been trying to get some half sensible cut/paste
> going with emacs (x and console) and other apps.
>
> The one that has me stumped is uing M-w to copy in console emacs - why
> can than not be made the primary and clipboard X contents if X is
> running? The issue is that the interprogram cut function calls
> x-select-text which determines that the emacs frame is not X and
> therefore does not set the X buckets.
>
> Is there an easy way around this? It seems (to me who is tired and
> confused) that it would be better to just set the X buckets if X is
> running, not if the emacs itself is an x frame.
>
> (I am running emacsclient -nw in urxvt)
>
> regards
>
> r.
>

This thread (not Ubuntu specific) discusses the issues quite well :

 
http://ubuntuforums.org/showthread.php?t=539888


The first, probably naive, solution that comes to mind is for emacs to
use xclip or equiv even IF the frame is not an X frame IF it detects X is
running. I guess that  might mean linking to x libraries or something
and thus make it impossible? Reading the millions of queries about the
same thing makes me think I'm being too hopeful and just need to bite
the bullet and use the horrible mouse selection technique.





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

* Re: Copy/Paste from console emacs client
  2010-01-04 12:45 ` Richard Riley
@ 2010-01-04 13:03   ` Leo
  2010-01-04 13:16   ` Richard Riley
       [not found]   ` <mailman.703.1262611220.18930.help-gnu-emacs@gnu.org>
  2 siblings, 0 replies; 6+ messages in thread
From: Leo @ 2010-01-04 13:03 UTC (permalink / raw
  To: help-gnu-emacs

On 2010-01-04 12:45 +0000, Richard Riley wrote:
> This thread (not Ubuntu specific) discusses the issues quite well :
>
>  
> http://ubuntuforums.org/showthread.php?t=539888
>
>
> The first, probably naive, solution that comes to mind is for emacs to
> use xclip or equiv even IF the frame is not an X frame IF it detects X is
> running. I guess that  might mean linking to x libraries or something
> and thus make it impossible? Reading the millions of queries about the
> same thing makes me think I'm being too hopeful and just need to bite
> the bullet and use the horrible mouse selection technique.

I had the question and wrote a small package for interfacing xclip which
made copying in terminal just like in X. I no longer use it since moving
to OSX and using GUI exclusively. But the code is here:

http://article.gmane.org/gmane.emacs.sources/2812/match=xclip

Best,

Leo





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

* Re: Copy/Paste from console emacs client
  2010-01-04 12:45 ` Richard Riley
  2010-01-04 13:03   ` Leo
@ 2010-01-04 13:16   ` Richard Riley
  2010-01-04 15:49     ` Leo
       [not found]   ` <mailman.703.1262611220.18930.help-gnu-emacs@gnu.org>
  2 siblings, 1 reply; 6+ messages in thread
From: Richard Riley @ 2010-01-04 13:16 UTC (permalink / raw
  To: help-gnu-emacs


OK, to follow up from my own post:

The problem was simply this - I had included xclip.el. However it does
this:

 (add-hook 'terminal-init-xterm-hook 'turn-on-xclip)

This was not triggered in my version of urxvt. I dont know the details
as to why. So, and thanks to dim in #emacs, I went back and call the
the interprogram function set up

(turn-on-xclip)

et voila. Working just fine. I guess I should go and add this to the
hundreds of threads on the subject out there ;) So trivial after all
that.

Hope this helps someone else,

regards,

r.



Richard Riley <rileyrgdev@gmail.com> writes:

> Richard Riley <rileyrgdev@gmail.com> writes:
>
>> OK, <deep breath>, I've been trying to get some half sensible cut/paste
>> going with emacs (x and console) and other apps.
>>
>> The one that has me stumped is uing M-w to copy in console emacs - why
>> can than not be made the primary and clipboard X contents if X is
>> running? The issue is that the interprogram cut function calls
>> x-select-text which determines that the emacs frame is not X and
>> therefore does not set the X buckets.
>>
>> Is there an easy way around this? It seems (to me who is tired and
>> confused) that it would be better to just set the X buckets if X is
>> running, not if the emacs itself is an x frame.
>>
>> (I am running emacsclient -nw in urxvt)
>>
>> regards
>>
>> r.
>>
>
> This thread (not Ubuntu specific) discusses the issues quite well :
>
> http://ubuntuforums.org/showthread.php?t=539888
>
> The first, probably naive, solution that comes to mind is for emacs to
> use xclip or equiv even IF the frame is not an X frame IF it detects X is
> running. I guess that  might mean linking to x libraries or something
> and thus make it impossible? Reading the millions of queries about the
> same thing makes me think I'm being too hopeful and just need to bite
> the bullet and use the horrible mouse selection technique.
>

-- 





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

* Re: Copy/Paste from console emacs client
  2010-01-04 13:16   ` Richard Riley
@ 2010-01-04 15:49     ` Leo
  0 siblings, 0 replies; 6+ messages in thread
From: Leo @ 2010-01-04 15:49 UTC (permalink / raw
  To: help-gnu-emacs

On 2010-01-04 13:16 +0000, Richard Riley wrote:
> The problem was simply this - I had included xclip.el. However it does
> this:
>
>  (add-hook 'terminal-init-xterm-hook 'turn-on-xclip)

This hook is run by xterm.el so it has no effect on other terms. I check
rxvt.el and it does not provide a similar hook.

Leo





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

* Re: Copy/Paste from console emacs client
       [not found]   ` <mailman.703.1262611220.18930.help-gnu-emacs@gnu.org>
@ 2010-01-05 17:50     ` Francis Moreau
  0 siblings, 0 replies; 6+ messages in thread
From: Francis Moreau @ 2010-01-05 17:50 UTC (permalink / raw
  To: help-gnu-emacs

On Jan 4, 2:16 pm, Richard Riley <rileyrg...@gmail.com> wrote:
> OK, to follow up from my own post:
>
> The problem was simply this - I had included xclip.el. However it does
> this:
>
>  (add-hook 'terminal-init-xterm-hook 'turn-on-xclip)
>
> This was not triggered in my version of urxvt. I dont know the details
> as to why. So, and thanks to dim in #emacs, I went back and call the
> the interprogram function set up
>
> (turn-on-xclip)
>
> et voila. Working just fine. I guess I should go and add this to the
> hundreds of threads on the subject out there ;) So trivial after all
> that.
>
> Hope this helps someone else,
>

Almost, but the 'funny' thing is that xclip is not working inside
emacs:

doing this in a terminal works:

$ echo -n foo | xclip

But doing this inside emacs after making a selection:

M-| xclip -i

make xclip to never exit.

Did you have a similar problem ?

Thanks


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

end of thread, other threads:[~2010-01-05 17:50 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-04  4:43 Copy/Paste from console emacs client Richard Riley
2010-01-04 12:45 ` Richard Riley
2010-01-04 13:03   ` Leo
2010-01-04 13:16   ` Richard Riley
2010-01-04 15:49     ` Leo
     [not found]   ` <mailman.703.1262611220.18930.help-gnu-emacs@gnu.org>
2010-01-05 17:50     ` Francis Moreau

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.