unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#34798: 27.0.50; xclip issue in tramp mode
@ 2019-03-09 23:11 Ergus
  2019-03-11 20:16 ` Stefan Monnier
       [not found] ` <handler.34798.C.1555377435564.notifdonectrl.0@debbugs.gnu.org>
  0 siblings, 2 replies; 8+ messages in thread
From: Ergus @ 2019-03-09 23:11 UTC (permalink / raw)
  To: 34798

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
                             <-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))







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

* bug#34798: 27.0.50; xclip issue in tramp mode
  2019-03-09 23:11 bug#34798: 27.0.50; xclip issue in tramp mode Ergus
@ 2019-03-11 20:16 ` Stefan Monnier
  2019-03-12 22:44   ` Ergus
       [not found] ` <handler.34798.C.1555377435564.notifdonectrl.0@debbugs.gnu.org>
  1 sibling, 1 reply; 8+ messages in thread
From: Stefan Monnier @ 2019-03-11 20:16 UTC (permalink / raw)
  To: Ergus; +Cc: 34798

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.





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

* bug#34798: 27.0.50; xclip issue in tramp mode
  2019-03-11 20:16 ` Stefan Monnier
@ 2019-03-12 22:44   ` Ergus
  2019-03-13  7:23     ` Michael Albinus
  0 siblings, 1 reply; 8+ messages in thread
From: Ergus @ 2019-03-12 22:44 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: 34798

[-- Attachment #1: Type: text/plain, Size: 3731 bytes --]

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@IRO.UMontreal.CA> wrote:
>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.

[-- Attachment #2: Type: text/html, Size: 4375 bytes --]

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

* bug#34798: 27.0.50; xclip issue in tramp mode
  2019-03-12 22:44   ` Ergus
@ 2019-03-13  7:23     ` Michael Albinus
  2019-04-16  1:17       ` Noam Postavsky
  0 siblings, 1 reply; 8+ messages in thread
From: Michael Albinus @ 2019-03-13  7:23 UTC (permalink / raw)
  To: Ergus; +Cc: 34798, Stefan Monnier

Ergus <spacibba@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.





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

* bug#34798: 27.0.50; xclip issue in tramp mode
  2019-03-13  7:23     ` Michael Albinus
@ 2019-04-16  1:17       ` Noam Postavsky
  2019-04-16  7:10         ` Michael Albinus
  0 siblings, 1 reply; 8+ messages in thread
From: Noam Postavsky @ 2019-04-16  1:17 UTC (permalink / raw)
  To: Michael Albinus; +Cc: Ergus, 34798, Stefan Monnier

tags 34798 fixed
close 34798 
quit

Michael Albinus <michael.albinus@gmx.de> writes:

> Ergus <spacibba@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.





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

* bug#34798: 27.0.50; xclip issue in tramp mode
  2019-04-16  1:17       ` Noam Postavsky
@ 2019-04-16  7:10         ` Michael Albinus
  0 siblings, 0 replies; 8+ messages in thread
From: Michael Albinus @ 2019-04-16  7:10 UTC (permalink / raw)
  To: Noam Postavsky; +Cc: Ergus, 34798, Stefan Monnier

Noam Postavsky <npostavs@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.





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

* bug#34798: acknowledged by developer (Re: bug#34798: 27.0.50; xclip issue in tramp mode)
       [not found] ` <handler.34798.C.1555377435564.notifdonectrl.0@debbugs.gnu.org>
@ 2019-04-16 14:16   ` Ergus
  2019-04-16 15:05     ` Eli Zaretskii
  0 siblings, 1 reply; 8+ messages in thread
From: Ergus @ 2019-04-16 14:16 UTC (permalink / raw)
  To: 34798

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@debbugs.gnu.org.
>
>debbugs.gnu.org maintainers
>(administrator, GNU bugs database)
>





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

* bug#34798: acknowledged by developer (Re: bug#34798: 27.0.50; xclip issue in tramp mode)
  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 15:05     ` Eli Zaretskii
  0 siblings, 0 replies; 8+ messages in thread
From: Eli Zaretskii @ 2019-04-16 15:05 UTC (permalink / raw)
  To: Ergus; +Cc: 34798

> Date: Tue, 16 Apr 2019 16:16:25 +0200
> From: Ergus <spacibba@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).





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

end of thread, other threads:[~2019-04-16 15:05 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-03-09 23:11 bug#34798: 27.0.50; xclip issue in tramp mode Ergus
2019-03-11 20:16 ` Stefan Monnier
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 15:05     ` Eli Zaretskii

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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).