From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id OKXzEA9+7WA4lgAAgWs5BA (envelope-from ) for ; Tue, 13 Jul 2021 13:50:39 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id GPayDA9+7WA2ZAAAB5/wlQ (envelope-from ) for ; Tue, 13 Jul 2021 11:50:39 +0000 Received: from mail.notmuchmail.org (nmbug.tethera.net [IPv6:2607:5300:201:3100::1657]) (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 919D42DB8A for ; Tue, 13 Jul 2021 13:50:38 +0200 (CEST) Received: from nmbug.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id 2867F290C0; Tue, 13 Jul 2021 07:50:34 -0400 (EDT) Received: from mail-lf1-f43.google.com (mail-lf1-f43.google.com [209.85.167.43]) by mail.notmuchmail.org (Postfix) with ESMTPS id 5352629030 for ; Tue, 13 Jul 2021 07:50:31 -0400 (EDT) Received: by mail-lf1-f43.google.com with SMTP id f30so49806256lfj.1 for ; Tue, 13 Jul 2021 04:50:31 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:date:from:subject:to:cc:in-reply-to :references; bh=mkpgvYxf2xacOCHnwgBFuPKcTbEme9PyRlIlkDQAX4g=; b=hZF6HugJFKX99EOAp5eCT52z6ZQGv7vmsgDytopRes0i2SAj2+51punDTAG6PwbLHL g2dJZCIdma3QIckf5mMXeVU3btl7waIsUBkXwJ1NITi6MIZbeo7i/N6HaeRsEgxd2BF2 yGZIF6QpZZT7QSwN3/jxJeumWnh3D4/gjNQCl4uRn7P5l88Jnu7Hhel14ETgaOsUMYXf 7MBLkOn8M4idGyp4ztzpnvCzUixu910DRhZ8CWKfN3tt4LvWn70wk1VHjX+JtVajXKEV h/YfXPY83txBgQNeEnhZDN7kP9uhSen4yxyyrk2e02blPCJfWLNQ2FZP2BtPdduSF4rw OgcQ== X-Gm-Message-State: AOAM533b0HXc50Y6T7un9KTkEe/fBRxjJhBBmWa1n+gPndZb4eipU+3h 5p9WV0hpnlBdk87JPivIqCcm/Ylu7s5Inw== X-Google-Smtp-Source: ABdhPJz19cr5W4XovrwLgzWQrC+BGDZv1ZbZBy2K/wAnjmtM3kSBsg8mdbuG/k0HrO6FUg3TIQxI6A== X-Received: by 2002:ac2:43a6:: with SMTP id t6mr2076973lfl.194.1626177029661; Tue, 13 Jul 2021 04:50:29 -0700 (PDT) Received: from localhost (88-112-11-80.elisa-laajakaista.fi. [88.112.11.80]) by smtp.gmail.com with ESMTPSA id v130sm367672lfa.284.2021.07.13.04.50.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Jul 2021 04:50:29 -0700 (PDT) Message-ID: <60ed7e05.1c69fb81.5aa4e.22d0@mx.google.com> Date: Tue, 13 Jul 2021 14:50:28 +0300 From: Hannu Hartikainen Subject: Re: [PATCH v3 1/2] cli/show: add --format=pretty To: David Bremner , notmuch@notmuchmail.org In-Reply-To: <878s2a8qac.fsf@tethera.net> References: <20210702203153.47289-1-hannu@hrtk.in> <20210622123410.323216-1-hannu@hrtk.in> <20210712083821.442587-1-hannu@hrtk.in> <20210712083821.442587-2-hannu@hrtk.in> <87bl7785jr.fsf@tethera.net> <878s2a8qac.fsf@tethera.net> Message-ID-Hash: DYOUT2UNCZYF3BST3DKVDAQTR3XLZDQX X-Message-ID-Hash: DYOUT2UNCZYF3BST3DKVDAQTR3XLZDQX X-MailFrom: hannu.hartikainen@gmail.com 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 CC: David Edmondson 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: MIME-Version: 1.0 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=1626177038; 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-unsubscribe:list-subscribe:list-post; bh=mY9OQB498enuSI3xWMfLZNt1v8HD41xap0RnaVwKWKU=; b=H9MaVYqUYrp8k33++K44bIJlU+29y5WwTlzTiOzEWm8NvHE7SKiaBHDQ4xEI8f56jtgTo0 EYl5BZNArJnTpuv8jHwxMegZ8w6SWyFCoT53QyfPb1OXPCGn7PeJAvDZTXrLcDOhp1+fc0 8LbwFY2uduDidE4cccKpYlBhiSwWhb/sr0gjdaorOet1lspIKTjS/I1iufo9b+oONCjXpF 4KPH5ngX5lLakwY6XyghP9CuAiwJhNXhvS8NwAm8vdwtPxiq281+CU9wrrS8ZsdCT+j4gf NxFAf2F66oWgl3M9keBMi9E8QasOhXgEFckETgxotD+kmhMf4b9xFvfMgPdqag== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1626177038; a=rsa-sha256; cv=none; b=U52ww7E3sWjBAJqnJtcAYkhlqQ9jrQzQCV3ZHfbiq1yhRPDRNkXrkiinVQ3VejNSU/DvUo 3CZ75IQWNVgtZHsMPFzgZQrJvDf+41kjxwDImsY+BafCDzQYNjqlCYcNmxhIZDJh2rbXhA QFjZGUjqEoiGokah6DM4QSEpf18xtHYwUcsGoa7i929EFjEawPI8dRiKBPoFADH2+e98zS Rt/GxD4MFzQKn8Z4NuRwWZ42i4JBT9FbIZJjrAMEq5SWG8p818MFJO0ny7bDYh/0qa1/gA MNKvfDVSeysZ377/EjejXNlnhnBZ4k0Mjlnh18QJF7E58ya3V5Lg0UVXZHICfA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2607:5300:201:3100::1657 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Spam-Score: -2.09 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2607:5300:201:3100::1657 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Queue-Id: 919D42DB8A X-Spam-Score: -2.09 X-Migadu-Scanner: scn0.migadu.com X-TUID: YM8Oicf9UXmg Thanks for reviewing the patch! On Tue, 13 Jul 2021 07:24:43 -0300, David Bremner wrote: > David Bremner writes: > > I don't know what g_mime_message_get_message_id will return if there is > > no message-id, but that case can and does arise. It returns null and the printing function prints out `(null)` IIRC so it's not a crash (I checked that), but good point nonetheless. > I expect that would require somehow making the notmuch_database_t object > available inside the sprinter. We want this for at least one other > feature request (configurable headers in json / sexpr output), so it's > not as much of a "waste" of effort as it might seem at first. That's good to know. I was afraid of making big changes for no reason. I think I had a version that added a function parameter but thought it's too ugly and complicated to submit. > The options are adding extra arguments to functions and stashing a > copy of the pointer in some struct (perhaps the sprinter struct). I'll see if I find a good way to do the latter when I have time. Thanks for the pointers! Hannu