From: Stefan Monnier <monnier@IRO.UMontreal.CA>
To: Ergus <spacibba@aol.com>
Cc: 34798@debbugs.gnu.org
Subject: bug#34798: 27.0.50; xclip issue in tramp mode
Date: Mon, 11 Mar 2019 16:16:00 -0400 [thread overview]
Message-ID: <jwvva0pi35w.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <20190309231128.vo3vraxbgpskpcot@Ergus> (Ergus's message of "Sun, 10 Mar 2019 00:11:28 +0100")
Ergus <spacibba@aol.com> writes:
> Hi:
>
> There is an issue in xclip-mode when using tramp
>
> emacs -q -nw
> C-x C-f /ssh:user@host:file RET
> M-x load-file RET xclip.el RET
> M-x xclip-mode RET
> abcd C-SPC C-a M-w C-e RET <-1
> C-y <-2
> RET <-3
> C-y M-y RET <-4
> S-C-v <-5
>
> Produces this output:
> abcd <-1
> sh: xclip: command not found <-2
Duh! I pushed the patch below which seems to fix it for me.
> abcd <-4
> abcd <-5
>
> As you can see the 2) yanks the error message including a new line.
> But 4) (emacs yank + yank-pop) yanks the text and 5 (xterm-paste) too.
I think these were side-effects of the previous problem.
xclip-1.8 (to appear soonish) will include this fix.
Stefan
diff --git a/packages/xclip/xclip.el b/packages/xclip/xclip.el
index b142475b5..b1686e14d 100644
--- a/packages/xclip/xclip.el
+++ b/packages/xclip/xclip.el
@@ -1,6 +1,6 @@
;;; xclip.el --- Copy&paste GUI clipboard from text terminal -*- lexical-binding:t -*-
-;; Copyright (C) 2007, 2012, 2013, 2017, 2018 Free Software Foundation, Inc.
+;; Copyright (C) 2007-2019 Free Software Foundation, Inc.
;; Author: Leo Liu <sdl.web@gmail.com>
;; Keywords: convenience, tools
@@ -144,21 +144,21 @@ See also `x-set-selection'."
(pcase xclip-method
(`pbpaste
(when (memq type '(clipboard CLIPBOARD))
- (process-file xclip-program nil standard-output nil
+ (call-process xclip-program nil standard-output nil
"-Prefer" "txt")))
(`getclip
(when (memq type '(clipboard CLIPBOARD))
- (process-file xclip-program nil standard-output nil)))
+ (call-process xclip-program nil standard-output nil)))
(`xclip
(when (getenv "DISPLAY")
- (process-file xclip-program nil standard-output nil
+ (call-process xclip-program nil standard-output nil
"-o" "-selection" (symbol-name type))))
(`xsel
(when (and (getenv "DISPLAY")
(memq type '(clipboard CLIPBOARD
primary PRIMARY
secondary SECONDARY)))
- (process-file xclip-program nil standard-output nil
+ (call-process xclip-program nil standard-output nil
"-o" (concat "--" (downcase (symbol-name type))))))
(method (error "Unknown `xclip-method': %S" method))))))
@@ -281,7 +281,7 @@ Emacs-NN and is then later run by Emacs>NN."
(or clip-text
(when (and (memq xclip-method '(xsel xclip)) (getenv "DISPLAY"))
(let ((primary-text (with-output-to-string
- (process-file xclip-program nil
+ (call-process xclip-program nil
standard-output nil "-o"))))
(setq primary-text
(cond ; Check primary selection.
next prev parent reply other threads:[~2019-03-11 20:16 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-09 23:11 bug#34798: 27.0.50; xclip issue in tramp mode Ergus
2019-03-11 20:16 ` Stefan Monnier [this message]
2019-03-12 22:44 ` Ergus
2019-03-13 7:23 ` Michael Albinus
2019-04-16 1:17 ` Noam Postavsky
2019-04-16 7:10 ` Michael Albinus
[not found] ` <handler.34798.C.1555377435564.notifdonectrl.0@debbugs.gnu.org>
2019-04-16 14:16 ` bug#34798: acknowledged by developer (Re: bug#34798: 27.0.50; xclip issue in tramp mode) Ergus
2019-04-16 14:34 ` Robert Pluim
2019-04-16 16:00 ` Eli Zaretskii
2019-04-16 16:55 ` Alex Gramiak
2019-04-16 15:05 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwvva0pi35w.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=34798@debbugs.gnu.org \
--cc=spacibba@aol.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.