all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Ergus <spacibba@aol.com>
To: Stefan Monnier <monnier@IRO.UMontreal.CA>
Cc: 34798@debbugs.gnu.org
Subject: bug#34798: 27.0.50; xclip issue in tramp mode
Date: Tue, 12 Mar 2019 23:44:11 +0100	[thread overview]
Message-ID: <686F9981-4105-4099-9FEC-E2A7E4C68021@aol.com> (raw)
In-Reply-To: <jwvva0pi35w.fsf-monnier+emacs@gnu.org>

[-- 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 --]

  reply	other threads:[~2019-03-12 22:44 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
2019-03-12 22:44   ` Ergus [this message]
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=686F9981-4105-4099-9FEC-E2A7E4C68021@aol.com \
    --to=spacibba@aol.com \
    --cc=34798@debbugs.gnu.org \
    --cc=monnier@IRO.UMontreal.CA \
    /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.