unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Emacs hangs on X11 paste--how to diagnose?
@ 2015-03-12  0:49 jrw
  2015-03-12  1:41 ` Emanuel Berg
  2015-03-15 18:46 ` shponglespore
  0 siblings, 2 replies; 12+ messages in thread
From: jrw @ 2015-03-12  0:49 UTC (permalink / raw)
  To: help-gnu-emacs

I've been having a problem in Emacs (my own build based on 24.4.51.1) where sometimes, if I try to paste from an X11 program, either using C-y or a middle click, Emacs freezes for several seconds.  Pressing C-g does nothing, but usually Emacs starts responding again after a few seconds.  Since I can't reproduce the issue reliably, does anyone have any ideas on how to diagnose this problem.  It seems like the next step may be to run Emacs in gdb, but I'd like to avoid that if possible.


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

* Re: Emacs hangs on X11 paste--how to diagnose?
  2015-03-12  0:49 Emacs hangs on X11 paste--how to diagnose? jrw
@ 2015-03-12  1:41 ` Emanuel Berg
  2015-03-12 11:15   ` Jacob Gerlach
  2015-03-12 12:33   ` Stefan Monnier
  2015-03-15 18:46 ` shponglespore
  1 sibling, 2 replies; 12+ messages in thread
From: Emanuel Berg @ 2015-03-12  1:41 UTC (permalink / raw)
  To: help-gnu-emacs

jrw@google.com writes:

> I've been having a problem in Emacs (my own build
> based on 24.4.51.1) where sometimes, if I try to
> paste from an X11 program, either using C-y or a
> middle click, Emacs freezes for several seconds.
> Pressing C-g does nothing, but usually Emacs starts
> responding again after a few seconds.

Do I have selective perception, or is this yet another
problem with Emacs in the accursed GUI world?

This doesn't sound like an Emacs per se problem.
Still, for anyone to have any luck reproducing the
problem, what Emacs, and what desktop (GNOME or KDE
most likely), and what window manager (Openbox, fvwm,
...) do you use?

"What Emacs?" - try:

    readlink -e `type -p emacs`

You say C-y doesn't "paste" from X programs. Are you
sure it should? Did you or someone else successfully
integrate the X clipboard with the Emacs `kill-ring'?
What is `C-h k C-y' say? (I have `yank' - i.e., has
nothing to do with X.)

The middle mouse click may also be a feature either of
X or if you for example run Emacs in xterm, urxvt, or
the like. Yes: how do you invoke Emacs in X?

By the way, I once did an interface [1] to the X
clipboard. It uses xsel. I know there is another such
package in ELPA which uses xclip which should amount
to virtually the same. Can you get either of them to
work? Or you can just get either (xsel or xclip) with
aptitude and try for yourself, probably easier. Is it
the same problem?

[1] http://user.it.uu.se/~embe8573/conf/emacs-init/xsel.el

-- 
underground experts united


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

* Re: Emacs hangs on X11 paste--how to diagnose?
  2015-03-12  1:41 ` Emanuel Berg
@ 2015-03-12 11:15   ` Jacob Gerlach
  2015-03-12 20:56     ` Robert Thorpe
  2015-03-12 12:33   ` Stefan Monnier
  1 sibling, 1 reply; 12+ messages in thread
From: Jacob Gerlach @ 2015-03-12 11:15 UTC (permalink / raw)
  To: Emanuel Berg; +Cc: help-gnu-emacs

On Wed, Mar 11, 2015 at 9:41 PM, Emanuel Berg <embe8573@student.uu.se> wrote:
>Did you or someone else successfully
> integrate the X clipboard with the Emacs `kill-ring'?

I have

(setq x-select-enable-clipboard t)

in my init and I'm able to paste/yank (using C-y) text I copied from
Firefox (or any other program) into emacs. (Not sure if there is more
than a semantic difference between yank and paste in this case). I use
vanilla Ubuntu 14.04 and have never paid much attention to what
desktop/WM I'm using. I guess it's X based on the docstring, but not
sure.



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

* Re: Emacs hangs on X11 paste--how to diagnose?
  2015-03-12  1:41 ` Emanuel Berg
  2015-03-12 11:15   ` Jacob Gerlach
@ 2015-03-12 12:33   ` Stefan Monnier
  2015-03-12 12:39     ` Rasmus
  1 sibling, 1 reply; 12+ messages in thread
From: Stefan Monnier @ 2015-03-12 12:33 UTC (permalink / raw)
  To: help-gnu-emacs

> Did you or someone else successfully
> integrate the X clipboard with the Emacs `kill-ring'?

