Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 207052 - app-text/wgetpaste-2.8 never returns when started from within Emacs
Summary: app-text/wgetpaste-2.8 never returns when started from within Emacs
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Bo Ørsted Andresen (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-01-22 15:54 UTC by Ulrich Müller
Modified: 2008-01-24 18:04 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Proposed patch for wgetpaste-2.8 (wgetpaste-2.8-xclip-output-redirect.patch,327 bytes, patch)
2008-01-22 15:55 UTC, Ulrich Müller
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ulrich Müller gentoo-dev 2008-01-22 15:54:07 UTC
When started with option -X from within Emacs (e.g. "M-| wgetpaste -X RET" on a selected region) the process never returns.

The problem can also be reproduced as follows:
   echo test | wgetpaste -X | cat

"ps x" shows that there is an xclip process left that doesn't terminate, because its standard output is going to a pipe. (app-text/nopaste had a similar problem, see bug 205525.)

Patch will follow.
Comment 1 Ulrich Müller gentoo-dev 2008-01-22 15:55:23 UTC
Created attachment 141586 [details, diff]
Proposed patch for wgetpaste-2.8

Redirecting stdout fixes the problem.
Comment 2 Bo Ørsted Andresen (RETIRED) gentoo-dev 2008-01-23 18:55:58 UTC
$ svn log -r 218 && svn diff -c 218e with your conclusion ("you sound t
------------------------------------------------------------------------
r218 | bo | 2008-01-23 19:43:21 +0100 (Wed, 23 Jan 2008) | 1 line

emacs people are weird (see bug #207052).
------------------------------------------------------------------------
Index: trunk/wgetpaste
===================================================================
--- trunk/wgetpaste     (revision 217)
+++ trunk/wgetpaste     (revision 218)
@@ -324,7 +324,7 @@

 x_paste() {
        if [[ -x $(type -P xclip) ]]; then
-               xclip -loops 10 <<< "$*" || die "xclip failed."
+               xclip -loops 10 &>/dev/null <<< "$*" || die "xclip failed."
        else
                noxclip paste "write to"
        fi

2.9 is tagged with this. ;)
Comment 3 Bo Ørsted Andresen (RETIRED) gentoo-dev 2008-01-24 18:04:36 UTC
Fixed in 2.9, thanks.