emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] An org password manager


From: Colin Baxter
Subject: Re: [O] An org password manager
Date: Wed, 14 May 2014 11:01:38 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

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.
>
>
>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]