FWIW, it's the default mode of operation of Emacs since Emacs-24.


        Stefan




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

* Re: Emacs hangs on X11 paste--how to diagnose?
  2015-03-12 12:33   ` Stefan Monnier
@ 2015-03-12 12:39     ` Rasmus
  2015-03-12 15:15       ` Jorge A. Alfaro-Murillo
  0 siblings, 1 reply; 12+ messages in thread
From: Rasmus @ 2015-03-12 12:39 UTC (permalink / raw)
  To: help-gnu-emacs

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>> Did you or someone else successfully
>> integrate the X clipboard with the Emacs `kill-ring'?
>
> FWIW, it's the default mode of operation of Emacs since Emacs-24.

FWIW2: I see the same issue sometimes.  Using Gnome-Shell.  I assume it's
a dbus-thingy, but I don't know what causes the error...

-- 
Not everything that goes around comes back around, you know




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

* Re: Emacs hangs on X11 paste--how to diagnose?
  2015-03-12 12:39     ` Rasmus
@ 2015-03-12 15:15       ` Jorge A. Alfaro-Murillo
  0 siblings, 0 replies; 12+ messages in thread
From: Jorge A. Alfaro-Murillo @ 2015-03-12 15:15 UTC (permalink / raw)
  To: help-gnu-emacs

Rasmus writes:

> FWIW2: I see the same issue sometimes.  Using Gnome-Shell.  I 
> assume it's a dbus-thingy, but I don't know what causes the 
> error...

I also see the same issue with openbox on Debian. It generally 
happens after the emacs server has been running for a couple of 
days, emacs is the only thing that fails to paste, the rest of X 
programs are working fine. The issue goes away after I restart the 
emacs server.

In my .emacs I have for the kill-yank related part:

#+BEGIN_SRC emacs-lisp
  (setq kill-ring-max 100)
  (setq x-select-enable-clipboard t)
  (setq select-active-regions t)
  (setq save-interprogram-paste-before-kill 1)
  (setq yank-pop-change-selection t)
#+END_SRC

I also have browse-kill-ring cloned from 
git://github.com/browse-kill-ring/browse-kill-ring

Best,
-- 
Jorge.




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

* Re: Emacs hangs on X11 paste--how to diagnose?
  2015-03-12 11:15   ` Jacob Gerlach
@ 2015-03-12 20:56     ` Robert Thorpe
  2015-03-12 21:47       ` Glenn Morris
  2015-03-12 21:56       ` Jorge A. Alfaro-Murillo
  0 siblings, 2 replies; 12+ messages in thread
From: Robert Thorpe @ 2015-03-12 20:56 UTC (permalink / raw)
  To: Jacob Gerlach; +Cc: help-gnu-emacs, embe8573

Jacob Gerlach <jacobgerlach@gmail.com> writes:

> On Wed, Mar 11, 2015 at 9:41 PM, Emanuel Berg <embe8573@student.uu.se> wrote:
>>Did you or someone else successfully
>> integrate the X clipboard with the Emacs `kill-ring'?
>
> I have
>
> (setq x-select-enable-clipboard t)
>
> in my init and I'm able to paste/yank (using C-y) text I copied from
> Firefox (or any other program) into emacs. (Not sure if there is more
> than a semantic difference between yank and paste in this case). I use
> vanilla Ubuntu 14.04 and have never paid much attention to what
> desktop/WM I'm using. I guess it's X based on the docstring, but not
> sure.

I know that two other people have seen this issue.  I've never seen it
though and I use Emacs on Ubuntu (12.04 though) all the time.

Have you tried it with emacs -Q?

If it persists then file a bug-report about it.

BR,
Robert Thorpe



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

* Re: Emacs hangs on X11 paste--how to diagnose?
  2015-03-12 20:56     ` Robert Thorpe
@ 2015-03-12 21:47       ` Glenn Morris
  2015-03-22  2:25         ` Tom Tromey
  2015-03-12 21:56       ` Jorge A. Alfaro-Murillo
  1 sibling, 1 reply; 12+ messages in thread
From: Glenn Morris @ 2015-03-12 21:47 UTC (permalink / raw)
  To: help-gnu-emacs


> If it persists then file a bug-report about it.

s/file a bug report/check for bug reports/

http://debbugs.gnu.org/16737   and several friends.

I don't know what is needed to make progress fixing it,
but it's obviously a problem.



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

* Re: Emacs hangs on X11 paste--how to diagnose?
  2015-03-12 20:56     ` Robert Thorpe
  2015-03-12 21:47       ` Glenn Morris
@ 2015-03-12 21:56       ` Jorge A. Alfaro-Murillo
  1 sibling, 0 replies; 12+ messages in thread
