From e244edff767b1d19d95820f5adbdda3853f42ab2 Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Thu, 1 May 2014 21:58:43 -0400 Subject: Remove Bog agenda command --- bog.el | 32 ++++++-------------------------- 1 file changed, 6 insertions(+), 26 deletions(-) (limited to 'bog.el') diff --git a/bog.el b/bog.el index 45e7db7..7ca3ec5 100644 --- a/bog.el +++ b/bog.el @@ -186,17 +186,6 @@ level to operate on." :group 'bog :type 'string) -(defcustom bog-agenda-custom-command-key "b" - "Key to use for Bog notes search key in agenda dispatch. -If nil, a custom command will not be added to Org agenda -dispatch, but searching Bog notes through the agenda interface -will still be available through `bog-search-notes' and -`bog-search-notes-for-citekey'." - :group 'bog - :type '(choice - (const :tag "Don't display in agenda dispatch" nil) - (string :tag "Key for agenda dispatch"))) - ;;; Citekey methods @@ -667,7 +656,8 @@ level `bog-refile-maxlevel' are considered." "Search notes using `org-search-view'. With prefix argument TODO-ONLY, only TODO entries are searched." (interactive "P") - (let ((lprops (nth 4 bog-agenda-custom-command))) + (let ((lprops '((org-agenda-files (bog-notes-files)) + (org-agenda-text-search-extra-files nil)))) (put 'org-agenda-redo-command 'org-lprops lprops) (org-let lprops '(org-search-view todo-only)))) @@ -676,7 +666,8 @@ With prefix argument TODO-ONLY, only TODO entries are searched." With prefix argument TODO-ONLY, only TODO entries are searched." (interactive "P") (let ((citekey (bog-citekey-from-notes)) - (lprops (nth 4 bog-agenda-custom-command))) + (lprops '((org-agenda-files (bog-notes-files)) + (org-agenda-text-search-extra-files nil)))) (put 'org-agenda-redo-command 'org-lprops lprops) (org-let lprops '(org-search-view todo-only citekey)))) @@ -828,11 +819,6 @@ chosen." map) "Keymap for Bog.") -(defvar bog-agenda-custom-command - `(,(or bog-agenda-custom-command-key "b") "Search Bog notes" search "" - ((org-agenda-files (bog-notes-files)) - (org-agenda-text-search-extra-files nil)))) - ;;;###autoload (define-minor-mode bog-mode "Toggle Bog in this buffer. @@ -847,15 +833,9 @@ ARG is omitted or nil. :require 'bog (cond (bog-mode - (bog-add-fontlock) - (when bog-agenda-custom-command-key - (add-to-list 'org-agenda-custom-commands - bog-agenda-custom-command))) + (bog-add-fontlock)) (t - (bog-remove-fontlock) - (when bog-agenda-custom-command - (setq org-agenda-custom-commands (delete bog-agenda-custom-command - org-agenda-custom-commands)))))) + (bog-remove-fontlock)))) (provide 'bog) -- cgit v1.2.3