From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id +IfTOJvJ1l6oNgAA0tVLHw (envelope-from ) for ; Tue, 02 Jun 2020 21:50:19 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id WFbHNJvJ1l5mSAAA1q6Kng (envelope-from ) for ; Tue, 02 Jun 2020 21:50:19 +0000 Received: from arlo.cworth.org (arlo.cworth.org [50.126.95.6]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 21E4E9400AF for ; Tue, 2 Jun 2020 21:50:16 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id EAD0F6DE0F4C; Tue, 2 Jun 2020 14:50:11 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id s6SjlGFwbsmE; Tue, 2 Jun 2020 14:50:11 -0700 (PDT) Received: from arlo.cworth.org (localhost [IPv6:::1]) by arlo.cworth.org (Postfix) with ESMTP id B79376DE0F54; Tue, 2 Jun 2020 14:50:10 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id F2F916DE0F54 for ; Tue, 2 Jun 2020 14:50:09 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id QLpoJAF4kZa2 for ; Tue, 2 Jun 2020 14:50:08 -0700 (PDT) Received: from wout3-smtp.messagingengine.com (wout3-smtp.messagingengine.com [64.147.123.19]) by arlo.cworth.org (Postfix) with ESMTPS id 6AC786DE0F4C for ; Tue, 2 Jun 2020 14:50:08 -0700 (PDT) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id E3B585ED; Tue, 2 Jun 2020 17:50:05 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Tue, 02 Jun 2020 17:50:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=spwhitton.name; h=from:to:subject:in-reply-to:references:date:message-id :mime-version:content-type; s=fm3; bh=NxcXWuFFC0Uot2SkxcUr/zx7e0 Uxo/bP561QcNXLlMw=; b=ct2KEQRBeXt+tcuDaThXmVSvwDky5Bv9LVU09Phqws IUhcOFamDuXBRy/WbESp+idXdbbde/jHfVeF+7JXtTNhkr7kAtclOHxxbYiypFEF dQaY44dd8rkI6e4u+QePLp0rzbN3LDT4CCgLbOVKM2FLn0hSUNm+J3Bb74ao2xa5 9oeQH3YXh6WziFOVQiaj335OloUqCf6jQtLjE46J+tG5gqLKsxrHr5yLD4Ehxfvl pWS1SeIA1V4U5Zuzzd2pHiKesgvzQqf6wtH3LSXzzV0ZZ3QXaUrPhObqWvIoqj+5 21PZvn9EC7oPWy4tKIh3DM7zqaqUg0Pe3GZ9hcwib74Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=NxcXWu FFC0Uot2SkxcUr/zx7e0Uxo/bP561QcNXLlMw=; b=WSGFtab//IKIGZWSMvc4l7 3ArxuYs28DIlS7dW1IFFUgFBDrJR9RgeeDLjAG9j3h2tbclsCX6NkKdUn6TdN3Fm srRrZ0HuxmTg7RCDmCWQonoiCRytH3lypp9qbFJhHGWlBlLfUW1GcAc4NNqUVXoQ KZce4/DDz9gb78YEPeTGQSVo8dBEfBOdnd9sEQ3U7n8biEih9KTtXDgejaGwc+Jj pgCqNQGi3EN+v3D+diqEuEJZGI1a3I2gJiMpBM+tOWbV3jfnsCO/cygwdJ7J9PPo Sw1tymDwU5lK86RaGK9fnSYdeDw8iJ2KLtD9TS6A2bK3EiMjXqifk0mbeaU1dHAA == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrudefkedgtdduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffujghffffkgggtsehttdertd dttddtnecuhfhrohhmpefuvggrnhcuhghhihhtthhonhcuoehsphifhhhithhtohhnsehs phifhhhithhtohhnrdhnrghmvgeqnecuggftrfgrthhtvghrnhepgedtvdehgeffhfffvd effefhgfejffelhfetveffffektefgtdejtdeivddtveehnecuvehluhhsthgvrhfuihii vgeptdenucfrrghrrghmpehmrghilhhfrhhomhepshhpfihhihhtthhonhesshhpfihhih htthhonhdrnhgrmhgv X-ME-Proxy: From: Sean Whitton To: David Edmondson , notmuch@notmuchmail.org Subject: Re: Lazily loading notmuch into Emacs In-Reply-To: References: <87367ed6y7.fsf@iris.silentflame.com> Date: Tue, 02 Jun 2020 14:50:02 -0700 Message-ID: <87y2p52l4l.fsf@iris.silentflame.com> MIME-Version: 1.0 X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: notmuch-bounces@notmuchmail.org Sender: "notmuch" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=fail (body hash did not verify) header.d=spwhitton.name header.s=fm3 header.b=ct2KEQRB; dkim=fail (body hash did not verify) header.d=messagingengine.com header.s=fm2 header.b=WSGFtab/; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 50.126.95.6 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Spam-Score: -0.01 X-TUID: tAQI/t/ZqQ0J Hello David, On Tue 02 Jun 2020 at 12:41PM +01, David Edmondson wrote: > I'd hoped that: > > (require 'notmuch-mua) > (setq mail-user-agent 'notmuch-user-agent) > > would be sufficient to get things wired up, but it doesn't seem to be. > > If we fix that, would it seem more appropriate? If we get it right then > it shouldn't load any other notmuch code (including notmuch-config.el) > until you actually use one of the functions. It's probably better than using advice-add, assuming that bytecompiled notmuch-mua.el loads quickly. I wonder if maybe notmuch-mua.el could be split into a small file the user can 'require in their init, which just has the define-mail-user-agent call, and then there's a larger .el file containing an autoload cookie and definition for 'notmuch-mua-mail, and everything else? I'm also advising notmuch-jump-search and notmuch-hello, as otherwise I noticed notmuch-config.el doesn't get loaded if you use one of those right after starting Emacs. I think the fix there is to add (require 'notmuch) to the top of notmuch-jump.el and notmuch-hello.el? -- Sean Whitton