branch: externals/clipboard-collector
commit 0795dacd9a70fc7578e5a3258d42aa650e09312c
Author: Clemera <[email protected]>
Commit: Clemera <[email protected]>

    Fix order for finish function and update Readme
---
 README.org             | 12 ++++++++++--
 clipboard-collector.el |  2 +-
 2 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/README.org b/README.org
index d595275..27e40b8 100644
--- a/README.org
+++ b/README.org
@@ -29,8 +29,7 @@ transformed to be used as property drawer items).
 
 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.
+are transformed via the format string and saved for later processing.
 
 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).
@@ -42,3 +41,12 @@ place afterwards you could use:
 (clipboard-collector-create cc-all
  ((".*"  "%s")))
 #+END_SRC
+
+It's also possible to provide an additional function to transform the contents
+before applying the format string. For example to upcase all collected items 
you would
+use something like this:
+
+#+BEGIN_SRC elisp
+(clipboard-collector-create cc-all-up
+ ((".*"  "%s" upcase)))
+#+END_SRC
diff --git a/clipboard-collector.el b/clipboard-collector.el
index 19f6d66..41a07a3 100644
--- a/clipboard-collector.el
+++ b/clipboard-collector.el
@@ -155,7 +155,7 @@ clipboard contents."
   (clipboard-collector-stop-watch)
   (unwind-protect
       (funcall clipboard-collector--finish-function
-               (mapcar #'cdr clipboard-collector--items))
+               (nreverse (mapcar #'cdr clipboard-collector--items)))
     (clipboard-collector-mode -1)))
 
 (defvar clipboard-collector-display-function

Reply via email to