all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: nolan@nolanwright.dev
To: emacs-devel@gnu.org
Subject: Elpa Package: xclip
Date: Wed, 09 Oct 2019 18:35:46 -0400	[thread overview]
Message-ID: <1570660546.15908.0@nolanwright.dev> (raw)

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

             reply	other threads:[~2019-10-09 22:35 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-09 22:35 nolan [this message]
2019-10-11 16:28 ` Elpa Package: xclip Stefan Monnier

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=1570660546.15908.0@nolanwright.dev \
    --to=nolan@nolanwright.dev \
    --cc=emacs-devel@gnu.org \
    /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.