[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/gpastel 4f80b88 08/15: Add EXWM-related snippets to REA
From: |
Stefan Monnier |
Subject: |
[elpa] externals/gpastel 4f80b88 08/15: Add EXWM-related snippets to README |
Date: |
Wed, 19 Dec 2018 12:31:38 -0500 (EST) |
branch: externals/gpastel
commit 4f80b88fb0bd68e68db4aeb255b258a9c1fdb95a
Author: Damien Cassou <address@hidden>
Commit: Damien Cassou <address@hidden>
Add EXWM-related snippets to README
---
README.org | 62 +++++++++++++++++++++++++++++++++++++++++---------------------
1 file changed, 41 insertions(+), 21 deletions(-)
diff --git a/README.org b/README.org
index 15fa352..ba1909b 100644
--- a/README.org
+++ b/README.org
@@ -55,32 +55,52 @@ you are using EXWM, add ~gpastel-start-listening~ to
(gpastel-start-listening)
#+END_SRC
-If you are using EXWM and [[http://oremacs.com/swiper/][Counsel]], you can add
this to your
-initialization file too:
-
-#+BEGIN_SRC emacs-lisp
- (exwm-input-set-key (kbd "M-y") #'my/exwm-counsel-yank-pop)
-
- (defun my/exwm-counsel-yank-pop ()
- "Same as `counsel-yank-pop' and paste into exwm buffer."
- (interactive)
- (let ((inhibit-read-only t)
- ;; Make sure we send selected yank-pop candidate to
- ;; clipboard:
- (yank-pop-change-selection t))
- (call-interactively #'counsel-yank-pop))
- (when (derived-mode-p 'exwm-mode)
- (exwm-input--fake-key ?\C-v)))
-#+END_SRC
-
-This will let you access the ~kill-ring~ and paste any element to any
-application.
-
** Usage
There is nothing more to do than copying text the normal way. All
copied texts should appear in the Emacs ~kill-ring~ now.
+*** For EXWM users
+
+If you use EXWM and you want to access the ~kill-ring~ from any
+application (instead of the less powerful system clipboard), I
+recommend you either install and configure
[[http://oremacs.com/swiper/][counsel]] or
+[[https://github.com/browse-kill-ring/browse-kill-ring][browse-kill-ring]].
Then, you can add one of the following two
+configuration snippets to your initialization file.
+
+**** For EXWM+counsel users
+
+Add the following to your initialization file:
+
+ #+BEGIN_SRC emacs-lisp
+ (exwm-input-set-key (kbd "M-y") #'my/exwm-counsel-yank-pop)
+
+ (defun my/exwm-counsel-yank-pop ()
+ "Same as `counsel-yank-pop' and paste into exwm buffer."
+ (interactive)
+ (let ((inhibit-read-only t)
+ ;; Make sure we send selected yank-pop candidate to
+ ;; clipboard:
+ (yank-pop-change-selection t))
+ (call-interactively #'counsel-yank-pop))
+ (when (derived-mode-p 'exwm-mode)
+ (exwm-input--fake-key ?\C-v)))
+ #+END_SRC
+
+**** For EXWM+browse-kill-ring users
+
+[[https://github.com/kriyative][Ram Krishnan]] gives us the following piece of
code for browse-kill-ring users:
+
+#+BEGIN_SRC emacs-lisp
+ (define-advice browse-kill-ring-insert-and-highlight
+ (:around (old-function str) exwm-paste)
+ "Paste the selection appropriately in exwm mode buffers."
+ (if (not (derived-mode-p 'exwm-mode))
+ (funcall old-function str)
+ (kill-new str)
+ (exwm-input--fake-key ?\C-v)))
+#+END_SRC
+
** License
See [[file:COPYING][COPYING]]. Copyright (c) 2018 Damien Cassou.
- [elpa] branch externals/gpastel created (now 9362fee), Stefan Monnier, 2018/12/19
- [elpa] externals/gpastel a5a2a44 01/15: Empty commit, Stefan Monnier, 2018/12/19
- [elpa] externals/gpastel 863065e 03/15: Add link to EXWM, Stefan Monnier, 2018/12/19
- [elpa] externals/gpastel f4046a5 05/15: Check compatibility with Emacs 24., Stefan Monnier, 2018/12/19
- [elpa] externals/gpastel 45f1798 11/15: Fix typo (thanks to Stefan Monnier for noticing), Stefan Monnier, 2018/12/19
- [elpa] externals/gpastel bf79d2e 06/15: Release 0.2.0, Stefan Monnier, 2018/12/19
- [elpa] externals/gpastel ae11a0a 10/15: Update snippet in README to force the focus, Stefan Monnier, 2018/12/19
- [elpa] externals/gpastel fbccc7c 13/15: Use an override advice instead of replacing the variable's value, Stefan Monnier, 2018/12/19
- [elpa] externals/gpastel 927d344 07/15: Make interprogram-paste-function an empty lambda instead of nil, Stefan Monnier, 2018/12/19
- [elpa] externals/gpastel 21b7d79 09/15: Release 0.3.0, Stefan Monnier, 2018/12/19
- [elpa] externals/gpastel 4f80b88 08/15: Add EXWM-related snippets to README,
Stefan Monnier <=
- [elpa] externals/gpastel 7bcdfdc 04/15: Explain EXWM binding a bit more., Stefan Monnier, 2018/12/19
- [elpa] externals/gpastel 9362fee 15/15: Add a global minor mode (idea from Stefan Monnier), Stefan Monnier, 2018/12/19
- [elpa] externals/gpastel c9e02e2 02/15: Initial version, Stefan Monnier, 2018/12/19
- [elpa] externals/gpastel fce251b 12/15: Upgrade Emacs requirement to at least 24.4, Stefan Monnier, 2018/12/19
- [elpa] externals/gpastel b2aab71 14/15: Save former value of a variable modified by gpastel-start-listening, Stefan Monnier, 2018/12/19