]> git.cworth.org Git - notmuch/commitdiff
emacs: Add compatibility for org-msg.el
authorOri <ori@oribarbut.com>
Thu, 24 Jun 2021 19:43:58 +0000 (15:43 -0400)
committerDavid Bremner <david@tethera.net>
Thu, 24 Jun 2021 20:26:43 +0000 (17:26 -0300)
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

NEWS
emacs/notmuch-company.el

diff --git a/NEWS b/NEWS
index 09456f605908aa34ffa565bba68db992e494f93c..c167c9a24bf14907a9e083f26751991a26fbe475 100644 (file)
--- 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
 ---
 
index c6a004aebe92bcd447ee93729a54a2518052200b..7e05dc8f2a796aaf2c664fdcc4be63f6a443057f 100644 (file)
@@ -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))