unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: David Bremner <david@tethera.net>
To: Mark Walters <markwalters1009@gmail.com>
Subject: Re: [Patch v4] lib: regexp matching in 'subject' and 'from'
Date: Sat, 11 Feb 2017 19:25:18 -0400	[thread overview]
Message-ID: <87mvdsux7l.fsf@rocinante.cs.unb.ca> (raw)
In-Reply-To: <878tpetpny.fsf@qmul.ac.uk>

Mark Walters <markwalters1009@gmail.com> writes:

>
> Hi
>
> Broadly I like the backslash escaping option. Two thoughts: can any
> fields (from/subject/message-id) start with a "\" anyway? I think not
> but thought it worth checking.

From and subject are probablistic xapian fields, so punctuation is
essentially ignored by the query parser. That being said, nothing
prevents subjects from starting with /.  According to my reading of
rfc5322, conforming message ids cannot contain any of '()<>[]:;@\,."'

> Secondly, message-id is often round-tripped, that is output from notmuch
> and then fed back to notmuch. Do we want to escape the output as above
> before printing in any cases? My view is that if we output the
> message-id prefixed with "id:" then we should escape it (which applies
> with --output=messages --format=text), but if we don't print the "id:"
> part then we shouldn't (eg with --format=json). A similar thing would
> apply to emacs: if it is a normal stash then escape the id, but if it is
> a "bare stash" then do not.

Yes that sounds about right. Do we actually output from and subject with
prefixes attached to them? I have the feeling not.

>
> Actually, one more thing: it would be a shame to block or significantly
> delay the series for such a corner case.
>

If it's _only_ the output of notmuch search --output=messages, then I
guess it's doable.

d

  reply	other threads:[~2017-02-12  1:02 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-27 13:33 [PATCH] lib: regexp matching in 'subject' and 'from' David Bremner
2016-11-14 21:46 ` [Patch v2] " David Bremner
2017-01-18 20:05   ` Jani Nikula
2017-01-18 21:01     ` David Bremner
2017-01-19 12:16       ` [Patch v3] " David Bremner
2017-01-21  3:27         ` [WIP] " David Bremner
2017-01-21 13:59           ` [Patch v4] " David Bremner
2017-01-25 19:40             ` Tomi Ollila
2017-01-26  2:21               ` David Bremner
2017-01-29 11:23                 ` Jani Nikula
2017-02-05 20:16                   ` Tomi Ollila
2017-02-05 23:28                     ` David Bremner
2017-02-09  3:11                   ` David Bremner
2017-02-09 16:15                     ` Tomi Ollila
2017-02-10  8:29                     ` Mark Walters
2017-02-11 23:25                       ` David Bremner [this message]
2017-01-29 11:06               ` Jani Nikula
2017-01-19 14:27   ` [Patch v2] " David Bremner

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=87mvdsux7l.fsf@rocinante.cs.unb.ca \
    --to=david@tethera.net \
    --cc=markwalters1009@gmail.com \
    /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).