Re: Two perceived query language imbalances

Subject: Re: Two perceived query language imbalances

Date: Tue, 27 Apr 2021 14:42:09 +0200

To: Alexander Adolf, David Bremner, notmuch@notmuchmail.org

Cc:

From: Michael J Gruber


Alexander Adolf venit, vidit, dixit 2021-04-27 13:34:03:
> Hello David,
[...]
> >>> id:<message-id> or mid:<message-id> or mid:/<regex>/
> >>>        For id: and mid:, message ID values are the literal contents of
> >>>        the Message-ID: header of email messages, but without the '<',
> >>>        '>' delimiters.
> >>
> >> Similar thing here: "id:" and "mid:" can be used interchangeably, except
> >> for regex search. Adding "id:/regex/" would seem most useful to me.
> >>
> >
> > This was intentional, to avoid breaking existing scripts / internals
> > that rely on treating id: as the primary key for the database. At least
> > that was the concensus when we added it. It seems like one answer would
> > be for you to just use mid: all the time, since it already has the
> > behaviour you like.
> > [...]
> 
> I see, thanks for the insight. In that light, what would be your take on
> featuring "id" less prominently in the documentation, so as to foster
> the sole use of "mid" for all new script developments?
> 
> You could maybe even go as far as marking "id" as "deprecated and kept
> for backwards compatibility with legacy scripts only"; but without
> actually ever removing it, of course, since as you say it's needed for
> internal purposes.

In that case, I suggest that `notmuch search --output=messages` outputs
message ids in the form `mid:...`, as well. Users can discover
`--output=messages` from command completion and could learn the "right"
search prefix from the command output.

Regards
Michael
_______________________________________________
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-leave@notmuchmail.org

Thread: