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 C1D106DE0E84 for ; Sun, 10 Nov 2019 01:46:14 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: -0.178 X-Spam-Level: X-Spam-Status: No, score=-0.178 tagged_above=-999 required=5 tests=[AWL=-0.177, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-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 K2iU5CQNMDJv for ; Sun, 10 Nov 2019 01:46:14 -0800 (PST) Received: from mail-lj1-f193.google.com (mail-lj1-f193.google.com [209.85.208.193]) by arlo.cworth.org (Postfix) with ESMTPS id 348F96DE0219 for ; Sun, 10 Nov 2019 01:46:14 -0800 (PST) Received: by mail-lj1-f193.google.com with SMTP id n5so10609088ljc.9 for ; Sun, 10 Nov 2019 01:46:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nikula-org.20150623.gappssmtp.com; s=20150623; h=from:to:subject:in-reply-to:references:date:message-id:mime-version; bh=u9d99HWE5wCJ7JtDLt3k0R+YNKAbtasbEMY2FdclMMw=; b=YixG/ySu8grqjLwQUCK5ICIloCGQoiXuDguO3lDDG5YZJfR/1eoTBy0QZehkdtiS1P FmFDC5xmEo2HvbejFBnxVnXz5i5o5PVlOJgdUGM98vMR9uX5RstXE7Zq5Z1Zle8sQE0w l6/HoZ1fTMf0kUwIWeSAnvF3FvXDS2fKhijbhZf0voJJbU4pxp+L9SfXagDBs0wR5ez+ Vvr4YSO5/9y4J1OEWq2UDNpnrH3/kyTEdMOVgRI0Ue8GF/6zm+fOmcOu2hoAGj/WWbWC 696BJrCIVjAA6RoyZ5SY2QT4xLVorC5cqF0JNwlWLnm+omtvN5oj926xZBzC+uyQr99k ZD5Q== 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:in-reply-to:references:date :message-id:mime-version; bh=u9d99HWE5wCJ7JtDLt3k0R+YNKAbtasbEMY2FdclMMw=; b=qFlzr+fPtRh/WAYfa9rqBG9pnNKISbplx0yncfEt4fOhTi7v9KonZnuKoXAYYaxtLd G3B0ijItuelZhv0X6IsIeKG6uuCeyB4MMnebcFa3w/A1mNM7o4GIrAdDvpGGfcvuaQ2g uscSb1t8CQVsyQr5oD8VbiDsYUwPl7p+qQRcmGvePxV6zPgfj+Bq+1ufNurVr2e9oaD5 ju3Kakn4yIKAEJJiCiH1Kf9RXblasIngaWTVS315OtqLmubyqVRpBTkSG7qAnKJ3xmtk KKyVn8XiZYqmrFWQZXDAws4BZe+RIdCacSxeTVrkB/Sxiei2OsZJURs3wXIXVd86hCQN dyEg== X-Gm-Message-State: APjAAAWBTJkPpXRTkRRXAT9QKQTQNczvQVCL7dPNn0K3lDgtLXjBZMau 3uso2iWH2uYH/lv4MhlXw14FpmrI9YY3zA== X-Google-Smtp-Source: APXvYqyq2lv8VBEeSFIH+3j5TjnZQ3g6o5ScugnhMXefShI+TproUZKkA76MFt3DIEzR5EqrlJMMBA== X-Received: by 2002:a2e:9006:: with SMTP id h6mr12481113ljg.231.1573379172358; Sun, 10 Nov 2019 01:46:12 -0800 (PST) Received: from localhost (213-216-249-106.bb.dnainternet.fi. [213.216.249.106]) by smtp.gmail.com with ESMTPSA id w21sm5158418ljg.91.2019.11.10.01.46.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 10 Nov 2019 01:46:11 -0800 (PST) From: Jani Nikula To: Johan Parin , notmuch@notmuchmail.org Subject: Re: [PATCH] Fix format_headers_sprinter to return all headers In-Reply-To: References: <20191109174413.97663-1-johan.parin@gmail.com> <87k188c0x8.fsf@nikula.org> Date: Sun, 10 Nov 2019 11:46:10 +0200 Message-ID: <87eeygawt9.fsf@nikula.org> MIME-Version: 1.0 Content-Type: text/plain 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: Sun, 10 Nov 2019 09:46:14 -0000 On Sat, 09 Nov 2019, Johan Parin wrote: > Jani Nikula writes: > >> On Sat, 09 Nov 2019, Johan Parin wrote: >>> Modify format_headers_sprinter so that it returns all headers in the >>> sexp, instead of a fixed set of headers. >> >> I have to deal with plenty of long threads that already take a very >> long time to open in notmuch-emacs. How's this going to impact the >> emacs interface performance? For example the patch mail I'm replying >> to has more header content than body content. There are tons of >> headers that I can't imagine being useful to anyone. >> > > How long are these threads may I ask? Would it be possible for you to > apply the patch and see if you see a noticable difference? I'll need to try this with my work email which is the bigger problem. > I have a hard time seeing that the C code would cause any noticable > performance impact, but perhaps the elisp. But my general understanding > of the code base is low, so I may be wrong. It's indeed the lisp part that I'm worried about. > I guess it's in the following type of code the performance concern lies? > > (mapc (lambda (header) > (let* ((header-symbol (intern (concat ":" header))) > (header-value (plist-get headers header-symbol))) > (if (and header-value > (not (string-equal "" header-value))) > (notmuch-show-insert-header header header-value)))) > notmuch-message-headers) > > Don't know how efficient plists are in general. > >> I'm wondering if the right thing to do would be to make it possible to >> specify which additional headers to include in notmuch-show >> output. This would be based on notmuch-message-headers. We already >> have options to include/exclude body content and html parts for much >> the same reasons. (Though the command-line arguments for those are >> incoherent at best.) >> > > This would be possible of course. > > Another option I guess is to hard code some extra "interesting" > headers. But what is interesting is subjective and it is very nice to > have the flexibility to control this is in elisp. > > mu4e has the customization variable `mu4e-view-fields', but it can only > take on values from a restricted list, namely: > > :from :to :cc :subject :flags :date :maildir :mailing-list :tags > :attachments :signature :decryption :user-agent > > So a compromise would be to restrict the returned headers to a list like > this. This of course is if we think the potential performance issue is > in the elisp. > > Personally I would be content for the moment to be able to see > user-agent and x-mailer. But that's just me. I failed to mention that I do think the feature itself would be useful and welcome. Currently I just hit V and find the header in the raw message... BR, Jani.