Dear list,
I have a message id with a % in it. When I run the following (the message ID is not complete here to keep some anonymity)
mutt -e "set nm_query_type=threads" -f 'notmuch://?query=id:Z23B3X20.22Ba8%'
I receive:
failed to parse notmuch uri: notmuch://?query=id:Z23B3X20.22Ba8%
Using backslashes to escape the percentage sign does not seem to work.
As a side note, shouldn't there be a non-zero exit code if fail to parse?
Kind regards,
Xu
On Thu, Jun 18, 2015 at 02:31:43AM -0400, Xu Wang wrote:
I have a message id with a % in it. When I run the following (the message ID is not complete here to keep some anonymity)
mutt -e "set nm_query_type=threads" -f 'notmuch://?query=id:Z23B3X20.22Ba8%'
I receive:
failed to parse notmuch uri: notmuch://?query=id:Z23B3X20.22Ba8%
Using backslashes to escape the percentage sign does not seem to work.
It's URL, so you have to use proper encoding, see https://en.wikipedia.org/wiki/Percent-encoding
Note that % has special meaning (it's prefix for %<hex>), I guess you need %25 rather than %:
mutt -e "set nm_query_type=threads" -f 'notmuch://?query=id:Z23B3X20.22Ba8%25'
As a side note, shouldn't there be a non-zero exit code if fail to parse?
Hmm... seems like a bug.
Karel
On Tue, Jun 23, 2015 at 11:59 AM, Karel Zak kzak@redhat.com wrote:
On Thu, Jun 18, 2015 at 02:31:43AM -0400, Xu Wang wrote:
I have a message id with a % in it. When I run the following (the message ID is not complete here to keep some anonymity)
mutt -e "set nm_query_type=threads" -f 'notmuch://?query=id:Z23B3X20.22Ba8%'
I receive:
failed to parse notmuch uri: notmuch://?query=id:Z23B3X20.22Ba8%
Using backslashes to escape the percentage sign does not seem to work.
It's URL, so you have to use proper encoding, see https://en.wikipedia.org/wiki/Percent-encoding
Note that % has special meaning (it's prefix for %<hex>), I guess you need %25 rather than %:
mutt -e "set nm_query_type=threads" -f 'notmuch://?query=id:Z23B3X20.22Ba8%25'
Thank you very much for your explanatory response, Karel.
I am confused though as to why '@' does not need to be percent-encoding? Only percents need to be?
Kind regards,
Xu
As a side note, shouldn't there be a non-zero exit code if fail to parse?
Hmm... seems like a bug.
Karel
-- Karel Zak kzak@redhat.com http://karelzak.blogspot.com _______________________________________________ mutt-kz mailing list mutt-kz@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/mutt-kz
mutt-kz@lists.fedoraproject.org