Re: Remove company mode when editing GPG files
aitor <[email protected]>
| Newsgroups | gmane.emacs.help |
|---|---|
| Message-ID | <aaAvuWwFoahRyUgZ@sipc87> |
On Thu, Feb 26, 2026 at 10:01:05AM +0100, Tassilo Horn wrote:
> > 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)))))
>
> I think :hook wants an alist of hooks and actions, not a single pair of
> one hook with one action, i.e., you have to slap around another pair of
> parentheses around your value.
Unfortunately adding a level of parentheses did not work. The hook gets
actually executed if I manually active the 'auto-encryption-mode' minor
mode ("C-u 1 M-x auto-encryption-mode"), but not when visiting a file
with extension 'gpg'.
best,
aitor