unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Johan Parin <johanparin@gmail.com>
To: notmuch@notmuchmail.org
Subject: Display extra headers for emacs-mua 2 new patches
Date: Sat, 23 Nov 2019 00:07:28 +0100	[thread overview]
Message-ID: <20191122230730.35712-1-johan.parin@gmail.com> (raw)

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

             reply	other threads:[~2019-11-22 23:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-22 23:07 Johan Parin [this message]
2019-11-22 23:07 ` [PATCH] Display extra headers for emacs-mua - cmd line option Johan Parin
2019-11-23  9:44   ` Johan Parin
2019-11-22 23:07 ` [PATCH] Display extra headers for emacs-mua - return all headers Johan Parin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191122230730.35712-1-johan.parin@gmail.com \
    --to=johanparin@gmail.com \
    --cc=notmuch@notmuchmail.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).