Subject: bug#35257: eshell and xclip

From: Noam Postavsky <[email-masked]>
Date: Mon, 15 Apr 2019 20:41:55 -0400

tags 35257 + patch
quit

Andreas Schwab <[email-masked]> writes:

> This is because xclip forks a background process that holds the
> selection.  With eshell, that background process is killed immediately
> (due to its lack of job control), so the selection is lost.

Ah thanks, looks adding it to eshell-needs-pipe works.  This should be
safe enough for emacs-26.

>From dfed83d8c87ec30560fea7daca5c7abfe76baf0b Mon Sep 17 00:00:00 2001
From: Noam Postavsky <[email-masked]>
Date: Mon, 15 Apr 2019 20:38:15 -0400
Subject: [PATCH] Tell xclip not to expect job-control (Bug#35257)

* lisp/eshell/esh-proc.el (eshell-needs-pipe): Add "xclip".
---
 lisp/eshell/esh-proc.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/eshell/esh-proc.el b/lisp/eshell/esh-proc.el
index 33ec19ae36..a4078e781d 100644
--- a/lisp/eshell/esh-proc.el
+++ b/lisp/eshell/esh-proc.el
@@ -242,7 +242,7 @@ (defvar eshell-last-sync-output-start nil
   "A marker that tracks the beginning of output of the last subprocess.
 Used only on systems which do not support async subprocesses.")
 
-(defvar eshell-needs-pipe '("bc")
+(defvar eshell-needs-pipe '("bc" "xclip")
   "List of commands which need `process-connection-type' to be nil.
 Currently only affects commands in pipelines, and not those at
 the front.  If an element contains a directory part it must match
-- 
2.11.0