Remove company mode when editing GPG files
aitor <[email protected]>
| Newsgroups | gmane.emacs.help |
|---|---|
| Message-ID | <aZ_1cb2Lk1KgIaWk@sipc87> |
Hi!
I store my passwords on GPG files and manage them within emacs using the
epa package. When editing GPG files I want to momentarily disable
company-mode (which is set wih `(global-company-mode)' in my .init.el),
and I use this code for that:
(use-package epa
;; disable company when visiting pgp files
:hook (auto-encryption-mode . (lambda ()
(progn
(message "auto-encryption-mode hook")
(company-mode -1)))))
The code does not work. When I open a GPG file the hook is not called,
company-mode is still active, and nothing shows in the *Messages*
buffer. If I manually activate the minor mode while visiting the file
"C-u 1 M-x auto-encryption-mode" then the message does appear and
company-mode gets disabled.
Any help?