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 992CD6DE02DA for ; Thu, 1 Jun 2017 02:41:13 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: 0.475 X-Spam-Level: X-Spam-Status: No, score=0.475 tagged_above=-999 required=5 tests=[AWL=-0.158, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_NEUTRAL=0.652, UNPARSEABLE_RELAY=0.001] 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 rvv_aXmONZ-X for ; Thu, 1 Jun 2017 02:41:12 -0700 (PDT) Received: from mail-wm0-f48.google.com (mail-wm0-f48.google.com [74.125.82.48]) by arlo.cworth.org (Postfix) with ESMTPS id 89C386DE024A for ; Thu, 1 Jun 2017 02:41:06 -0700 (PDT) Received: by mail-wm0-f48.google.com with SMTP id b84so150998766wmh.0 for ; Thu, 01 Jun 2017 02:41:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dme-org.20150623.gappssmtp.com; s=20150623; h=to:subject:in-reply-to:references:from:date:message-id:mime-version :content-transfer-encoding; bh=hdykLsW8cYVY33QpqHxJsJTUVELNjCWizmMBwdBQVEU=; b=upNwwJ46TwfM+p33i9/7y6TK0PRSMu3MLstT9hcGzFkaX5/WzKfpzPYodT7M+YgzgI ICmoFztnozJqhSKBldpNZKobToJvujKQn8PKqGVpf/eOFTjvWVuKvreMJxLC65DhMMbg UMUMFqzX3/fksBGnBVPmQ03Aj+/kqoU9ee2S2z7xO/prl+wlfan4YJZ4K7HtBZSnNsVn NSx0ICJONsMLzLrrrxjv8FhMx7kcNWrYowv4RTfhfsxhWR9iydu1LjISyPMd7OBrQjXw F98qg19XNKzot2Il720NM1WJXH+U0JnahxqPrIOVswBADMuZoe3U/ASoqg4IB9+9x0+8 jtlQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:subject:in-reply-to:references:from:date :message-id:mime-version:content-transfer-encoding; bh=hdykLsW8cYVY33QpqHxJsJTUVELNjCWizmMBwdBQVEU=; b=UXZru1CMQhJ/3KEN01laPd8zvz1o6OWxPLm9ghfZDloABOD7V/HIVWPwmjAfoE2r4x B6ViE4uAdS3MulyTPMNqaZ/vLqjjhOwlemGr9+YlPFXXC+PnB4WSjFdzW+gqGD5nMbTK loaXRCjny3ZvgbBWxyZsNtCdMC2ETAubbVwqpfQn5sy37RGqjV0GE/69REi4+b3XivrS hpTMUivI9IpbFQfwpNXNzvaQgOLVxNZjiw+x/iyal2+cNVnJHli4VNxmsuWlpb+FZzyW CfWCqKsbtURYZ4MmZ7jW9trw8yzYLNxPOsZ5hwl6wd5iBwF58qTTvzZADAnEkoN8NY+O zqeQ== X-Gm-Message-State: AODbwcDkbGoDRtbWweIFJ/b1vwK8/zlILI04/PY9c30jGWf7srXl83WD g0EiPCAsCboFwgvm X-Received: by 10.28.178.207 with SMTP id b198mr1018443wmf.0.1496310064726; Thu, 01 Jun 2017 02:41:04 -0700 (PDT) Received: from disaster-area.hh.sledj.net (disaster-area.hh.sledj.net. [81.149.164.25]) by smtp.gmail.com with ESMTPSA id n27sm8604566wra.57.2017.06.01.02.41.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 01 Jun 2017 02:41:03 -0700 (PDT) Received: from localhost (disaster-area.hh.sledj.net [local]) by disaster-area.hh.sledj.net (OpenSMTPD) with ESMTPA id 54a831aa; Thu, 1 Jun 2017 09:41:02 +0000 (UTC) To: Edgar Hipp , notmuch@notmuchmail.org Subject: Re: Show email adress in output of `notmuch search --format json` In-Reply-To: <20170601065917.tb7enmxklevslevt@fr-fadpc15.europe.altair.com> References: <20170601065917.tb7enmxklevslevt@fr-fadpc15.europe.altair.com> X-HGTTG: heart-of-gold From: David Edmondson Date: Thu, 01 Jun 2017 10:41:02 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.23 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, 01 Jun 2017 09:41:13 -0000 On Thursday, 2017-06-01 at 08:59:17 +0200, Edgar Hipp wrote: > Hello ! > > I'm building a tool that combines fzf (a fuzzy finder) and notmuch to > find email more interactively. > > For that, it would be great if the --format=3Djson would return not just > the author name, but also the author email. > > I run :=20 > > ``` > notmuch search --format=3Djson '*' | tail -1 > ``` > > And get following output :=20 > > ``` > {"thread": "0000000000000b72", "timestamp": 1397639242, "date_relative": = "2014-04-16", "matched": 1, "total": 1, "authors": "-a l'attention de conta= ct-", "subject": "[SPAM] Lettre d'information", "query": ["id:SKT8635X-JCWL= -FS8M-IDH7-WTK8XFCLCQ@idealcoursier.com", null], "tags": ["inbox"]}] > ``` > > I would like to get the real email adress too :=20 > > ``` > {"thread": "0000000000000b72", "timestamp": 1397639242, "date_relative": = "2014-04-16", "matched": 1, "total": 1, "authoremail": "contact@idealcoursi= er.com", "authors": "-a l'attention de contact-", "subject": "[SPAM] Lettre= d'information", "query": ["id:SKT8635X-JCWL-FS8M-IDH7-WTK8XFCLCQ@idealcour= sier.com", null], "tags": ["inbox"]}] > ``` > > More generally, it would be great to have a configuration option to > specify which fields you want, like how `git log --format=3D` works. > > What do you think ? You're using the output of =E2=80=9Csearch=E2=80=9D: % notmuch search --format=3Djson id:20170601065917.tb7enmxklevslevt@fr-fadp= c15.europe.altair.com [{"thread": "0000000000037667", "timestamp": 1496300357, "date_relative": "= Today 07:59", "matched": 1, "total": 1, "authors": "Edgar Hipp", "subject":= "Show email adress in output of `notmuch search --format json`", "query": = ["id:20170601065917.tb7enmxklevslevt@fr-fadpc15.europe.altair.com", null], = "tags": ["inbox4", "list", "notmuch"]}] Perhaps the output of =E2=80=9Cshow=E2=80=9D is more what you're after? % notmuch show --format=3Djson id:20170601065917.tb7enmxklevslevt@fr-fadpc1= 5.europe.altair.com [[[{"id": "20170601065917.tb7enmxklevslevt@fr-fadpc15.europe.altair.com", "= match": true, "excluded": false, "filename": "/home/dme/Maildir/.d.list.not= much/cur/1496309415_0.21047.disaster-area,U=3D12312,FMD5=3D48696af6d61a0125= 32c1ce55c0592d76:2,S", "timestamp": 1496300357, "date_relative": "Today 07:= 59", "tags": ["inbox4", "list", "notmuch"], "headers": {"Subject": "Show em= ail adress in output of `notmuch search --format json`", "From": "Edgar Hip= p ", "To": "notmuch@notmuchmail.org", "Date": = "Thu, 01 Jun 2017 08:59:17 +0200"}, "body": [{"id": 1, "content-type": "tex= t/plain", "content": "Hello !\n\nI'm building a tool that combines fzf (a f= uzzy finder) and notmuch to\nfind email more interactively.\n\nFor that, it= would be great if the --format=3Djson would return not just\nthe author na= me, but also the author email.\n\nI run : \n\n```\nnotmuch search --format= =3Djson '*' | tail -1\n```\n\nAnd get following output : \n\n```\n{\"thread= \": \"0000000000000b72\", \"timestamp\": 1397639242, \"date_relative\": \"2= 014-04-16\", \"matched\": 1, \"total\": 1, \"authors\": \"-a l'attention de= contact-\", \"subject\": \"[SPAM] Lettre d'information\", \"query\": [\"id= :SKT8635X-JCWL-FS8M-IDH7-WTK8XFCLCQ@idealcoursier.com\", null], \"tags\": [= \"inbox\"]}]\n```\n\nI would like to get the real email adress too : \n\n``= `\n{\"thread\": \"0000000000000b72\", \"timestamp\": 1397639242, \"date_rel= ative\": \"2014-04-16\", \"matched\": 1, \"total\": 1, \"authoremail\": \"c= ontact@idealcoursier.com\", \"authors\": \"-a l'attention de contact-\", \"= subject\": \"[SPAM] Lettre d'information\", \"query\": [\"id:SKT8635X-JCWL-= FS8M-IDH7-WTK8XFCLCQ@idealcoursier.com\", null], \"tags\": [\"inbox\"]}]\n`= ``\n\nMore generally, it would be great to have a configuration option to\n= specify which fields you want, like how `git log --format=3D` works.\n\nWha= t do you think ?\n\nBest,\n\nEdgar\n\n_____________________________________= __________\nnotmuch mailing list\nnotmuch@notmuchmail.org\nhttps://notmuchm= ail.org/mailman/listinfo/notmuch\n"}]}, []]]] %=20 The =E2=80=9Csearch=E2=80=9D output is meant purely for displaying a list o= f threads, so the information presented is limited to whatever was considered necessary for that. dme. --=20 And the sign said long haired freaky people need not apply.