From 6657e3262f326180e3a97b139f02992e1dbd9c57 Mon Sep 17 00:00:00 2001 From: Don Armstrong Date: Wed, 10 Jan 2018 15:11:53 -0800 Subject: [PATCH] add helm google and zap-to-char --- emacs_el/configuration/don-configuration.org | 35 +++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/emacs_el/configuration/don-configuration.org b/emacs_el/configuration/don-configuration.org index d5d0d3c..5ce8115 100644 --- a/emacs_el/configuration/don-configuration.org +++ b/emacs_el/configuration/don-configuration.org @@ -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) -- 2.39.5