GNU bug report logs -
#34798
27.0.50; xclip issue in tramp mode
Previous Next
Reported by: Ergus <spacibba <at> aol.com>
Date: Sat, 9 Mar 2019 23:12:02 UTC
Severity: normal
Tags: fixed
Found in version 27.0.50
Done: Noam Postavsky <npostavs <at> gmail.com>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 34798 in the body.
You can then email your comments to 34798 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#34798
; Package
emacs
.
(Sat, 09 Mar 2019 23:12:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Ergus <spacibba <at> aol.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Sat, 09 Mar 2019 23:12:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Hi:
There is an issue in xclip-mode when using tramp
emacs -q -nw
C-x C-f /ssh:user <at> 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
<-3
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.
Best,
Ergus
In GNU Emacs 27.0.50 (build 25, x86_64-pc-linux-gnu, GTK+ Version 3.24.5)
of 2019-03-08 built on Ergus
Repository revision: 0dbc4a697afb2a1e409909289f608fd4da875c24
Repository branch: master
System Description: Arch Linux
Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
Making completion list...
Configured using:
'configure --prefix=/home/ergo/PhD/emacs/emacs.install_arch
--with-mailutils --with-x-toolkit=gtk3 --with-xft --with-modules'
Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GSETTINGS GLIB
NOTIFY INOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF
XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM MODULES THREADS
LIBSYSTEMD JSON PDUMPER LCMS2 GMP
Important settings:
value of $LC_CTYPE: en_US.UTF-8
value of $LANG: en_US.UTF-8
locale-coding-system: utf-8-unix
Major mode: Lisp Interaction
Minor modes in effect:
tooltip-mode: t
global-eldoc-mode: t
eldoc-mode: t
electric-indent-mode: t
mouse-wheel-mode: t
tool-bar-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
line-number-mode: t
transient-mark-mode: t
Load-path shadows:
None found.
Features:
(shadow sort mail-extr emacsbug message rmc puny seq byte-opt gv
bytecomp byte-compile cconv dired dired-loaddefs format-spec rfc822 mml
easymenu mml-sec password-cache epa derived epg epg-config gnus-util
rmail rmail-loaddefs time-date mm-decode mm-bodies mm-encode mail-parse
rfc2231 mailabbrev gmm-utils mailheader cl-loaddefs cl-lib sendmail
rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils term/tmux
term/xterm xterm elec-pair mule-util tooltip eldoc electric uniquify
ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win
term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe
tabulated-list replace newcomment text-mode elisp-mode lisp-mode
prog-mode register page menu-bar rfn-eshadow isearch timer select
scroll-bar mouse jit-lock font-lock syntax facemenu font-core
term/tty-colors frame cl-generic cham georgian utf-8-lang misc-lang
vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932
hebrew greek romanian slovak czech european ethiopic indian cyrillic
chinese composite charscript charprop case-table epa-hook jka-cmpr-hook
help simple abbrev obarray minibuffer cl-preloaded nadvice loaddefs
button faces cus-face macroexp files text-properties overlay sha1 md5
base64 format env code-pages mule custom widget hashtable-print-readable
backquote threads dbusbind inotify lcms2 dynamic-setting
system-font-setting font-render-setting move-toolbar gtk x-toolkit x
multi-tty make-network-process emacs)
Memory information:
((conses 16 49458 7090)
(symbols 48 5989 1)
(strings 32 15224 2043)
(string-bytes 1 506195)
(vectors 16 7507)
(vector-slots 8 72469 12698)
(floats 8 23 417)
(intervals 56 197 0)
(buffers 992 12))
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#34798
; Package
emacs
.
(Mon, 11 Mar 2019 20:17:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 34798 <at> debbugs.gnu.org (full text, mbox):
Ergus <spacibba <at> aol.com> writes:
> Hi:
>
> There is an issue in xclip-mode when using tramp
>
> emacs -q -nw
> C-x C-f /ssh:user <at> 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 <at> 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.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#34798
; Package
emacs
.
(Tue, 12 Mar 2019 22:45:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 34798 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hi.
Yes, I just tried your changes and it looks to be working fine now.
On the other hand it looks like there is a bug or undocumented/unclear feature in the process-file function.
A special comment should be added in all the external process call functions to clarify whats the expected behaviour in tramp mode.
Does it makes sense?
On 11 March 2019 21:16:00 CET, Stefan Monnier <monnier <at> IRO.UMontreal.CA> wrote:
>Ergus <spacibba <at> aol.com> writes:
>
>> Hi:
>>
>> There is an issue in xclip-mode when using tramp
>>
>> emacs -q -nw
>> C-x C-f /ssh:user <at> 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 <at> 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.
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#34798
; Package
emacs
.
(Wed, 13 Mar 2019 07:24:01 GMT)
Full text and
rfc822 format available.
Message #14 received at 34798 <at> debbugs.gnu.org (full text, mbox):
Ergus <spacibba <at> aol.com> writes:
> Hi.
Hi,
> On the other hand it looks like there is a bug or undocumented/unclear
> feature in the process-file function.
>
> A special comment should be added in all the external process call
> functions to clarify whats the expected behaviour in tramp mode.
I'm sorry, reading this bug thread I fail to see what's missing in the
process-file documentation. Could you pls explain?
Best regards, Michael.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#34798
; Package
emacs
.
(Tue, 16 Apr 2019 01:18:01 GMT)
Full text and
rfc822 format available.
Message #17 received at 34798 <at> debbugs.gnu.org (full text, mbox):
tags 34798 fixed
close 34798
quit
Michael Albinus <michael.albinus <at> gmx.de> writes:
> Ergus <spacibba <at> aol.com> writes:
>> On the other hand it looks like there is a bug or undocumented/unclear
>> feature in the process-file function.
>>
>> A special comment should be added in all the external process call
>> functions to clarify whats the expected behaviour in tramp mode.
> I'm sorry, reading this bug thread I fail to see what's missing in the
> process-file documentation. Could you pls explain?
Not sure what Ergus is getting at either, but since the original bug
seems to be fixed I'm closing it, and perhaps unclear doc of
process-file can be followed up in Bug#20737.
Added tag(s) fixed.
Request was from
Noam Postavsky <npostavs <at> gmail.com>
to
control <at> debbugs.gnu.org
.
(Tue, 16 Apr 2019 01:18:02 GMT)
Full text and
rfc822 format available.
bug closed, send any further explanations to
34798 <at> debbugs.gnu.org and Ergus <spacibba <at> aol.com>
Request was from
Noam Postavsky <npostavs <at> gmail.com>
to
control <at> debbugs.gnu.org
.
(Tue, 16 Apr 2019 01:18:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#34798
; Package
emacs
.
(Tue, 16 Apr 2019 07:11:01 GMT)
Full text and
rfc822 format available.
Message #24 received at 34798 <at> debbugs.gnu.org (full text, mbox):
Noam Postavsky <npostavs <at> gmail.com> writes:
Hi Noam,
> Not sure what Ergus is getting at either, but since the original bug
> seems to be fixed I'm closing it, and perhaps unclear doc of
> process-file can be followed up in Bug#20737.
Thanks. I've tagged Bug#2073 for my TODO list, but it would help if I
could get more precise information about what's missing in the
doc. Obviously, I'm one of the guys who is satisfied so far with the doc.
Best regards, Michael.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#34798
; Package
emacs
.
(Tue, 16 Apr 2019 14:17:02 GMT)
Full text and
rfc822 format available.
Message #27 received at 34798 <at> debbugs.gnu.org (full text, mbox):
Sorry I didn't know how to close an issue myself.
On Mon, Apr 15, 2019 at 09:18:02PM -0400, GNU bug Tracking System wrote:
>This is an automatic notification regarding your bug report
>#34798: 27.0.50; xclip issue in tramp mode,
>which was filed against the emacs package.
>
>Thank you for your report, which has now been closed.
>You can view the full report at
>http://debbugs.gnu.org/cgi/bugreport.cgi?bug=34798
>
>If you require further information, please followup to 34798 <at> debbugs.gnu.org.
>
>debbugs.gnu.org maintainers
>(administrator, GNU bugs database)
>
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#34798
; Package
emacs
.
(Tue, 16 Apr 2019 15:06:02 GMT)
Full text and
rfc822 format available.
Message #30 received at 34798 <at> debbugs.gnu.org (full text, mbox):
> Date: Tue, 16 Apr 2019 16:16:25 +0200
> From: Ergus <spacibba <at> aol.com>
>
> Sorry I didn't know how to close an issue myself.
in the future, when you need to do something with the bug tracker and
don't know how, try reading admin/notes/bugtracker, it has quite a bit
of information (including how to close bug reports).
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Wed, 15 May 2019 11:24:08 GMT)
Full text and
rfc822 format available.
This bug report was last modified 4 years and 319 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.