[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/xclip 89e061e 14/18: * packages/xclip/xclip.el: Tweak l
From: |
Stefan Monnier |
Subject: |
[elpa] externals/xclip 89e061e 14/18: * packages/xclip/xclip.el: Tweak last patch |
Date: |
Sat, 28 Nov 2020 14:27:57 -0500 (EST) |
branch: externals/xclip
commit 89e061e9be000d72dac594423375aa09cfa1d7eb
Author: Stefan Monnier <monnier@iro.umontreal.ca>
Commit: Stefan Monnier <monnier@iro.umontreal.ca>
* packages/xclip/xclip.el: Tweak last patch
(xclip-method): Shorten tag.
(xclip-set-selection, xclip-get-selection): Only use termux-clipboard
when `type` is `clipboard`.
---
xclip.el | 22 ++++++++++++----------
1 file changed, 12 insertions(+), 10 deletions(-)
diff --git a/xclip.el b/xclip.el
index 28c8327..1713bf7 100644
--- a/xclip.el
+++ b/xclip.el
@@ -5,7 +5,7 @@
;; Author: Leo Liu <sdl.web@gmail.com>
;; Keywords: convenience, tools
;; Created: 2007-12-30
-;; Version: 1.8
+;; Version: 1.9
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
@@ -32,7 +32,8 @@
;; http://www.vergenet.net/~conrad/software/xsel/ respectively).
;; - MacOS: `pbpaste/pbcopy'
;; - Cygwin: `getclip/putclip'
-;; - Termux: `termux-clipboard-get/termux-clipboard-set'
+;; - Under Wayland: `wl-clipboard' (https://github.com/bugaevc/wl-clipboard)
+;; - Termux: `termux-clipboard-get/set'
;; - Emacs: It can also use Emacs's built-in GUI support to talk to the GUI.
;; This requires an Emacs built with GUI support.
;; It uses `make-frame-on-display' which has been tested to work under X11,
@@ -76,7 +77,7 @@ If non-nil `xclip-program' is ignored.")
(and (executable-find "xclip") 'xclip)
(and (executable-find "xsel") 'xsel)
(and (executable-find "wl-copy") 'wl-copy) ;github.com/bugaevc/wl-clipboard
- (and (executable-find "termux-clipboard-get") 'termux-clipboard-get)
;github.com/bugaevc/wl-clipboard
+ (and (executable-find "termux-clipboard-get") 'termux-clipboard-get)
(and (fboundp 'x-create-frame) (getenv "DISPLAY") 'emacs)
'xclip)
"Method to use to access the GUI's clipboard.
@@ -88,7 +89,7 @@ and `getclip' under Cygwin, or `emacs' to use Emacs's GUI
code for that."
(const :tag "X11: xclip" xclip)
(const :tag "X11: xsel" xsel)
(const :tag "Wayland: wl-copy" wl-copy)
- (const :tag "Termux: termux-clipboard-get/termux-clipboard-set"
termux-clipboard-get)
+ (const :tag "Termux: termux-clipboard-get/set" termux-clipboard-get)
(const :tag "X11: Emacs" emacs)))
(defcustom xclip-program (symbol-name xclip-method)
@@ -140,11 +141,11 @@ See also `x-set-selection'."
"wl-copy" nil xclip-program
(if (memq type '(primary PRIMARY)) '("-p")))))
(`termux-clipboard-get
- (start-process "termux-clipboard-set" nil
- (replace-regexp-in-string
- "\\(.*\\)termux-clipboard-get"
- "\\1termux-clipboard-set"
- xclip-program 'fixedcase)))
+ (when (memq type '(clipboard CLIPBOARD))
+ (start-process "termux-clipboard-set" nil
+ (replace-regexp-in-string
+ "\\(.*\\)get" "\\1set"
+ xclip-program 'fixedcase))))
(method (error "Unknown `xclip-method': %S" method)))))
(when proc
(process-send-string proc data)
@@ -186,7 +187,8 @@ See also `x-set-selection'."
nil standard-output nil
(if (memq type '(primary PRIMARY)) '("-p")))))
(`termux-clipboard-get
- (call-process xclip-program nil standard-output nil))
+ (when (memq type '(clipboard CLIPBOARD))
+ (call-process xclip-program nil standard-output nil)))
(method (error "Unknown `xclip-method': %S" method))))))
;;;###autoload
- [elpa] externals/xclip d778c36 01/18: Add xclip.el., (continued)
- [elpa] externals/xclip d778c36 01/18: Add xclip.el., Stefan Monnier, 2020/11/28
- [elpa] externals/xclip 201b390 03/18: * xclip.el: Some cleanups and fix copyright years., Stefan Monnier, 2020/11/28
- [elpa] externals/xclip 5b55f20 04/18: * xclip.el: Use pbcopy and pbpaste if available, Stefan Monnier, 2020/11/28
- [elpa] externals/xclip 145cdb7 06/18: * xclip/xclip.el: Use gui-backend-*-selection in Emacsā„25, Stefan Monnier, 2020/11/28
- [elpa] externals/xclip 1c536bb 05/18: * xclip.el: Fix last change, Stefan Monnier, 2020/11/28
- [elpa] externals/xclip 6d62531 10/18: * xclip/xclip.el: Add new `emacs` method, Stefan Monnier, 2020/11/28
- [elpa] externals/xclip ad395be 08/18: * xclip/xclip.el: Fix bug#33399, Stefan Monnier, 2020/11/28
- [elpa] externals/xclip 7b7b6d2 13/18: xclip.el: Add support for termux-clipboard-get/set, Stefan Monnier, 2020/11/28
- [elpa] externals/xclip 0029bde 16/18: * packages/xclip/xclip.el: Fix it when loaded before term/xterm.el, Stefan Monnier, 2020/11/28
- [elpa] externals/xclip 0118d7a 18/18: * .gitignore: New file, Stefan Monnier, 2020/11/28
- [elpa] externals/xclip 89e061e 14/18: * packages/xclip/xclip.el: Tweak last patch,
Stefan Monnier <=
- [elpa] externals/xclip a5e0330 02/18: * xclip.el: Better follow conventions., Stefan Monnier, 2020/11/28
- [elpa] externals/xclip ef584a0 11/18: * xclip/xclip.el: Don't use remote processes to get selection, Stefan Monnier, 2020/11/28
- [elpa] externals/xclip 9407231 12/18: * packages/xclip/xclip.el: Add tentative support for wl-clipboard, Stefan Monnier, 2020/11/28
- [elpa] externals/xclip 9ced2ac 17/18: * packages/xclip/xclip.el: Add tentative WSL support, Stefan Monnier, 2020/11/28
- [elpa] externals/xclip f7b69fa 07/18: * xclip/xclip.el: Add support for `xsel` and Cygwin's `getclip`, Stefan Monnier, 2020/11/28
- [elpa] externals/xclip aed39ef 09/18: * xclip/xclip.el: Make it work again on Emacs<25, Stefan Monnier, 2020/11/28
- [elpa] externals/xclip 84b363d 15/18: * xclip.el (xclip-get-selection): Tell wl-paste not to add a newline, Stefan Monnier, 2020/11/28