[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Elpa Package: xclip
From: |
Stefan Monnier |
Subject: |
Re: Elpa Package: xclip |
Date: |
Fri, 11 Oct 2019 12:28:08 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
> Hello, by default the wl-paste programs adds a newline character to text in
> the clipboard. The below patch disables this behavior in xclip mode.
Indeed, thank you. Glad to see this code is in use (and apparently
working). I installed it into elpa.git.
Stefan
> From 5a707bdaa3edb17289f0b9dda94770bc0fc5eb28 Mon Sep 17 00:00:00 2001
> From: Nolan Wright <address@hidden>
> Date: Wed, 9 Oct 2019 18:12:06 -0400
> Subject: [PATCH] Tell wl-paste not to add a newline
>
> ---
> packages/xclip/xclip.el | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/packages/xclip/xclip.el b/packages/xclip/xclip.el
> index 1713bf740..9fe566756 100644
> --- a/packages/xclip/xclip.el
> +++ b/packages/xclip/xclip.el
> @@ -185,7 +185,7 @@ See also `x-set-selection'."
> (replace-regexp-in-string "\\(.*\\)copy" "\\1paste"
> xclip-program 'fixedcase)
> nil standard-output nil
> - (if (memq type '(primary PRIMARY)) '("-p")))))
> + (cons "-n" (when (memq type '(primary PRIMARY)) '("-p"))))))
> (`termux-clipboard-get
> (when (memq type '(clipboard CLIPBOARD))
> (call-process xclip-program nil standard-output nil)))