From: Jorge A. Alfaro-Murillo @ 2015-03-12 21:56 UTC (permalink / raw)
  To: help-gnu-emacs

Robert Thorpe writes:

> Have you tried it with emacs -Q?

As I said, for me the bug can start after a couple of days of 
running the emacs server, so I will definitely not attempt to do 
run emacs -Q until the bug appears, I don't think that I would be 
able to work for more than a couple of minutes without my 
customization =)

-- 
Jorge.




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

* Re: Emacs hangs on X11 paste--how to diagnose?
  2015-03-12  0:49 Emacs hangs on X11 paste--how to diagnose? jrw
  2015-03-12  1:41 ` Emanuel Berg
@ 2015-03-15 18:46 ` shponglespore
  2015-03-15 18:48   ` shponglespore
  1 sibling, 1 reply; 12+ messages in thread
From: shponglespore @ 2015-03-15 18:46 UTC (permalink / raw)
  To: help-gnu-emacs

Just to add a little more detail, I'm also using emacs in a client-server config like some of the other posters in this thread, and the problem only appears when I've been running emacs for a while, which is why I'm not optimistic about diagnosing it myself.  I can't say for sure if re-starting the server is necessary to fix it or if I can do it by just re-starting the client, since I usually just re-start both.

FWIW my system is Ubuntu Trusty and my desktop is Cinnamon. No other programs exhibit the same problem, and my emacs build exhibits standard X clipboard behavior by default.


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

* Re: Emacs hangs on X11 paste--how to diagnose?
  2015-03-15 18:46 ` shponglespore
@ 2015-03-15 18:48   ` shponglespore
  0 siblings, 0 replies; 12+ messages in thread
From: shponglespore @ 2015-03-15 18:48 UTC (permalink / raw)
  To: help-gnu-emacs

On Sunday, March 15, 2015 at 11:46:59 AM UTC-7, shpong...@gmail.com wrote:
> Just to add a little more detail, I'm also using emacs in a client-server config like some of the other posters in this thread, and the problem only appears when I've been running emacs for a while, which is why I'm not optimistic about diagnosing it myself.  I can't say for sure if re-starting the server is necessary to fix it or if I can do it by just re-starting the client, since I usually just re-start both.
> 
> FWIW my system is Ubuntu Trusty and my desktop is Cinnamon. No other programs exhibit the same problem, and my emacs build exhibits standard X clipboard behavior by default.

Oh, and I'm the same person as jrw@google.com, in case that was confusing.


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

* Re: Emacs hangs on X11 paste--how to diagnose?
  2015-03-12 21:47       ` Glenn Morris
@ 2015-03-22  2:25         ` Tom Tromey
  0 siblings, 0 replies; 12+ messages in thread
From: Tom Tromey @ 2015-03-22  2:25 UTC (permalink / raw)
  To: Glenn Morris; +Cc: help-gnu-emacs

>> If it persists then file a bug-report about it.

GM> s/file a bug report/check for bug reports/

GM> http://debbugs.gnu.org/16737   and several friends.

GM> I don't know what is needed to make progress fixing it,
GM> but it's obviously a problem.

See comment #76.
It's been a while since I looked at this but it seemed to be an issue
with the events arriving "too late" -- either some bug in the SIGIO code
or a missing call to gobble_input.

Tom



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

end of thread, other threads:[~2015-03-22  2:25 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-12  0:49 Emacs hangs on X11 paste--how to diagnose? jrw
2015-03-12  1:41 ` Emanuel Berg
2015-03-12 11:15   ` Jacob Gerlach
2015-03-12 20:56     ` Robert Thorpe
2015-03-12 21:47       ` Glenn Morris
2015-03-22  2:25         ` Tom Tromey
2015-03-12 21:56       ` Jorge A. Alfaro-Murillo
2015-03-12 12:33   ` Stefan Monnier
2015-03-12 12:39     ` Rasmus
2015-03-12 15:15       ` Jorge A. Alfaro-Murillo
2015-03-15 18:46 ` shponglespore
2015-03-15 18:48   ` shponglespore

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).