* Elpa Package: xclip
@ 2019-10-09 22:35 nolan
2019-10-11 16:28 ` Stefan Monnier
0 siblings, 1 reply; 2+ messages in thread
From: nolan @ 2019-10-09 22:35 UTC (permalink / raw)
To: emacs-devel
[-- Attachment #1: Type: text/plain, Size: 1157 bytes --]
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.
From 5a707bdaa3edb17289f0b9dda94770bc0fc5eb28 Mon Sep 17 00:00:00 2001
From: Nolan Wright <nolan@nolanwright.dev>
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)))
--
2.23.0
Sent via Migadu.com, world's easiest email hosting
[-- Attachment #2: Type: text/html, Size: 2082 bytes --]
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: Elpa Package: xclip
2019-10-09 22:35 Elpa Package: xclip nolan
@ 2019-10-11 16:28 ` Stefan Monnier
0 siblings, 0 replies; 2+ messages in thread
From: Stefan Monnier @ 2019-10-11 16:28 UTC (permalink / raw)
To: nolan; +Cc: emacs-devel
> 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 <nolan@nolanwright.dev>
> 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)))
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-10-11 16:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-10-09 22:35 Elpa Package: xclip nolan
2019-10-11 16:28 ` Stefan Monnier
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.