From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id EE9BF6DE00B8 for ; Thu, 3 Nov 2016 11:00:30 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: -0.006 X-Spam-Level: X-Spam-Status: No, score=-0.006 tagged_above=-999 required=5 tests=[AWL=0.005, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01] autolearn=disabled 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 JkQHpsLMH0Xa for ; Thu, 3 Nov 2016 11:00:30 -0700 (PDT) Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197]) by arlo.cworth.org (Postfix) with ESMTPS id 5879A6DE0173 for ; Thu, 3 Nov 2016 11:00:30 -0700 (PDT) Received: from remotemail by fethera.tethera.net with local (Exim 4.84_2) (envelope-from ) id 1c2MJ7-0004gk-BZ; Thu, 03 Nov 2016 14:00:09 -0400 Received: (nullmailer pid 8396 invoked by uid 1000); Thu, 03 Nov 2016 18:00:24 -0000 From: David Bremner To: Mark Walters , notmuch@notmuchmail.org Subject: Re: [PATCH v3] emacs: add notmuch-address-post-completion-hook In-Reply-To: <87twbo7aot.fsf@qmul.ac.uk> References: <878tt09amd.fsf@qmul.ac.uk> <20161103115645.31075-1-david@tethera.net> <87twbo7aot.fsf@qmul.ac.uk> Date: Thu, 03 Nov 2016 15:00:24 -0300 Message-ID: <87k2ckl9zb.fsf@tesseract.cs.unb.ca> MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Nov 2016 18:00:31 -0000 Mark Walters writes: > Hi > > Would it be worth putting the run-hook after the (insert chosen) rather > than before? That would mean that the hook had access to the full new > header. It would also mean that it wouldn't matter if the hook changed > the buffer -- as it is I think the replace might go wrong as we replace > beg to end and those seem to be integer-points not markers agreed. > > One final query -- this function will be called when completing any of > To: Cc: Bcc: From: and some other less common headers. We could pass an > argument which says which header we are on but that is probably more > complexity than necessary. However, it is probably worth documenting > that it may be called from these headers in the defcustom for the hook. > Just changing the doc sounds sensible to me. Adding extra arguments sounds complicated since we are also calling the hook from within the nothmuch-company backend. d