From mboxrd@z Thu Jan 1 00:00:00 1970 From: khi at users.sourceforge.jp (khi at users.sourceforge.jp) Date: Wed, 09 Apr 2008 22:41:01 +0900 Subject: [Howm-eng 60] Re: Separating work and personal In-Reply-To: <2f1c7d020804090622s588658a8nc96bb19d4a5134c3@mail.gmail.com> References: <2f1c7d020804090622s588658a8nc96bb19d4a5134c3@mail.gmail.com> Message-ID: Welcome, Schmitt-san. At Wed, 9 Apr 2008 10:22:21 -0300, Hugo Schmitt wrote: > The only idea i have is to have a function that changes howm default folder > everytime i need to switch contexts. You may want to switch keyword files, too. ;; from http://howm.sourceforge.jp/cgi-bin/hiki/hiki.cgi?SwitchMemoDirectory (defun my-howm-set-directory (dir &optional keyfile) `(lambda () (interactive) (setq howm-directory ,dir) (when ,keyfile (setq howm-keyword-file ,keyfile)) (setq howm-menu-next-expiry-time (current-time)) (message "%s" ,dir))) ;; switch context and open menu (defun my-howm-switch-directory (dir &optional keyfile) (funcall (my-howm-set-directory dir keyfile)) (howm-menu)) ;; example of key bindings (global-set-key "\C-c,1" (my-howm-set-directory "~/howm1" "~/.howm1-keys")) (global-set-key "\C-c,2" (my-howm-set-directory "~/howm2" "~/.howm2-keys")) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Optionally, you can switch contexts with keys "1" and "2" on the menu buffer *howmM:%menu%* if you write the below strings in your menu file 0000-00-00-000000.howm. %"1" %eval%(my-howm-switch-directory "~/howm1" "~/.howm1-keys") %"2" %eval%(my-howm-switch-directory "~/howm2" "~/.howm2-keys") Regards -- khi at users.sourceforge.jp