[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/gnorb 269a8a8 363/449: New function gnorb-install-defau
From: |
Stefan Monnier |
Subject: |
[elpa] externals/gnorb 269a8a8 363/449: New function gnorb-install-defaults |
Date: |
Fri, 27 Nov 2020 23:16:12 -0500 (EST) |
branch: externals/gnorb
commit 269a8a82216a1e7309891b2e0af0e0d5dc879442
Author: Eric Abrahamsen <eric@ericabrahamsen.net>
Commit: Stefan Monnier <monnier@iro.umontreal.ca>
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
Gnorb.
---
gnorb-utils.el | 43 +++++++++++++++++++++++++++++++++++++++++++
1 file changed, 43 insertions(+)
diff --git a/gnorb-utils.el b/gnorb-utils.el
index ce3f7fd..43ff5fc 100644
--- a/gnorb-utils.el
+++ b/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
'gnorb-registry-capture-abort-cleanup)
(setq gnorb-tracking-enabled t))))
+;;;###autoload
+(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")
#'gnorb-org-handle-mail)
+ (org-defkey org-agenda-mode-map (kbd "C-c v")
#'gnorb-org-view)))))
+ (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")
#'gnorb-gnus-incoming-do-todo)
+ (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")
#'gnorb-gnus-outgoing-do-todo))))
+
(provide 'gnorb-utils)
;;; gnorb-utils.el ends here
- [elpa] externals/gnorb e8d0043 405/449: Missing a require for seq package, (continued)
- [elpa] externals/gnorb e8d0043 405/449: Missing a require for seq package, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb cb25e86 406/449: New function gnorb-gnus-search-registry, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 5f885be 398/449: Gnorb: New command for inserting tracked messages; bump to 1.4.1, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 8922fd0 409/449: [gnorb] Fix immediate and inexplicable typos, bump to 1.5.1, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 0c20b7d 397/449: Provide Org tagging for Gnus messages, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb c2f837c 341/449: Improve efficiency of retrieving tracked messages, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 6917948 343/449: Bah, typo, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 47195a6 349/449: Require gnorb-gnus in the gnus-started-hook, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb b892337 356/449: Bump version to 1.1.3, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 5c270cd 357/449: Update NEWS file, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 269a8a8 363/449: New function gnorb-install-defaults,
Stefan Monnier <=
- [elpa] externals/gnorb 27b58a9 364/449: Fix autoloads for BBDB functions, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb d1299d2 388/449: Gnorb: Consolidate all after-capture functions into one, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 6722839 327/449: Formatting improvements, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 8c2fb15 329/449: nngnorb.el: Handle non-existent nnir-tmp-buffer, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 9da022f 366/449: Fix creation of nngnorb/nnir groups, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 632b03d 367/449: Add gnorb-version command, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 7908f75 371/449: Update Gnus summary article line after trigger process, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb e865a8b 381/449: Odd bug in gnorb-org-handle-mail, bump to 1.3.1, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb af3521f 385/449: When responding, let a blank sender pass, Stefan Monnier, 2020/11/27
- [elpa] externals/gnorb 5d59ba6 392/449: Gnorb: Bump version to 1.3.3, tiny manual fix, Stefan Monnier, 2020/11/27