]> git.donarmstrong.com Git - lib.git/commitdiff
add helm google and zap-to-char
authorDon Armstrong <don@donarmstrong.com>
Wed, 10 Jan 2018 23:11:53 +0000 (15:11 -0800)
committerDon Armstrong <don@donarmstrong.com>
Wed, 10 Jan 2018 23:11:53 +0000 (15:11 -0800)
emacs_el/configuration/don-configuration.org

index d5d0d3c739884aa39dc05fed7b3aa8d0b769e03f..5ce8115e92682b1d801970685562dbd0cb17e785 100644 (file)
@@ -502,7 +502,40 @@ value, scrolling continues until there is no more output.
                    ((equal arg 16) (helm-org-rifle-occur-agenda-files))
                    (t (helm-org-agenda-files-headings)))))))
 #+END_SRC
-
+*** Helm Google
+This can be used to link things pretty quickly if necessary
+#+BEGIN_SRC emacs-lisp
+  (use-package helm-google
+    :ensure t
+    :bind ("C-c h g" . helm-google)
+    :config
+    (progn (add-to-list 'helm-google-actions
+                        '("Copy URL" . (lambda (candidate)
+                                         (let ((url
+                                                (replace-regexp-in-string
+                                                 "https://.*q=\\(.*\\)\&sa=.*"
+                                                 "\\1" candidate)))
+                                           (kill-new url))))
+                        t
+                        )
+         
+           (add-to-list 'helm-google-actions
+                        '("Org Store Link" . (lambda (candidate)
+                                               (let ((title (car (split-string candidate "[\n]+")))
+                                                     (url
+                                                      (replace-regexp-in-string
+                                                       "https://.*q=\\(.*\\)\&sa=.*"
+                                                       "\\1" candidate)))
+                                                 (push (list url title) org-stored-links))))
+                        t)
+           ))
+#+END_SRC
+** Zap to char
+#+BEGIN_SRC emacs-lisp
+  (use-package avy-zap
+    :ensure t
+    :bind ("M-z" . avy-zap-up-to-char-dwim))
+#+END_SRC
 ** Hydra
 #+BEGIN_SRC emacs-lisp :tangle don-configuration.el
 (require 'don-hydra)