From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: nolan@nolanwright.dev Newsgroups: gmane.emacs.devel Subject: Elpa Package: xclip Date: Wed, 09 Oct 2019 18:35:46 -0400 Message-ID: <1570660546.15908.0@nolanwright.dev> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="=-KfVPFoojVSU4KNQ1dh8c" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="156791"; mail-complaints-to="usenet@blaine.gmane.org" To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Oct 10 03:17:34 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iIN5B-000edq-QZ for ged-emacs-devel@m.gmane.org; Thu, 10 Oct 2019 03:17:33 +0200 Original-Received: from localhost ([::1]:33138 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iIN5A-0002Xp-2R for ged-emacs-devel@m.gmane.org; Wed, 09 Oct 2019 21:17:32 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58211) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iIKYr-0004Mv-TU for emacs-devel@gnu.org; Wed, 09 Oct 2019 18:36:03 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iIKYq-0006eY-FA for emacs-devel@gnu.org; Wed, 09 Oct 2019 18:36:01 -0400 Original-Received: from out.migadu.com ([91.121.223.63]:57262) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iIKYq-0006bq-3p for emacs-devel@gnu.org; Wed, 09 Oct 2019 18:36:00 -0400 Original-Received: (Migadu outbound); Wed, 09 Oct 2019 22:35:55 +0000 Authentication-Results: out.migadu.com; auth=pass (plain) Original-Received: from [192.168.1.179] (pool-71-178-203-201.washdc.fios.verizon.net [71.178.203.201]) by out.migadu.com (Haraka/2.8.16) with ESMTPSA id 9692CC96-8696-493D-A529-271AF5EEA20F.1 envelope-from (authenticated bits=0) (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 verify=FAIL); Wed, 09 Oct 2019 22:35:54 +0000 X-Mailer: geary/3.34.0 DKIM-Signature: v=1; a=rsa-sha256; bh=Z5V3x5HbYPdkYfmzKBpeenwnxyIIY/zLlwoP5+2sCcg=; c=relaxed/simple; d=nolanwright.dev; h=from:subject:date:to; s=default; b=JOWFwihFEnDJ7I70k83p+h5e1x76u4Ir5WDqzLzxa4PpDveujLukOru9C6stN5uCOYG+nInBEXRhSctpE0oYOmYRrUdLXdeWtiY23Tl+kZIBs25Kh2HE6xdkgJjfZLOIdQQV5IVWQAfNyJUhpG2lpfTGUxJJF69zhsPDNt2EFUA= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 91.121.223.63 X-Mailman-Approved-At: Wed, 09 Oct 2019 21:15:57 -0400 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:240807 Archived-At: --=-KfVPFoojVSU4KNQ1dh8c Content-Type: text/plain; charset=us-ascii; format=flowed 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 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 --=-KfVPFoojVSU4KNQ1dh8c Content-Type: text/html; charset=us-ascii
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


< P>Sent via Migadu.com, world's easiest email hosting

--=-KfVPFoojVSU4KNQ1dh8c--