Re: [PATCH] Display extra headers for emacs-mua - cmd line option

2019-11-23 Thread Johan Parin
The elisp was a little buggy. Here is another version which should hopefully be 100% working. Also cleaned up and aligned style to the surrounding code. /Johan >From ed26005481d824c0f7b0518a934470e4c4231d0a Mon Sep 17 00:00:00 2001 From: Johan Parin Date: Fri, 22 Nov 2019 23:06:14 +0

[PATCH] Display extra headers for emacs-mua - cmd line option

2019-11-22 Thread Johan Parin
Add a new flag --extra-headers to notmuch show, in order to let the user specify displayed headers using `notmuch-message-headers' in the emacs mua. The flag will impact which headers are output in format_headers_sprinter. The emacs mua will generate the --extra-headers flag based on

[PATCH] Display extra headers for emacs-mua - return all headers

2019-11-22 Thread Johan Parin
Modify format_headers_sprinter so that it returns all headers in the sexp, instead of a fixed set of headers. This is required in order for the elisp variable `notmuch-message-headers' to work. See this bug report: https://notmuchmail.org/pipermail/notmuch/2017/026069.html --- notmuch-show.c

Display extra headers for emacs-mua 2 new patches

2019-11-22 Thread Johan Parin
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

Re: [PATCH] Display extra headers for emacs-mua - db config option

2019-11-21 Thread Johan Parin
Johan Parin writes: > Daniel Kahn Gillmor writes: >> >> Is it that much worse to pass around the notmuch_database_t *? >> > > It has a lot of code impact, it really propagates to a lot of > places. For instance it also impacts the json and text api, because

Re: [PATCH] Display extra headers for emacs-mua - db config option

2019-11-21 Thread Johan Parin
Daniel Kahn Gillmor writes: > > I'm a little weirded out by the move to a static notmuch_database_t > *notmuch object. Are we doing this because we don't want to pass > around the database to internal functions? Yes > I know that the scope of nomtuch-show.c is basically "global scope", >

Re: Tests failing on master

2019-11-17 Thread Johan Parin
Johan Parin writes: > In order to be able to run some tests and since OS X Mojave only has > bash 3.2, I installed a Kali vm, downloaded a fresh notmuch repo, > installed the dependencies and did make test. Result: > > 1123/1128 tests passed. > 3 broken tests failed as e

Tests failing on master

2019-11-17 Thread Johan Parin
In order to be able to run some tests and since OS X Mojave only has bash 3.2, I installed a Kali vm, downloaded a fresh notmuch repo, installed the dependencies and did make test. Result: 1123/1128 tests passed. 3 broken tests failed as expected. 2 tests failed. More details: T050-new:

Re: [PATCH] Display extra headers for emacs-mua - db config option

2019-11-16 Thread Johan Parin
This is another version of my attempt to get configurability on extra headers to be displayed in the emacs MUA. It is a modification of a previous patch where the extra headers returned by notmuch-show were hard coded. In this version, the extra headers is configured by a database config option

[PATCH] Display extra headers for emacs-mua - db config option

2019-11-16 Thread Johan Parin
Modify format_headers_sprinter so that it returns some additional headers in the sexp, instead of a small fixed set of headers. The extra header list is configured by the database config option `show.extra_headers'. This is required in order for the elisp variable `notmuch-message-headers' to

Re: [PATCH] Add --message-headers flag to notmuch-show

2019-11-12 Thread Johan Parin
Daniel Kahn Gillmor writes: > On Mon 2019-11-11 10:26:18 -0500, Daniel Kahn Gillmor wrote: >> - What is the specific use case for this? For example, can you identify >>situations where different headers need to be emitted by different >>users? Even one motivating example would help

Re: Unread handling

2019-11-12 Thread Johan Parin
Teemu Likonen writes: > > It seems to me that using search term tag:unread will help you. Try this > in the *hello* buffer: > > z tag:unread > > You'll go directly to tree view and unread messages will show with > normal colours and read messages with grey colour. Commands "n" and > "p"

Unread handling

2019-11-10 Thread Johan Parin
I'm probably doing something wrong but I find myself frustrated with the handling of unread in the emacs-mua. In notmuch-search I found the default bold face for unread of notmuch-search-unread-face not enough to make them stand out so I tried something like (setq notmuch-search-line-faces

Re: [PATCH] Fix format_headers_sprinter to return all headers (v2)

2019-11-10 Thread Johan Parin
David Edmondson writes: > On Saturday, 2019-11-09 at 23:13:58 +01, Johan Parin wrote: > >> +const char* interesting_headers[] = { + "Maildir", >> "Mailing-list", "Tags", "Attachments", "Signature", + "Decrypti

Re: [PATCH] Add --message-headers flag to notmuch-show

2019-11-10 Thread Johan Parin
According to the proposal of Jani and Tomi I have made a new patch version which adds a flag --message-headers to notmuch show. This is a preliminary commit just to get general comments. No doc updates here. Also there are probably a few style issues. And I guess I should use talloc instead of

[PATCH] Add --message-headers flag to notmuch-show

2019-11-10 Thread Johan Parin
Add a new flag --message-headers to notmuch show, in order to let the user specify displayed headers using `notmuch-message-headers' in the emacs mua. The flag will impact which headers are output in format_headers_sprinter. By default only the following headers are output by notmuch show with

Re: [PATCH] Fix format_headers_sprinter to return all headers (v2)

2019-11-09 Thread Johan Parin
So this version only returns a fixed limited set of extra headers. Hopefully this eliminates any concern for a performance penalty. Of course it limits the usefulness of the notmuch-message-headers variable. /Johan ___ notmuch mailing list

[PATCH] Fix format_headers_sprinter to return all headers (v2)

2019-11-09 Thread Johan Parin
Modify format_headers_sprinter so that it returns some additional headers in the sexp, instead of a small fixed set of headers. This version includes the following headers: - Maildir - Mailing-list - Tags - Attachments - Signature - Decryption - User-agent - X-Mailer This is required in order

Re: [PATCH] Fix format_headers_sprinter to return all headers

2019-11-09 Thread Johan Parin
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

[PATCH] Fix format_headers_sprinter to return all headers

2019-11-09 Thread Johan Parin
Modify format_headers_sprinter so that it returns all headers in the sexp, instead of a fixed set of headers. This is required in order for the elisp variable `notmuch-message-headers' to work. See this bug report: https://notmuchmail.org/pipermail/notmuch/2017/026069.html --- notmuch-show.c