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 C2CBD6DE0A7F for ; Fri, 22 Nov 2019 15:07:47 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: -0.392 X-Spam-Level: X-Spam-Status: No, score=-0.392 tagged_above=-999 required=5 tests=[AWL=-0.191, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-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 EAy6O25ma-oV for ; Fri, 22 Nov 2019 15:07:47 -0800 (PST) Received: from mail-lj1-f174.google.com (mail-lj1-f174.google.com [209.85.208.174]) by arlo.cworth.org (Postfix) with ESMTPS id 2F1D66DE092B for ; Fri, 22 Nov 2019 15:07:47 -0800 (PST) Received: by mail-lj1-f174.google.com with SMTP id m6so1806101ljc.1 for ; Fri, 22 Nov 2019 15:07:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=h00nYFE9HxzHNAuBQCHc+QqXr1+rCpPipqOm3eRKCWM=; b=iXKJ6RKUqFv5TwfCcYmNdsIHRPhbOEzeyVs1NJKmigwNkIVtjbVqLpmOlz7DwUFiZl zsDKz7Lfa+Q+u8RSbeolNpVuodIXVo3kYjdj6dHzG0WiMh3Tc7GRvpQRfAdVg3gQPHFN qFhUCTemV4UoBSnpyE7Az0NDYbGjpR2YmP+ofcDVfojg3hRkg8dzLmk+q07rSauHFllA PrNWyz8oKZl1dQP9x3sFAeD/SJmCqkoNfqCrVRyL/fGvjbQWzK8WHpvFkIsKMBFy1M5R HxaqZAuTy8bGiVJ0COYKNbxtblGw2v8s+fP9c8YUdveFhDseJaYP9wYgY4+cST43hEle BJ0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=h00nYFE9HxzHNAuBQCHc+QqXr1+rCpPipqOm3eRKCWM=; b=GJGWJWQUWuBu5KvT4oY0zzHzj3WZz2GKjGko1sPXiusoa13eOpnd9xgbAGEH4PZmg1 IIt/yuNS0mQRQ/gYNsyigCTk4WDhfXUoma5ACzIT7Or0nvp0SSYteX83S88ENgU/hNlS AAIY64HawBgrIWIJG9j0kVev57V2OWLeGqAXXc+9simSOVdZ5r/67o90QwcXoYh7L7n5 Aoj2uUu6tTJwELTFPAdq15pyfnytPx6ElMXZ1P04mc6mYDafhrPMc8HRe2CHor8AjGlb LhcoZQM1tW2R72O80XX7NbmUzyNdmh01dINC/OK8m+/p//Ytq+Rfkh0QL3rUWbIGvGEx EDZg== X-Gm-Message-State: APjAAAVqO5YhudN5VlTP82dePob5YdPRANcpuQfkR/Yphudo+UIFMcC5 mKPO9TY4am9KfQmjaEJkI/3M8gXWAMY= X-Google-Smtp-Source: APXvYqxMX5VTkiNKwofrQVhbnKynlL9/ahPrXizrLE2wJWAbY5Y3Fqpw8k/oDuCCknSqbof311+MPA== X-Received: by 2002:a05:651c:326:: with SMTP id b6mr13720839ljp.119.1574464064401; Fri, 22 Nov 2019 15:07:44 -0800 (PST) Received: from localhost.localdomain (h88-129-82-160.cust.a3fiber.se. [88.129.82.160]) by smtp.gmail.com with ESMTPSA id n11sm365611ljg.15.2019.11.22.15.07.43 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 22 Nov 2019 15:07:43 -0800 (PST) From: Johan Parin X-Google-Original-From: Johan Parin To: notmuch@notmuchmail.org Subject: Display extra headers for emacs-mua 2 new patches Date: Sat, 23 Nov 2019 00:07:28 +0100 Message-Id: <20191122230730.35712-1-johan.parin@gmail.com> X-Mailer: git-send-email 2.21.0 (Apple Git-122) MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.29 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: Fri, 22 Nov 2019 23:07:47 -0000 This is a refinement of my first two submissions, cleaned up and also working with reply, which the first versions were not: 1) notmuch-show returns all headers 2) notmuch-show returns extra headers configured by a command line option, which is passed from the emacs mua. As for the second, I changed the command line option to specify extra headers instead of the full set of headers. This is a lot easier, since some headers have special treatment in format_headers_sprinter, and it is also called from reply. This patch is very similar to the one storing the option in the database and using a global database pointer, except that elisp is added to pass the command line flag. There is still one global used in notmuch-show.c in order to pass down the command line argument. This really is necessary since changing the signature of format_headers_sprinter is not really feasible as shown by the patch which passed around the database pointer. I hope that having this global is more acceptable than having a global database pointer. So in summary, the patch variants I have submitted: a) notmuch-show.c returns all headers in message. Con: There are concerns about potential performance impact b) notmuch-show.c returns extra headers as configured in database. Con: Uses a file global database pointer in notmuch-show.c c) notmuch-show.c returns extra headers as specified by a command line flag. This flag is set by the emacs-mua based on notmuch-message-headers if that differs from the default list. I don't see any con with c) really. I have only concerned myself with sexp output since I personally use the emacs-mua. But I think modification for the other formats can be done as a later step. /Johan