unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: nolan@nolanwright.dev
Cc: emacs-devel@gnu.org
Subject: Re: Elpa Package: xclip
Date: Fri, 11 Oct 2019 12:28:08 -0400	[thread overview]
Message-ID: <jwvlftrw8ms.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <1570660546.15908.0@nolanwright.dev> (nolan@nolanwright.dev's message of "Wed, 09 Oct 2019 18:35:46 -0400")

> 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)))




      reply	other threads:[~2019-10-11 16:28 UTC|newest]

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

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvlftrw8ms.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=emacs-devel@gnu.org \
    --cc=nolan@nolanwright.dev \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).