[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] master c8a69c7: New function gnorb-install-defaults

From: Eric Abrahamsen
Subject: [elpa] master c8a69c7: New function gnorb-install-defaults
Date: Tue, 14 Mar 2017 00:40:06 -0400 (EDT)

branch: master
commit c8a69c74c78f3537db26f44a8175260af362ae3d
Author: Eric Abrahamsen <address@hidden>
Commit: Eric Abrahamsen <address@hidden>

    New function gnorb-install-defaults
    * packages/gnorb/gnorb-utils.el (gnorb-install-defaults): A function
      for setting up basic default variable settings and keybindings for
 packages/gnorb/gnorb-utils.el | 43 +++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 43 insertions(+)

diff --git a/packages/gnorb/gnorb-utils.el b/packages/gnorb/gnorb-utils.el
index e2f7f7a..14fb981 100644
--- a/packages/gnorb/gnorb-utils.el
+++ b/packages/gnorb/gnorb-utils.el
@@ -611,5 +611,48 @@ registry be in use, and should be called after the call to
      (add-hook 'org-capture-prepare-finalize-hook 
      (setq gnorb-tracking-enabled t))))
+(defun gnorb-install-defaults ()
+  "Set up sane Gnorb customizations and keybindings."
+  (interactive)
+  (global-set-key (kbd "C-c A") 'gnorb-restore-layout)
+  (eval-after-load "gnorb-bbdb"
+    '(progn
+       (define-key bbdb-mode-map (kbd "C-c S") #'gnorb-bbdb-mail-search)
+       (define-key bbdb-mode-map (kbd "C-c l") #'gnorb-bbdb-open-link)
+       (define-key bbdb-mode-map [remap bbdb-mail] #'gnorb-bbdb-mail)
+       (eval-after-load "gnorb-org"
+        (org-defkey org-mode-map (kbd "C-c C") #'gnorb-org-contact-link))))
+  (eval-after-load "gnorb-org"
+    '(progn
+       (org-defkey org-mode-map (kbd "C-c t") #'gnorb-org-handle-mail)
+       (org-defkey org-mode-map (kbd "C-c v") #'gnorb-org-view)
+       (org-defkey org-mode-map (kbd "C-c E") #'gnorb-org-email-subtree)
+       (setq gnorb-org-agenda-popup-bbdb t)
+       (eval-after-load "org-agenda"
+         '(progn (org-defkey org-agenda-mode-map (kbd "C-c t") 
+                 (org-defkey org-agenda-mode-map (kbd "C-c v") 
+  (eval-after-load "gnorb-gnus"
+    '(progn
+       (define-key gnus-summary-mime-map "a" #'gnorb-gnus-article-org-attach)
+       (define-key gnus-summary-mode-map (kbd "C-c t") 
+       (define-key gnus-summary-mode-map (kbd "C-c v") #'gnorb-gnus-view)
+       (setq gnorb-gnus-capture-always-attach t)
+       (push '("attach to org heading" . gnorb-gnus-mime-org-attach)
+             gnus-mime-action-alist)
+       ;; The only way to add mime button command keys is by redefining
+       ;; gnus-mime-button-map, possibly not ideal. Ideal would be a
+       ;; setter function in gnus itself.
+       (push '(gnorb-gnus-mime-org-attach "a" "Attach to Org heading")
+             gnus-mime-button-commands)
+       (setq gnus-mime-button-map
+             (let ((map (make-sparse-keymap)))
+               (dolist (c gnus-mime-button-commands)
+                 (define-key map (cadr c) (car c)))
+               map))))
+  (eval-after-load "message"
+    '(progn
+       (define-key message-mode-map (kbd "C-c t") 
 (provide 'gnorb-utils)
 ;;; gnorb-utils.el ends here

reply via email to

[Prev in Thread] Current Thread [Next in Thread]