From: Ori Date: Thu, 24 Jun 2021 19:43:58 +0000 (-0400) Subject: emacs: Add compatibility for org-msg.el X-Git-Tag: archive/debian/0.33_rc0-1~56 X-Git-Url: https://git.cworth.org/git?p=notmuch;a=commitdiff_plain;h=2c96956b3b5d60ae25885f4fa06cbc98e567d263 emacs: Add compatibility for org-msg.el Enable `notmuch-company` with `org-msg`, which does not derive from `message-mode` in composing. This change was first proposed in the discussion here: https://github.com/jeremy-compostella/org-msg/issues/53 --- diff --git a/NEWS b/NEWS index 09456f60..c167c9a2 100644 --- a/NEWS +++ b/NEWS @@ -8,6 +8,8 @@ Emacs previous behaviour of using notmuch to send mail by default, customize `mail-user-agent` to `notmuch-user-agent`. +`notmuch-company` now works in `org-msg`. + Vim --- diff --git a/emacs/notmuch-company.el b/emacs/notmuch-company.el index c6a004ae..7e05dc8f 100644 --- a/emacs/notmuch-company.el +++ b/emacs/notmuch-company.el @@ -70,7 +70,8 @@ (completion-ignore-case t)) (cl-case command (interactive (company-begin-backend 'notmuch-company)) - (prefix (and (derived-mode-p 'message-mode) + (prefix (and (or (derived-mode-p 'message-mode) + (derived-mode-p 'org-msg-edit-mode)) (looking-back (concat notmuch-address-completion-headers-regexp ".*") (line-beginning-position))