From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id OB2AIHsO8WQovAAA9RJhRA:P1 (envelope-from ) for ; Fri, 01 Sep 2023 00:04:43 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id OB2AIHsO8WQovAAA9RJhRA (envelope-from ) for ; Fri, 01 Sep 2023 00:04:43 +0200 Received: from mail.notmuchmail.org (yantan.tethera.net [IPv6:2a01:4f9:c011:7a79::1]) (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 0A5203D698 for ; Fri, 1 Sep 2023 00:04:43 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=googlemail.com header.s=20221208 header.b=iDoUcXLn; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2a01:4f9:c011:7a79::1 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1693519483; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-owner:list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=FhmMjCxLjHP2dM00Ln3yexKF1vPTANtyW2QjtjSlk98=; b=e4Km4w26kTjc6gKeRSXWrQilMLNpNJf3/nh9+P8anEUqUrHYbMv9W1gNjr8hMMtzmy1Fka 8fTliFM52trcTnSdmb52rFOwA8FpPl9iKaJZtbmsarUQWZZUbMGSIueW2cD7Y8gkCFpzQt vMrdIBN6Xn3BJhVR0TJ021nagJMLCrZJ+wmA38vXbjKvcqCMnQNURyQGkKRr6k66YJCTDQ p1cT2D9/e4cfyeXWrZAfQUtNSaoQYtmjwEDzDbLMnrjVfXWhdWoXmix5GWQmCRkBWLjn/x /meTPYtfwGos9eJTRI0dU2/ciGSh3kCgJahX/03xh/FzEer1g5FgZsGfpCCecA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=googlemail.com header.s=20221208 header.b=iDoUcXLn; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2a01:4f9:c011:7a79::1 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org ARC-Seal: i=1; s=key1; d=yhetil.org; t=1693519483; a=rsa-sha256; cv=none; b=e/z0stKqyAx46cbY+Q65pdS3Pgs6NY2ip31Jetv7G+zwMcO/OToPbaMyCF3pDjZkHEwnFK UXdzYPXrNF1vNSLcb7VZHPffWz14IDT/MBPNQtXXXaGcW8mDJkKwhhaN5/WtglyZrlOcVb KJ/liahisARqlgASEW16BhUlXrYiJ6NbJ8H399D8gbRqVoiB9vIOgxkiA5s5BzX6tcA5G8 Hb8NZ8eOUF1nVcciwkP+srlsOWSz5t3jW3nKpP273XCc4XTjjpyX6sMogK83lvuZiEpwGy 45o1I5HB+MLUTFO6fOZ7UBGfgS0ADdjmi8RyBduknbkJbzKBCVgZxCKhaxa/cA== Received: from yantan.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id 66FFF5F4A1; Thu, 31 Aug 2023 22:04:40 +0000 (UTC) Received: from mail-ed1-x530.google.com (mail-ed1-x530.google.com [IPv6:2a00:1450:4864:20::530]) by mail.notmuchmail.org (Postfix) with ESMTPS id 7692F5E019 for ; Thu, 31 Aug 2023 15:41:14 +0000 (UTC) Received: by mail-ed1-x530.google.com with SMTP id 4fb4d7f45d1cf-529fb04a234so1236295a12.3 for ; Thu, 31 Aug 2023 08:41:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20221208; t=1693496474; x=1694101274; darn=notmuchmail.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=T4F0jSi/Mijfo+oYO/qzrUrjW0GcfaNrT4G+fo42yEY=; b=iDoUcXLn4pSO+E3bHQF7MHGb/ik0niQEqyjtDr5q+SJ82GLmV6TtgH/iVf2s1fOnTZ VYtkq+rjjrYdPC09rTmo14UgcQWGwuKPWkUw9y/qajLx0ss9c2IGM3FJzLaIb1IzNOSE VWV2di2FNaNYGLaeMnMxDnGw9TNHEookx8wzA6ssVKm0EdtIP+KaOaYy9dITk7u5c9Uz ov3edHkK+ZEN7nXo1UIc1gE6Qov79fWMQ3QaM19FFzXMqwMq33f56IKrlm+xuNA5rlgV KjTM9SZeZiNHWoeu+TF3icpDKEku1pKgNA5QYGFX5ez4j2Qvy1ClMkeJ1hZlBNWPZCsC XoTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693496474; x=1694101274; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=T4F0jSi/Mijfo+oYO/qzrUrjW0GcfaNrT4G+fo42yEY=; b=YLTe9wyI2d9Yzw6GSdkzcogIqxMMUePjLkE45mYY2GBnoM8EdZroXz2swq/XLtKvjp VFFdxhrM993NAV1pxm59+txXcY+eo5/UvhnrHumTmln/vwtGl60qPfcHmVvVZOecJ8VT AbeIHihVX6mChl+755nfkrsqmKexT3dGHwPFKdJ6x3KprFUxKp3vi9DaFmO7vzWlii/D NJxYlmn/ldMNoutB0Vu9nypZ3tOdXIr3mO+diYFd+D51Aq5R5Wuf2kU+fZW5fmNwYJYg G44Ad5aduBngBLXE2+s+NL6KJ/A9KbbRwsGBNuRAMdOHsGlRQXGcmbIBt6UDFTTbMtBk PWzg== X-Gm-Message-State: AOJu0Yzk3ZLSiTySr9CexUQALTAdsfk25IEDng/0v0hPWeB4XW9RGox4 QthuGJI0DENMpj/j6RrbpvcoxwGTUQ+jf+QTCS2d6FZe X-Google-Smtp-Source: AGHT+IGbA+5D33YZkDD7lp4srvKgcLokJyktqjRiT6pPE+IqZLparamVTUKH/nFR1k9bjcdPU2slX5sLybTyZW4MqK0= X-Received: by 2002:aa7:c7d8:0:b0:522:1e24:afb6 with SMTP id o24-20020aa7c7d8000000b005221e24afb6mr4633207eds.0.1693496473609; Thu, 31 Aug 2023 08:41:13 -0700 (PDT) MIME-Version: 1.0 From: Christoph Date: Thu, 31 Aug 2023 17:41:02 +0200 Message-ID: Subject: Emacs front end mail-user-agent documentation and loading To: notmuch@notmuchmail.org X-MailFrom: just.mychris@googlemail.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 Message-ID-Hash: E52XEOR4K3GDZFR6QIZZWD6BOFRBF5XP X-Message-ID-Hash: E52XEOR4K3GDZFR6QIZZWD6BOFRBF5XP X-Mailman-Approved-At: Thu, 31 Aug 2023 22:04:39 +0000 X-Mailman-Version: 3.3.3 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_IN X-Migadu-Country: DE X-Migadu-Scanner: mx1.migadu.com X-Migadu-Spam-Score: -0.95 X-Spam-Score: -0.95 X-Migadu-Queue-Id: 0A5203D698 X-TUID: APhXO2J934zy Hi, while configuring the notmuch Emacs front end, I was having trouble getting `notmuch-fcc-dirs' to work as expected. I figured out that my issue was, that I was composing mails using `compose-mail' instead of `notmuch-mua-mail'. Since notmuch-mua.el provides a mail-user-agent, configuring message to use the notmuch mail user agent wasn't that difficult, but it would be nice if that would be stated in emacs-tips of the notmuch documentation. Maybe you can add a section to it, so others don't fall into that trap? I wasn't using Emacs as a mail client before, so I didn't have much experience in configuring a user-agent before. Since `compose-mail' is defined in simple.el, I didn't find a nice way to load notmuch lazy using use-package. I ended up writing a hook around `compose-mail' to load notmuch on demand like so: (use-package notmuch :ensure t :commands (notmuch notmuch-mua-mail notmuch-mua-send-and-exit notmuch-mua-kill-buffer notmuch-mua-send-hook) :custom (mail-user-agent 'notmuch-user-agent) :init (defun +notmuch-load-on-compose (&rest _) "Load notmuch and remove this advice from `compose-mail'." (require 'notmuch) (advice-remove 'compose-mail #'+notmuch-load-on-compose)) (advice-add 'compose-mail :before '+notmuch-load-on-compose)) Do you know if there is a nicer way of loading notmuch lazy, as soon as `compose-mail' is called? Sadly, an autoload in the `notmuch-user-agent' doesn't work. I don't want to rebind `compose-mail' to `notmuch-mua-mail' and rely on the key-bind, since other Emacs functions, like `report-emacs-bug' are calling `compose-mail' directly and I would like those to work out of the box, without the need to manually load notmuch beforehand. Looking forward into playing around with notmuch. Regards, Christoph