From mboxrd@z Thu Jan 1 00:00:00 1970 From: Colin Baxter Subject: Re: An org password manager Date: Wed, 14 May 2014 11:01:38 +0100 Message-ID: <87y4y4u1a5.fsf@redstar.home> References: <87d2fklwkv.fsf@gmail.com> <87iopcad7f.fsf@gmail.com> <87fvkg4dw5.fsf@redstar.home> <87ha4v9znr.fsf@gmail.com> <87zjin6p5t.fsf@redstar.home> <874n0uaboh.fsf@gmail.com> <87fvkdzyjm.fsf@redstar.home> <87y4y5c0nu.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:37490) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WkW0b-0007WV-Cs for emacs-orgmode@gnu.org; Wed, 14 May 2014 06:02:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WkW0T-0003KA-UX for emacs-orgmode@gnu.org; Wed, 14 May 2014 06:01:57 -0400 Received: from plane.gmane.org ([80.91.229.3]:49795) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WkW0T-0003Jn-PF for emacs-orgmode@gnu.org; Wed, 14 May 2014 06:01:49 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1WkW0O-0005Uv-64 for emacs-orgmode@gnu.org; Wed, 14 May 2014 12:01:44 +0200 Received: from host81-153-143-243.range81-153.btcentralplus.com ([81.153.143.243]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 14 May 2014 12:01:44 +0200 Received: from m43cap by host81-153-143-243.range81-153.btcentralplus.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 14 May 2014 12:01:44 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Dear Jorge, Many thanks for this. I had forgotten about "define-derived-mode". Best wishes, Colin. > Dear Ramon and Colin, > > If you are using an "(add-to-list 'auto-mode-alist ...)" for the gpg > files, that sets the major mode on. If you want to leave the major mode > as Org, do not use auto-mode-alist, but instead use a hook: > (add-hook 'org-mode-hook 'your-function), where your-function should be > one that checks if the file name ends with gpg and if so turns your > sensitivity-mode on. > > Alternatively, define another major mode: > > #+BEGIN_SRC emacs-lisp > (define-derived-mode org-but-sensitive-mode org-mode > ...) > #+END_SRC > > and copy in "..." whatever your sensitive-minor-mode has. > > Best, > > Jorge. > > >