top  Index  Search  Changes  RSS  Login

ReminderPath

あるホルダを通常検索の対象にはしないが,TODO や Schedule の対象に することは可能でしょうか? - 2ch2:374


こんな感じでしょうか. すなおに通常検索の対象にしてしまう方がおすすめですけど…

 ;; リマインダについては, ~/hoge/ と ~/fuga/piyo/ も探す
 (setq my-howm-reminder-additional-path '("~/hoge/" "~/fuga/piyo/"))
 (defun my-howm-reminder-search-path ()
   (append my-howm-reminder-additional-path (howm-search-path t)))
 
 ;; This doesn't work well. See below.
 ;(defadvice howm-reminder-search-path (around add-path activate)
 ;  (setq ad-return-value (my-howm-reminder-search-path)))
 
 ;; Necessary to cheat howm-item-exclude-p. Sigh...
 (defmacro with-my-cheat-exclusion (&rest body)
   `(let ((howm-search-path my-howm-reminder-additional-path)
          (howm-search-other-dir t))
      ,@body))
 (defmacro my-cheat-exclusion (func)
   `(defadvice ,func (around add-path activate)
      (with-my-cheat-exclusion
        ad-do-it)))
 (my-cheat-exclusion howm-list-reminder)
 (my-cheat-exclusion howm-reminder-search)
 
 ;; To jump from "> ..." in menu.
 (defun my-howm-menu-keyword-search (keyword &optional create-p open-unique-p)
   (with-my-cheat-exclusion
     (howm-keyword-search keyword create-p open-unique-p)))
 (defadvice howm-menu-list-rules (around add-path activate)
   (setq ad-return-value
         (list (howm-action-lock-general #'my-howm-menu-keyword-search
                                         howm-menu-list-regexp
                                         howm-menu-list-regexp-key-pos
                                         howm-menu-list-regexp-action-pos
                                         nil
                                         t))))

(Please LogIn to post comments.)

Last modified:2008/03/09 21:04:02
Keyword(s):
References:[複数ディレクトリ] [SetMode]