[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/clipboard-collector 1b96653 06/31: Use C-c C-c binding
From: |
Stefan Monnier |
Subject: |
[elpa] externals/clipboard-collector 1b96653 06/31: Use C-c C-c binding |
Date: |
Sun, 6 Jan 2019 17:16:19 -0500 (EST) |
branch: externals/clipboard-collector
commit 1b966538f7edfecbb7d88b771fb70296ff671644
Author: Clemera <address@hidden>
Commit: Clemera <address@hidden>
Use C-c C-c binding
---
README.org | 17 ++++++++++++++++-
clipboard-collector.el | 10 ++++++----
2 files changed, 22 insertions(+), 5 deletions(-)
diff --git a/README.org b/README.org
index 80489bb..d595275 100644
--- a/README.org
+++ b/README.org
@@ -12,7 +12,6 @@ contact information from a website for org capture (contact
info gets
transformed to be used as property drawer items).
-
#+BEGIN_SRC elisp
(clipboard-collector-create cc-capture-rss
(("^http.*twitter.com" ":TWITTER: %s")
@@ -27,3 +26,19 @@ transformed to be used as property drawer items).
(clipboard-collector-finish-default items)
(org-capture-finalize)))
#+END_SRC
+
+This creates a command called =cc-capture-rss=. When called the clipboard is
+observed and on changes which match one of the regexes, the clipboard contents
+are transformed via the format string. It's also possible to provide an
+additional function to transform the contents before applying the format
string.
+
+When done you can press =C-c C-c= to call the finalize function (in the above
+example it would inserts the collected items and finish the org-capture).
+
+If you would like to simply collect items as they are and paste them at some
other
+place afterwards you could use:
+
+#+BEGIN_SRC elisp
+(clipboard-collector-create cc-all
+ ((".*" "%s")))
+#+END_SRC
diff --git a/clipboard-collector.el b/clipboard-collector.el
index a18408b..19f6d66 100644
--- a/clipboard-collector.el
+++ b/clipboard-collector.el
@@ -102,6 +102,11 @@ the matched regex.")
(defvar clipboard-collector--timer nil)
+(defvar clipboard-collector-mode-map
+ (let ((map (make-sparse-keymap)))
+ (prog1 map
+ (define-key map (kbd "C-c C-c") 'clipboard-collector-finish))))
+
(define-minor-mode clipboard-collector-mode
"This mode is for internal use only.
@@ -126,10 +131,7 @@ clipboard contents."
(message "Start collecting, finish with %s."
(substitute-command-keys "\\[clipboard-collector-finish]")))
-(defvar clipboard-collector-mode-map
- (let ((map (make-sparse-keymap)))
- (prog1 map
- (define-key map "\r" 'clipboard-collector-finish))))
+
(defun clipboard-collector-stop-watch ()
- [elpa] externals/clipboard-collector 5e59682 30/31: Update email, (continued)
- [elpa] externals/clipboard-collector 5e59682 30/31: Update email, Stefan Monnier, 2019/01/06
- [elpa] externals/clipboard-collector 25c4bb4 25/31: Use select-enable-clipboard instead of select-enable-primary, Stefan Monnier, 2019/01/06
- [elpa] externals/clipboard-collector 440c280 23/31: Use transient map, Stefan Monnier, 2019/01/06
- [elpa] externals/clipboard-collector 7a3ab81 29/31: Update package headers, Stefan Monnier, 2019/01/06
- [elpa] externals/clipboard-collector bb7d569 24/31: Improve description, Stefan Monnier, 2019/01/06
- [elpa] externals/clipboard-collector 7bbdece 19/31: Update docs, Stefan Monnier, 2019/01/06
- [elpa] externals/clipboard-collector c904691 01/31: Initial commit, Stefan Monnier, 2019/01/06
- [elpa] externals/clipboard-collector fe40dfe 11/31: Put collected item in quotes (for message), Stefan Monnier, 2019/01/06
- [elpa] externals/clipboard-collector ea38d50 18/31: Make mode global, Stefan Monnier, 2019/01/06
- [elpa] externals/clipboard-collector eb43fe1 16/31: Update package header, Stefan Monnier, 2019/01/06
- [elpa] externals/clipboard-collector 1b96653 06/31: Use C-c C-c binding,
Stefan Monnier <=
- [elpa] externals/clipboard-collector e587974 14/31: Rephrase description, Stefan Monnier, 2019/01/06
- [elpa] externals/clipboard-collector 4bbc844 15/31: Rephrase desc. again, Stefan Monnier, 2019/01/06
- [elpa] externals/clipboard-collector d3e2659 28/31: Update Readme, Stefan Monnier, 2019/01/06
- [elpa] externals/clipboard-collector ff6c25c 22/31: Depend on emacs 25 and linux, Stefan Monnier, 2019/01/06
- [elpa] externals/clipboard-collector 4610a49 31/31: Update commentary, Stefan Monnier, 2019/01/06
- [elpa] externals/clipboard-collector dc4b60f 20/31: Cancel on error, Stefan Monnier, 2019/01/06
- [elpa] externals/clipboard-collector d7fff65 09/31: Rephrase, Stefan Monnier, 2019/01/06
- [elpa] externals/clipboard-collector f2702a8 12/31: Cleanup, Stefan Monnier, 2019/01/06
- [elpa] externals/clipboard-collector a6a13eb 05/31: Rephrase description, Stefan Monnier, 2019/01/06
- [elpa] externals/clipboard-collector 7c5659e 26/31: Add gpastel support, Stefan Monnier, 2019/01/06