From mboxrd@z Thu Jan 1 00:00:00 1970 From: khi at users.sourceforge.jp (khi at users.sourceforge.jp) Date: Mon, 07 Apr 2008 21:56:16 +0900 Subject: [Howm-eng 44] GPG with EasyPG (Re: Newbie...) In-Reply-To: <200804060000.m3600Obl007694@localhost.localdomain> References: <200804050000.m3500PHr004373@localhost.localdomain> <200804060000.m3600Obl007694@localhost.localdomain> Message-ID: At Sun, 6 Apr 2008 02:00:26 +0200, Xavier Maillard wrote: > Well in principle, it is pretty simple to achieve encryption. I > am used to EPG (part of GNU Emacs). I used local-vars to force > automatic encryption of a set of org-mode files. Oh! EasyPG runs well with howm! (1) Run gpg-agent. (2) Put *.gpg into ~/howm/. (3) M-x epa-file-enable Then howm can search *.gpg seamlessly. Below is a quick hack to use external grep and EPG at the same time. * All files in ~/howm/ are searched by the external grep command. * All files in ~/gpg/ are searched by elisp so that EPG is applied. This is necessary because searching all files with elisp is too slow for me. Test version (howm-test071107) is required for this code. http://howm.sourceforge.jp/a/howm-test.tar.gz ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (setq howm-view-use-grep t) (epa-file-enable) ;; clone of *:dir except for the use of fake-grep. (defun howm-make-folder:edir (dir) (cons ':edir dir)) (defun howm-folder-items:edir (edir &optional recursive-p) (howm-folder-items:dir (cdr edir) recursive-p)) (defun howm-folder-grep-internal:edir (edir pattern &optional fixed-p) (let ((howm-view-use-grep nil)) (howm-folder-grep-internal:dir (cdr edir) pattern fixed-p))) (defun howm-folder-get-page-create:edir (edir page-name) (howm-folder-get-page-create:dir (cdr edir) page-name)) (defun howm-folder-territory-p:edir (edir name) (howm-folder-territory-p:dir (cdr edir) name)) ;; check all howm-search-path. (defun howm-list-all () (interactive) (howm-set-command 'howm-list-all) ; (howm-view-directory (car (howm-search-path)) t) (howm-view-summary "" (mapcan (lambda (p) (howm-folder-items p t)) (howm-search-path))) (howm-list-normalize) ;; clean me [2004-07-11] (cond ((howm-list-title-p) t) ;; already done in (howm-list-normalize) (howm-list-all-title (howm-list-title-internal)))) (howm-toggle-search-other-dir 1) (setq howm-search-path (list (howm-make-folder:edir "~/gpg"))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;