From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id wKpsGbVmbWIYGwAAbAwnHQ (envelope-from ) for ; Sat, 30 Apr 2022 18:41:25 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id MF1uGLVmbWLaIwEAG6o9tA (envelope-from ) for ; Sat, 30 Apr 2022 18:41:25 +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 C38612BCC1 for ; Sat, 30 Apr 2022 18:41:24 +0200 (CEST) Received: from yantan.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id 42B395F73C; Sat, 30 Apr 2022 16:41:22 +0000 (UTC) Received: from fethera.tethera.net (fethera.tethera.net [IPv6:2607:5300:60:c5::1]) by mail.notmuchmail.org (Postfix) with ESMTP id 3E97D5F6C1 for ; Sat, 30 Apr 2022 16:41:19 +0000 (UTC) Received: by fethera.tethera.net (Postfix, from userid 1001) id 2CCF05FBD7; Sat, 30 Apr 2022 12:41:18 -0400 (EDT) Received: (nullmailer pid 1935829 invoked by uid 1000); Sat, 30 Apr 2022 16:41:16 -0000 From: David Bremner To: Leo , notmuch@notmuchmail.org Subject: Re: [PATCH 1/1] emacs: Make notmuch-show-next-thread return nil on failure In-Reply-To: <20220428101217.23844-2-git@relevant-information.com> References: <20220428101217.23844-1-git@relevant-information.com> <20220428101217.23844-2-git@relevant-information.com> Date: Sat, 30 Apr 2022 13:41:16 -0300 Message-ID: <87v8uqh6c3.fsf@tethera.net> MIME-Version: 1.0 Message-ID-Hash: SBINAQMER7CHIN3BRSCVBBDYAOE7OS24 X-Message-ID-Hash: SBINAQMER7CHIN3BRSCVBBDYAOE7OS24 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 CC: Leo Okawa Ericson 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=1651336884; 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: in-reply-to:in-reply-to:references:references:list-id:list-help: list-owner:list-unsubscribe:list-subscribe:list-post; bh=pUnhhPEHFMYMsjVcSkcf0HrhCH87YWWu0vTks9AGW5Q=; b=h9bWN2GuFK0fMaj9VrLj4+pjNd0UkE7luji6FxvPBvYBOSGfIDJXKl23TjdU9V4WDqVW/V I9JPGDv/R3e0YLtzo+d+X3Q/CWRXiqxYJDZEkqOO1VLA9n29HN/iqoPvDDVhItLr+LncZt gD4FVARDoGIwq04497OYCYuP4PPRYNBYRxvrpGaoOm4M5X8dz8QX/yCv4CuFiVzkZHPN4g ALfkfd373ObsOWOSA0aRzaiEOUqzHCao7PE5TWjr4VkD2hI8J5Eg6atkLn/REjL2vtDeE8 s4DaZO5I+VJiiMSaol8O81xD3FbvHrj3Q2589Wh9zvEsikGiHLWUjwMuyE8N+A== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1651336884; a=rsa-sha256; cv=none; b=Co2N6XdErLbppRIkKv8XQWjCvbxR3rpwdRXxzVk8Edl0PTqtvVa1ShStmGvdZI4ZmWxDzy iurFL/dT523ptRxDrf5q/84AxHepoAVF9MwlxFKrGhvx5r4QlOZCXoBLflwekieh5rsekA Cro55tkiBXPKXSGuNff6Ew/VbZmVPGyQ8juY65vnL6qWwM7f8Bg+OMfxQyjAc4m8sRE2S8 BZa55/LqygFyaxt8xwp43WM87FQdhNLtSLSG0cDzmFpo//RCMyCo3cyUN3AIrFnzdvIFJt MVXRPqo/VfDjLYhLVD9VCKFFvVPfNCyzncB1Cx/GcJF7WIO4iFMvcQuOaKdlGw== 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.54 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: C38612BCC1 X-Spam-Score: -2.54 X-Migadu-Scanner: scn0.migadu.com X-TUID: FQpZTV0RZMxE Leo writes: > From: Leo Okawa Ericson > > Having notmuch-show-next-thread return non-nil on success and nil on > failure makes it easier for users to interact with notmuch via elisp. You talk about notmuch-show-next-thread, but you seem to be modifying notmuch-search-show-thread. That actually seems like a bit of a strange function to invoke programatically, since it deduces the argument from the current buffer. It might be better for your code to call notmuch-show directly, since notmuch-search-show-thread is pretty tied to the internals of notmuch-search-mode. In any case: If you change the API to have a meaningful return value, please update the docstring for the function We generally need a test for any new feature, and this is arguably a new feature. If you need help constructing a test, feel free to ask. There are several examples in test/T*emacs*.sh.