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 ms0.migadu.com with LMTPS id YMhuOx7EB2F2cQAAgWs5BA (envelope-from ) for ; Mon, 02 Aug 2021 12:08:30 +0200 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 gEQsNx7EB2ExZAAA1q6Kng (envelope-from ) for ; Mon, 02 Aug 2021 10:08:30 +0000 Received: from mail.notmuchmail.org (nmbug.tethera.net [144.217.243.247]) (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 18AC61C91 for ; Mon, 2 Aug 2021 12:08:30 +0200 (CEST) Received: from nmbug.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id 4A5F92C01F; Mon, 2 Aug 2021 06:08:26 -0400 (EDT) Received: from fethera.tethera.net (fethera.tethera.net [IPv6:2607:5300:60:c5::1]) by mail.notmuchmail.org (Postfix) with ESMTP id 1BAB12C016 for ; Mon, 2 Aug 2021 06:08:23 -0400 (EDT) Received: by fethera.tethera.net (Postfix, from userid 1001) id 7C62D5FD5C; Mon, 2 Aug 2021 06:08:22 -0400 (EDT) Received: (nullmailer pid 2773482 invoked by uid 1000); Mon, 02 Aug 2021 10:08:21 -0000 From: David Bremner To: Christian Tietze , notmuch@notmuchmail.org Subject: Re: notmuch-mode snippet: auto-select "inbox" widget when launching In-Reply-To: References: Date: Mon, 02 Aug 2021 07:08:21 -0300 Message-ID: <87mtq017my.fsf@tethera.net> MIME-Version: 1.0 Message-ID-Hash: 5VID7MHFCT7YT772PBMG2LLJAQSIW7ZB X-Message-ID-Hash: 5VID7MHFCT7YT772PBMG2LLJAQSIW7ZB 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; suspicious-header X-Mailman-Version: 3.2.1 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Help: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1627898910; 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-unsubscribe:list-subscribe:list-post; bh=3dl8B+X86MN1ALq5mqqmZxrm6eGaCUgTnYpinpvSKf0=; b=IDOGYOscjrUf2gXwEvAcN/DSJmQmoObyspwxMvUzIb37ZwLzOAl9zUDk+fmnpbNsfFpvy2 AkxDv4Bu5f3Y8cZDuJGYSfMMwALJBIyNoGaWkVASM5Hdv8MXi+afksplcEYfe3+z+BALYI dlmVlKs9VDchKPBpI2XJ33ZZVQ4g7GuiBFTPGcKHY1fz6mIZPD25IWA0ETWsCUlzkJh1O1 CKHo/fA+LMamZh8OSthvys+9x0aFfu6PwrY2u9lsU8rRwRxVG23X93usr20WlNXUvxR6+j SU135lljDTwqKxTTxiEvGHOk1o5vt5sh11I+O5JIBxO4olJEF2Ue18NxBas03A== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1627898910; a=rsa-sha256; cv=none; b=r0oWofncho4FEKwz26J8onBy4Ca9b8YdU8lguw1JRd7c5SA+0AUmoGAbwXCMTUDCsNmGsx KBxZ89rn615cN1XgXP7xTNDZe1aXK2CxJ/myMey7iP9P7fxr88CoLc3OVezMv0oOGRD6HO kt3JRP3yJPF9zqqnGfSWMtSPFIu/DEBw0fSUphqDMyloewRXoh3yndV/3nJLVZocLrntcu btNss3egAX1USXzpSOR82fLz8hDBay7Tu9lAi04Y110j7ywbxGl4lRu5s/GK5WqLsWGn5+ zKOFiKWmxj+n6rVw48gNtiGeVVS/6b/FGnR6BTnc3pmLbc1fNZ3sj2Q6sryDVQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 144.217.243.247 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Spam-Score: -0.51 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 144.217.243.247 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Queue-Id: 18AC61C91 X-Spam-Score: -0.51 X-Migadu-Scanner: scn0.migadu.com X-TUID: nouD87RTIQEl Christian Tietze writes: > > The existing hooks are kinda wonky for this, > though. `notmuch-hello-mode-hook` is executed too early, before > widgets are available to move the point to, for example. And adding an > advice around notmuch-hello doesn't help because that's executed for > every refresh, it seems. Did you try notmuch-hello-refresh-hook? Maybe set a varible in notmuch-hello-mode-hook to say "new invocation" and do the jump in notmuch-refresh-hook? > Do you have any suggestions? I don't want to propose a patch that > changes when the hook is executed because I don't know why the hook > runs before the widgets are available. Some "not really solution" ideas: - you can remove notmuch-hello-insert-header from notmuch-hello-sections, which means less tabbing - by default there are key-sequences starting with j that jump to each configured saved-search