From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id GIIxAong1GC0SgAAgWs5BA (envelope-from ) for ; Thu, 24 Jun 2021 21:44:09 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id QC1yOYjg1GAYXQAAbx9fmQ (envelope-from ) for ; Thu, 24 Jun 2021 19:44:08 +0000 Received: from mail.notmuchmail.org (nmbug.tethera.net [IPv6:2607:5300:201:3100::1657]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 92A061086A for ; Thu, 24 Jun 2021 21:44:08 +0200 (CEST) Received: from nmbug.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id 1A98C2908B; Thu, 24 Jun 2021 15:44:03 -0400 (EDT) Received: from mail-qk1-x72d.google.com (mail-qk1-x72d.google.com [IPv6:2607:f8b0:4864:20::72d]) by mail.notmuchmail.org (Postfix) with ESMTPS id 34B2929089 for ; Thu, 24 Jun 2021 15:44:01 -0400 (EDT) Received: by mail-qk1-x72d.google.com with SMTP id j184so16658280qkd.6 for ; Thu, 24 Jun 2021 12:44:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oribarbut-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:mime-version; bh=MIcDBr9ijXviAf6tUzaavcIsPsPcZI4Y0VF+Cr1xuRM=; b=Jz8QrxM4bYRCcTQp8cI6JMH9cHJ4xO0dIDWWI1ihKaPOnEX4f5ZvoRJgpTEsiC9Xpf Y6eM1ky/ZQQXFiQ4E/ccE+Vyg9Ja/tGKzOpnPFcdkOmyhKCg2pXjqI9WddkEp+rcr9X4 B8OqZuLTmk+j18F7Rg9/15Xiz3PiuGlKu/MdXW52gUhuPFQ3slicXnBSAmk/HCXtW3ub 63FUFoUub/lj/B9rJnIWq5djY6Hit4vkO9hndJt2Y5HEjblTOWOQpnzxwU8lTbKLmPAn GOsGlusCvZAZen6OguaTyCXCdmZD++ODombiUTO6Hrr7ni2dYfiT7LHXz5zznop4PppM y6/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version; bh=MIcDBr9ijXviAf6tUzaavcIsPsPcZI4Y0VF+Cr1xuRM=; b=ZUgHa3JsXdkRM0SBi4TTyx4nkTzSYWCy5TnXYSbxxGwH5LPcR3lmzeRzIKAN6uLnot Xoa/JGYyG0iI2NOGR0zpxB4s1X2a05iVwWIdx85ORcDcss5xnMtMTPzQusnxQXddIdgw /cGFvcGX7GFmOyw7EtedlAzTYf0TRgAjpfv5rmtaPjPUeQ5hQPHn79HJIVQawx5a4ujF 7USxKrvBGM2osIsgOQydD3QagUhvVBqwZvCTV1jTBk9fK5WBBsSG1xRsCDQ8II2mkFXF ZnyoNkYnZhbPE6fE52yHSsWG6gDyd+d99wdftcRSEBEH48OM9AN4Ui6nT9rZ0c6gvzyk cU1w== X-Gm-Message-State: AOAM531Q/a7nW9VqtHrQ69Kug99Hy3N5/pGJpeE8UCk9ybS80TeAotfP P2iugtNNjgXXVRf6g+tBIhVYFQ== X-Google-Smtp-Source: ABdhPJyaf+qaXE7Jss2WYxKWzgheWaW+EP0JwMt8V5zrs57zL75e5Q2pL9MpbAXiWV6ShCgaZTVE2g== X-Received: by 2002:a37:a20f:: with SMTP id l15mr7407646qke.44.1624563840545; Thu, 24 Jun 2021 12:44:00 -0700 (PDT) Received: from oribarbut.com (96-127-247-73.qc.dsl.ebox.net. [96.127.247.73]) by smtp.gmail.com with ESMTPSA id s20sm2488764qtc.94.2021.06.24.12.44.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Jun 2021 12:44:00 -0700 (PDT) Received: by oribarbut.com (Postfix, from userid 1000) id 31323223FBD; Thu, 24 Jun 2021 15:43:58 -0400 (EDT) From: Ori To: notmuch@notmuchmail.org Cc: Subject: [PATCH] emacs: Add compatibility for org-msg.el Date: Thu, 24 Jun 2021 15:43:58 -0400 Message-ID: <87pmwbdp4x.fsf@oribarbut.com> MIME-Version: 1.0 Message-ID-Hash: EKIULJNXFQUYP3EBEVQ6XGLWTMHYQUCL X-Message-ID-Hash: EKIULJNXFQUYP3EBEVQ6XGLWTMHYQUCL X-MailFrom: ori@oribarbut.com X-Mailman-Rule-Hits: nonmember-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-notmuch.notmuchmail.org-0 X-Mailman-Version: 3.2.1 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Help: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1624563848; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=2QCcPoqvXXIyeuztuIiPq+9v2EiGrLtJ3D+Nf9199hY=; b=iNbTd4xPzZhWWgZpHQZExGyRSq86tlz/Qm1vSbyf0R0NscS/tmeNtKfNy8kSA0i6l9D2Y7 p3UCTU0VgqSJjMPtSO39X3uzDBMSVJigTG8qz5UI+711QKXAEDHcPZgXSTUi6ZfMPTBGxm qsMgNNdxwv10Image7rNO7382xtLcADxGq0KMONTy8hEsubMwbdJNmgU1MY4e3MWad36rd cjpzcgAsLMpBCIxUJ2jrvvNFo9Gmm+dxTIjLN/W6X+Bt1hgvYActqk2PsLkmDy+f8+JxRn GPyVuSV55RiUePyxrOq3JC/+vtyyYGBqQo3LwnJDnPrvyl5ykj8h+riGOcxo0Q== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1624563848; a=rsa-sha256; cv=none; b=lo7JPF76K+sPbH1xMq16AZPYOfrvBx54CM5FH/rcaBnfZw3fvOM8pC12O5GOLbVRjY/XFY mXlnUGrCz2JzB0UNUD3+5estij0fMr2s5wEWMaTfwt6OfTI7q0kWsf8rYNjOak0hxUA1rm ST10TwImMEAYvLtle1sudU2KRFVSYZ8pJoRR68elqHeBK9ORjNkmTL8haGzx7GOhntGtzF e2+uVgldxPrlGiwdXBwiYMDVb7QaINDa6EvZZcbRWJyG2PJNYeuyhhFjPkW1w9fCwIS6yq KgTxMYeRVgboCVxqgYk30TOQeoc/n0C+xX65xiSsjh4AmKP9L/pjVLlYenBjPQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=oribarbut-com.20150623.gappssmtp.com header.s=20150623 header.b=Jz8QrxM4; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2607:5300:201:3100::1657 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Spam-Score: -0.99 Authentication-Results: aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=oribarbut-com.20150623.gappssmtp.com header.s=20150623 header.b=Jz8QrxM4; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2607:5300:201:3100::1657 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Queue-Id: 92A061086A X-Spam-Score: -0.99 X-Migadu-Scanner: scn1.migadu.com X-TUID: JTCPFZkP7KNT 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 | 2 ++ emacs/notmuch-company.el | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) 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))