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