Re: [PATCH 0/2] Escape message ID queries in Emacs
authorTomi Ollila <tomi.ollila@iki.fi>
Tue, 27 Mar 2012 06:45:47 +0000 (09:45 +0300)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:45:47 +0000 (09:45 -0800)
43/481591a6be819fe6deac2921eb86790ccb7ebb [new file with mode: 0644]

diff --git a/43/481591a6be819fe6deac2921eb86790ccb7ebb b/43/481591a6be819fe6deac2921eb86790ccb7ebb
new file mode 100644 (file)
index 0000000..41db046
--- /dev/null
@@ -0,0 +1,87 @@
+Return-Path: <tomi.ollila@iki.fi>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id 15EA7431FAF\r
+       for <notmuch@notmuchmail.org>; Mon, 26 Mar 2012 23:45:50 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
+       autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id atTaoekv4Ewg for <notmuch@notmuchmail.org>;\r
+       Mon, 26 Mar 2012 23:45:49 -0700 (PDT)\r
+Received: from guru.guru-group.fi (guru-group.fi [87.108.86.66])\r
+       by olra.theworths.org (Postfix) with ESMTP id 10EE8431FAE\r
+       for <notmuch@notmuchmail.org>; Mon, 26 Mar 2012 23:45:49 -0700 (PDT)\r
+Received: by guru.guru-group.fi (Postfix, from userid 501)\r
+       id 9DBF368055; Tue, 27 Mar 2012 09:45:47 +0300 (EEST)\r
+From: Tomi Ollila <tomi.ollila@iki.fi>\r
+To: Austin Clements <amdragon@MIT.EDU>, notmuch@notmuchmail.org\r
+Subject: Re: [PATCH 0/2] Escape message ID queries in Emacs\r
+In-Reply-To: <1332812236-20387-1-git-send-email-amdragon@mit.edu>\r
+References: <1332812236-20387-1-git-send-email-amdragon@mit.edu>User-Agent:\r
+ Notmuch/0.12+70~gce7ecf1      (http://notmuchmail.org) Emacs/23.3.1\r
+ (x86_64-unknown-linux-gnu)\r
+X-Face: HhBM'cA~<r"^Xv\KRN0P{vn'Y"Kd;zg_y3S[4)KSN~s?O\"QPoL\r
+       $[Xv_BD:i/F$WiEWax}R(MPS`^UaptOGD`*/=@\1lKoVa9tnrg0TW?"r7aRtgk[F\r
+       !)g;OY^,BjTbr)Np:%c_o'jj,Z\r
+Date: Tue, 27 Mar 2012 09:45:47 +0300\r
+Message-ID: <m2sjgutuck.fsf@guru.guru-group.fi>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=us-ascii\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Tue, 27 Mar 2012 06:45:50 -0000\r
+\r
+On Tue, Mar 27 2012, Austin Clements wrote:\r
+\r
+> Currently, Emacs does not escape message ID queries and is\r
+> inconsistent about quoting them.  This patch centralizes this in one\r
+> function that always produces a properly quoted and escaped message ID\r
+> query.\r
+>\r
+> With this, Emacs no longer gets confused by Tomi's crazy message,\r
+>   id:"id:""1332281811-24710-2b-git-send-email-tomi.ollila@iki.fi"""\r
+\r
+LGTM. Things work!\r
+\r
+\r
+One observation, though:\r
+\r
+In search bar the following queries return one match:\r
+\r
+id:id:"1332281811-24710-2b-git-send-email-tomi.ollila@iki.fi"\r
+id:"id:""1332281811-24710-2b-git-send-email-tomi.ollila@iki.fi"""\r
+\r
+but\r
+\r
+id:"id:"1332281811-24710-2b-git-send-email-tomi.ollila@iki.fi""\r
+\r
+return 0 matches.\r
+\r
+It looks like the (above) search strings goes verbatim to command line\r
+\r
+i.e. 'notmuch' 'search' '--sort=oldest-first' 'id:...'\r
+\r
+can be used to compare... so that would be CLI issue if there\r
+is ever need to do do anything with it.\r
+\r
++1\r
+\r
+Thanks for fixing this.\r
+\r
+Tomi\r