[Howm-eng 60] Re: Separating work and personal

khi****@users***** khi****@users*****
Wed Apr 9 22:41:01 JST 2008


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****@users*****




More information about the Howm-eng mailing list