all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* x-selection-value slow with primary selection
@ 2013-10-08 16:30 Allan Streib
  2013-10-09  9:06 ` Peter Dyballa
  0 siblings, 1 reply; 5+ messages in thread
From: Allan Streib @ 2013-10-08 16:30 UTC (permalink / raw)
  To: help-gnu-emacs

I use emacs 24.3 on OpenBSD-current. Yanking text from the Primary X
selection is very slow, often taking ~10 seconds.  Nothing unusual about
the selection, may be a few words or a couple of lines.

I have tried eval-ing (x-selection-value) and it shows the same delay.

However (x-selection-value-internal 'PRIMARY) is quick. No perceptible
delay.

That's about as far as I got, I'm not very familar with elisp. Is there
a solution?  Since I'm almost always wanting to get the primary
selection I think I could make my own function for
interprogram-paste-function as a workaround.

Thanks,

Allan




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

* Re: x-selection-value slow with primary selection
  2013-10-08 16:30 x-selection-value slow with primary selection Allan Streib
@ 2013-10-09  9:06 ` Peter Dyballa
  2013-10-09 14:41   ` Allan Streib
       [not found]   ` <mailman.3676.1381329693.10748.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 5+ messages in thread
From: Peter Dyballa @ 2013-10-09  9:06 UTC (permalink / raw)
  To: Allan Streib; +Cc: help-gnu-emacs


Am 08.10.2013 um 18:30 schrieb Allan Streib:

> I use emacs 24.3 on OpenBSD-current. Yanking text from the Primary X
> selection is very slow, often taking ~10 seconds.  Nothing unusual about
> the selection, may be a few words or a couple of lines.

Maybe there are two effects involved. Could be text properties are getting copied too. The second effect can be due to text encoding issues.

You could try to synchronise the text encoding issue. If GNU Emacs would use the same default encoding as the X server uses, then some time could be saved.

The other issue can be solved by telling the X server not to handle text properties – and/or setting this in GNU Emacs.


Sometimes I think that the delays I encounter are due to not enough memory, which would lead to swapping out some parts of the programmes involved.

--
Greetings

  Pete

Don't just do something, sit there.




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

* Re: x-selection-value slow with primary selection
  2013-10-09  9:06 ` Peter Dyballa
@ 2013-10-09 14:41   ` Allan Streib
       [not found]   ` <mailman.3676.1381329693.10748.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 5+ messages in thread
From: Allan Streib @ 2013-10-09 14:41 UTC (permalink / raw)
  To: Peter Dyballa; +Cc: help-gnu-emacs

Peter Dyballa <Peter_Dyballa@web.de> writes:

> Maybe there are two effects involved. Could be text properties are getting copied too. The second effect can be due to text encoding issues.
>
> You could try to synchronise the text encoding issue. If GNU Emacs would use the same default encoding as the X server uses, then some time could be saved.
>
> The other issue can be solved by telling the X server not to handle text properties – and/or setting this in GNU Emacs.

Interesting idea. Do you have any links to instructions on how to tell X
and/or Emacs to not handle text properties? I am not finding anything
with web searches.

I almost never want to copy/paste formatting, only the text, so I would
love to know how to configure this globally in X.

Allan



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

* Re: x-selection-value slow with primary selection
       [not found]   ` <mailman.3676.1381329693.10748.help-gnu-emacs@gnu.org>
@ 2013-10-09 15:23     ` Damien Wyart
  2013-10-09 15:41       ` Allan Streib
  0 siblings, 1 reply; 5+ messages in thread
From: Damien Wyart @ 2013-10-09 15:23 UTC (permalink / raw)
  To: help-gnu-emacs

* Allan Streib <astreib@indiana.edu> in gnu.emacs.help:
> Interesting idea. Do you have any links to instructions on how to tell
> X and/or Emacs to not handle text properties? I am not finding
> anything with web searches.

You can try:

  (setq yank-excluded-properties t)

-- 
DW


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

* Re: x-selection-value slow with primary selection
  2013-10-09 15:23     ` Damien Wyart
@ 2013-10-09 15:41       ` Allan Streib
  0 siblings, 0 replies; 5+ messages in thread
From: Allan Streib @ 2013-10-09 15:41 UTC (permalink / raw)
  To: Damien Wyart, help-gnu-emacs

Damien Wyart <damien.wyart@free.fr> writes:

> You can try:
>
>   (setq yank-excluded-properties t)

Thanks. I tried that and found that it didn't make any real difference,
so it maybe isn't an issue of the text properties.

I looked at the code for the x-selection-value function, and found that
it is checking both the X Clipboard and the X Primary selection text,
and that this can be controlled by the x-select-enable-clipboard and
x-select-enable-primary variables. Since I almost always want to use the
Primary selection, I set this in my .emacs and have found great
improvement:

(setq
  x-select-enable-clipboard nil
  x-select-enable-primary t)

Allan



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

end of thread, other threads:[~2013-10-09 15:41 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-08 16:30 x-selection-value slow with primary selection Allan Streib
2013-10-09  9:06 ` Peter Dyballa
2013-10-09 14:41   ` Allan Streib
     [not found]   ` <mailman.3676.1381329693.10748.help-gnu-emacs@gnu.org>
2013-10-09 15:23     ` Damien Wyart
2013-10-09 15:41       ` Allan Streib

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.