From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id IPvkLC42l2JPKwAAbAwnHQ (envelope-from ) for ; Wed, 01 Jun 2022 11:49:34 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id 4P/kKy42l2JpSQAAG6o9tA (envelope-from ) for ; Wed, 01 Jun 2022 11:49:34 +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 38AD124498 for ; Wed, 1 Jun 2022 11:49:34 +0200 (CEST) Received: from yantan.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id 584025F7AC; Wed, 1 Jun 2022 09:49:31 +0000 (UTC) Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197]) by mail.notmuchmail.org (Postfix) with ESMTP id B685E5F775 for ; Wed, 1 Jun 2022 09:49:28 +0000 (UTC) Received: by fethera.tethera.net (Postfix, from userid 1001) id 0959E5FBD7; Wed, 1 Jun 2022 05:49:28 -0400 (EDT) Received: (nullmailer pid 2689126 invoked by uid 1000); Wed, 01 Jun 2022 09:49:26 -0000 From: David Bremner To: Damien Cassou , notmuch@notmuchmail.org Subject: Re: [PATCH] Fix notmuch-mua.el notmuch-mua-mail In-Reply-To: <87zgj8zs3k.fsf@cassou.me> References: <87fsl22geh.fsf@cassou.me> <87zgj8zs3k.fsf@cassou.me> Date: Wed, 01 Jun 2022 06:49:26 -0300 Message-ID: <875ylk1zo9.fsf@tethera.net> MIME-Version: 1.0 Message-ID-Hash: D4MLH5JL7IVWNDGRDOUETHB43G3DKB77 X-Message-ID-Hash: D4MLH5JL7IVWNDGRDOUETHB43G3DKB77 X-MailFrom: david@tethera.net X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-notmuch.notmuchmail.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header 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-To: larch@yhetil.org X-Migadu-Country: DE ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1654076974; 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: in-reply-to:in-reply-to:references:references:list-id:list-help: list-owner:list-unsubscribe:list-subscribe:list-post; bh=6bFzFxq63y42ECyrKZDwP/UQc2dTXp1D2JO4rw7PaU0=; b=ItSZvc9eEpltquZXodvAps6+mc8/13o+ZiMEGVolcSzX3np6G6Oouo1R18UPGy8OuTGsjS Znx9tzWCn2SGPCwbGWPY7iZ0v/Mz2U/VT0EP8KBJnfludR6V3xXhSOQo7jiTGe7VThovXj PvuzXSy+udIISAlRzd7s6F44ggHT9KAVV99qZ9o7m1J6fePe4rppFq4rljhA6O1Fb8nXqI /MUInMDv8ZnQQZBZa9YoQu4vejN3Cs4vtvMT1klkN3o7VwxLwx1KLqaDbGQW5DyhFBZHQF VTB4vaIDsSt7kakSIMMmbS1zyucQ8G/pp/mtzIlD6xlgMGLL7Dxb/0ZpbpEvJg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1654076974; a=rsa-sha256; cv=none; b=O5RXZYuUXJsBkXH1WyclmHZ0faQ4HwQdY8FeNdyPWGTWissK7z22XwD5thmOHlODkgNVXP TuINJI0DnR1XTvEj6PY4a0P0i7uLVnuYRpI3z7O0uA2JkpxbVzB5ySb0pihuJZSsSFlhwm WouG+0Hpn00frKNY0j+1NGNS4jblyc9ifKwDSLBITDhdN9dVzPhzR0Vp7dc07GV4KtehKz f0Cz+K84vwsX6hg3jaDJMEkk7NUfwbyv9nquzqFqU9y1B18p1368AqE18SVBKIiVnHKtq4 dpNeBLcz+qdJekt72LK8Q4PqUmQ0RHeLB7WhnGcsxslSkRN2tVNPq77bNYHupg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=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 X-Migadu-Spam-Score: -2.55 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=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 X-Migadu-Queue-Id: 38AD124498 X-Spam-Score: -2.55 X-Migadu-Scanner: scn0.migadu.com X-TUID: M5saOTdNYeTs If possible, please use git-send-email, as it makes applying the patches easier. Damien Cassou writes: > From 6106765b56464edc649d73916f97208b67ef5eb4 Mon Sep 17 00:00:00 2001 > From: Damien Cassou > Date: Mon, 23 May 2022 08:17:27 +0200 > Subject: [PATCH] Change where to move point at the end of `notmuch-mua-mail` > > * emacs/notmuch-mua.el (notmuch-mua-mail): Move point to the position > that makes the most sense instead of always moving point to the TO. > This is useful when TO/SUBJECT are passed as argument. It's a minor issue, but... Our conventions for commit messages are different than emacs [1], we don't list filenames in the commit message but we do usually list the "subsystem" in the subject [2] > --- > emacs/notmuch-mua.el | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el > index 60801f4b..4ee252f2 100644 > --- a/emacs/notmuch-mua.el > +++ b/emacs/notmuch-mua.el > @@ -420,7 +420,10 @@ (defun notmuch-mua-mail (&optional to subject other-headers _continue > (message-hide-headers) > (set-buffer-modified-p nil) > (notmuch-mua-maybe-set-window-dedicated) > - (message-goto-to)) > + (cond > + ((and to subject) (message-goto-body)) > + (to (message-goto-subject)) > + (t (message-goto-to)))) I think the cursor positioning behaviour should be documented in the function docstring. [1]: It might be a personal issue, but the emacs commit message style really annoys me. [2]: https://notmuchmail.org/contributing/ "Write meaningful commit messages"