From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 07 09:48:32 2021 Received: (at submit) by debbugs.gnu.org; 7 Aug 2021 13:48:32 +0000 Received: from localhost ([127.0.0.1]:52183 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mCMgf-0005hn-15 for submit@debbugs.gnu.org; Sat, 07 Aug 2021 09:48:32 -0400 Received: from lists.gnu.org ([209.51.188.17]:48556) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mCEK9-0003uj-4g for submit@debbugs.gnu.org; Sat, 07 Aug 2021 00:52:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33308) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mCEK8-0003rq-9N for bug-gnu-emacs@gnu.org; Sat, 07 Aug 2021 00:52:40 -0400 Received: from stranik.org ([95.216.183.163]:45407) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mCEK6-0008A1-ON for bug-gnu-emacs@gnu.org; Sat, 07 Aug 2021 00:52:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=stranik.org ; s=2020nix; h=Subject:To:From; bh=7nYLKAN90IFFejvaujiKefXlDGmkS9ekcwK2MXIIEDw=; b=ds2lCV1vL9js6ODLqAvrxUnYEz Uk8HXMjr+4w2IzZ0SaCB0HrkqNKTd9CY8IIp4RXqcrchZ1m5C71GbqD5Yd1KHSgpofvu9AUmRgQmH YihnKF3q0C+vz4dnTSbYbzCFX4AtD34YjZT1eGeSiiHm6FQ8w0A7IGwloi2AVwPXPw5Y=; Received: from ool-2f14047c.dyn.optonline.net ([47.20.4.124] helo=localhost) by stranik.org with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1mCEK0-0005oV-8H; Sat, 07 Aug 2021 04:52:32 +0000 From: Jan Stranik To: bug-gnu-emacs@gnu.org Subject: [PATCH] Fix NNIMAP search command in the gnus Date: Sat, 7 Aug 2021 00:52:30 -0400 Message-Id: <20210807045230.23998-1-jan@stranik.org> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=95.216.183.163; envelope-from=jan@stranik.org; helo=stranik.org X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Sat, 07 Aug 2021 09:48:26 -0400 Cc: Jan Stranik X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) In the version 27.2 of emacs, the nnimap search commands stopped working in gnus. Good example is a command AT to find a referred thread in the summary buffer. The observed behaviour was that the search command returned no error. The problem turned out to be in the way how imap query is sent to the server. The function nnimap-make-thread-query used a format function with foramt specifier %S. For string values with formatting the string returned is in the format #("string" ....). The result was tha the query sent to the server looked like: 23:52:00 [stranik.org] 1980 UID SEARCH (OR HEADER REFERENCES #("<87pmurac3u.fsf@stranik.org>" 0 28 (ws-butler-chg chg)) HEADER Message-Id #("<87pmurac3u.fsf@stranik.org>" 0 28 (ws-butler-chg chg))) which is an invalid query. The change formats the string with %s specifier which discards text properties. --- lisp/gnus/nnimap.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/gnus/nnimap.el b/lisp/gnus/nnimap.el index 3cf65453f3..33bd6ee5a8 100644 --- a/lisp/gnus/nnimap.el +++ b/lisp/gnus/nnimap.el @@ -2295,11 +2295,11 @@ Return the server's response to the SELECT or EXAMINE command." ""))) (value (format - "(OR HEADER REFERENCES %S HEADER Message-Id %S)" + "(OR HEADER REFERENCES %s HEADER Message-Id %s)" id id))) (dolist (refid refs value) (setq value (format - "(OR (OR HEADER Message-Id %S HEADER REFERENCES %S) %s)" + "(OR (OR HEADER Message-Id %s HEADER REFERENCES %s) %s)" refid refid value))))) -- 2.31.1 From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 07 19:06:24 2021 Received: (at submit) by debbugs.gnu.org; 7 Aug 2021 23:06:24 +0000 Received: from localhost ([127.0.0.1]:53298 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mCVOZ-0002pY-GI for submit@debbugs.gnu.org; Sat, 07 Aug 2021 19:06:24 -0400 Received: from lists.gnu.org ([209.51.188.17]:43358) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mCVOV-0002pO-Jb for submit@debbugs.gnu.org; Sat, 07 Aug 2021 19:06:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51362) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mCVOV-0000jq-El for bug-gnu-emacs@gnu.org; Sat, 07 Aug 2021 19:06:19 -0400 Received: from mail.ericabrahamsen.net ([52.70.2.18]:42990) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mCVOT-0002GY-SJ for bug-gnu-emacs@gnu.org; Sat, 07 Aug 2021 19:06:19 -0400 Received: from localhost (c-71-197-184-122.hsd1.wa.comcast.net [71.197.184.122]) (Authenticated sender: eric@ericabrahamsen.net) by mail.ericabrahamsen.net (Postfix) with ESMTPSA id 9E2F3FA08C; Sat, 7 Aug 2021 23:06:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ericabrahamsen.net; s=mail; t=1628377569; bh=1BNnj51w4rtY+LJNoVrjDE+nI7AdR0MIIcxObB3xCtI=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=mWQD4NjmbdGLhiQdj30lkvfvQPjHW9Z/TfP5Ynh23vh0+9Hrfzk2BfJbjtBjm+dGR +ojVHeecOOscGVQsUsb3zxGBEYJuKUzTaJirSPSyB0SV3GSpr6Q+5L2s+d0CuKYy43 kriJw4RdF7noc+U4LjmMshZj3DOHM3nC23CvvbWE= From: Eric Abrahamsen To: Jan Stranik via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Subject: Re: bug#49926: [PATCH] Fix NNIMAP search command in the gnus References: <20210807045230.23998-1-jan@stranik.org> Date: Sat, 07 Aug 2021 16:06:08 -0700 In-Reply-To: <20210807045230.23998-1-jan@stranik.org> (Jan Stranik via's message of "Sat, 7 Aug 2021 00:52:30 -0400") Message-ID: <87tuk097of.fsf@ericabrahamsen.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=52.70.2.18; envelope-from=eric@ericabrahamsen.net; helo=mail.ericabrahamsen.net X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: submit Cc: Jan Stranik , 49926@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) Jan Stranik via "Bug reports for GNU Emacs, the Swiss army knife of text editors" writes: > In the version 27.2 of emacs, the nnimap search commands stopped > working in gnus. > > Good example is a command AT to find a referred > thread in the summary buffer. The observed behaviour was that the > search command returned no error. > > The problem turned out to be in the way how imap query is sent to the > server. The function nnimap-make-thread-query used a format function > with foramt specifier %S. For string values with formatting the string > returned is in the format #("string" ....). The result was tha the > query sent to the server looked like: > 23:52:00 [stranik.org] 1980 UID SEARCH (OR HEADER REFERENCES #("<87pmurac3u.fsf@stranik.org>" 0 28 (ws-butler-chg chg)) HEADER Message-Id #("<87pmurac3u.fsf@stranik.org>" 0 28 (ws-butler-chg chg))) > > which is an invalid query. > > The change formats the string with %s specifier which discards text > properties. But that also removes the quoting around the message ids -- are we sure that's still valid? From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 08 15:26:43 2021 Received: (at 49926) by debbugs.gnu.org; 8 Aug 2021 19:26:43 +0000 Received: from localhost ([127.0.0.1]:54854 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mCoRX-0003Xd-Cs for submit@debbugs.gnu.org; Sun, 08 Aug 2021 15:26:43 -0400 Received: from mail.ericabrahamsen.net ([52.70.2.18]:51398) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mCoRS-0003XM-0r for 49926@debbugs.gnu.org; Sun, 08 Aug 2021 15:26:41 -0400 Received: from localhost (c-71-197-184-122.hsd1.wa.comcast.net [71.197.184.122]) (Authenticated sender: eric@ericabrahamsen.net) by mail.ericabrahamsen.net (Postfix) with ESMTPSA id 630F8FA081; Sun, 8 Aug 2021 19:26:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ericabrahamsen.net; s=mail; t=1628450790; bh=xrSAjK70jFqz0V/yjwvjYyBo9Ljl3nNes7RVKl4VhSI=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=o9tURX7ggBG49aNueYNxuNVnPeVli6QOzGlqlNLDeq5q8KWbSoA0lMyKDfXB655Kj +5p8dDRq/09Tf0oHYVredHdcW/6u3924W4qQaT8TJFh71GZ0e53iXRRab+C/gc9Ksd LQ3UHMXoMrcRbaQYSV2OeV5p7DS2K6NZ5Up2Sidc= From: Eric Abrahamsen To: Jan Stranik Subject: Re: bug#49926: [PATCH] Fix NNIMAP search command in the gnus References: <20210807045230.23998-1-jan@stranik.org> <87tuk097of.fsf@ericabrahamsen.net> <8735rjeqo5.fsf@stranik.org> Date: Sun, 08 Aug 2021 12:26:28 -0700 In-Reply-To: <8735rjeqo5.fsf@stranik.org> (Jan Stranik's message of "Sun, 08 Aug 2021 14:29:14 -0400") Message-ID: <87eeb391qz.fsf@ericabrahamsen.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 49926 Cc: 49926@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) On 08/08/21 14:29 PM, Jan Stranik wrote: > On 08/07/21 16:06 PM, Eric Abrahamsen wrote: >> Jan Stranik via "Bug reports for GNU Emacs, the Swiss army knife of text >> editors" writes: >> >>> In the version 27.2 of emacs, the nnimap search commands stopped >>> working in gnus. >>> >>> Good example is a command AT to find a referred >>> thread in the summary buffer. The observed behaviour was that the >>> search command returned no error. >>> >>> The problem turned out to be in the way how imap query is sent to the >>> server. The function nnimap-make-thread-query used a format function >>> with foramt specifier %S. For string values with formatting the string >>> returned is in the format #("string" ....). The result was tha the >>> query sent to the server looked like: >>> 23:52:00 [stranik.org] 1980 UID SEARCH (OR HEADER REFERENCES >>> #("<87pmurac3u.fsf@stranik.org>" 0 28 (ws-butler-chg chg)) HEADER >>> Message-Id #("<87pmurac3u.fsf@stranik.org>" 0 28 (ws-butler-chg >>> chg))) >>> >>> which is an invalid query. >>> >>> The change formats the string with %s specifier which discards text >>> properties. >> >> But that also removes the quoting around the message ids -- are we sure >> that's still valid? (Putting debbugs back in the cc) > You're right. Per the specification, the strings are expected to be > either in literal or quotes syntax > (https://datatracker.ietf.org/doc/html/rfc3501#section-4.3). > > Adding quotes back to make the strings to be in quoted syntax. > > Interestingly, dovecot seems to accept the strings without quotes as > well. I've found dovecot to be generally pretty permissive, though obviously we want to stick closely to the RFCs here. > New patch attached. This seems fine, but just thinking out loud: is there anything else the %S could potentially get us, here? Extra quoting of special characters? Our other option would be to explicitly remove properties from the strings beforehand; I'm just wondering if one approach is preferable over another. Eric From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 05 22:39:48 2021 Received: (at 49926) by debbugs.gnu.org; 6 Nov 2021 02:39:48 +0000 Received: from localhost ([127.0.0.1]:47939 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mjBcS-0004Jr-5p for submit@debbugs.gnu.org; Fri, 05 Nov 2021 22:39:48 -0400 Received: from quimby.gnus.org ([95.216.78.240]:46776) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mjBcQ-0004Je-Um for 49926@debbugs.gnu.org; Fri, 05 Nov 2021 22:39:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=DblDhod3Kxgy0rq+/BxbHn7N3e0eNVcUdHmq9QugjAo=; b=mgVEjgDZ3Gtp+V2vxYsRNw5SqJ /KVxITNDbmI07n9BMpu4f+2Q7c40C3eEDmBZYoo4V6afPmeVs7C+1bFt6oXo7HEKv/aVgGy/4MuXd 5oAmX/YxOm/lceIxnCFIz9BPYiGb/WviKLLP4/a+bOTNc/CLtHSfqEqCgyiHpGwdbdpU=; Received: from [84.212.220.105] (helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mjBcH-00025F-U3; Sat, 06 Nov 2021 03:39:40 +0100 From: Lars Ingebrigtsen To: Eric Abrahamsen Subject: Re: bug#49926: [PATCH] Fix NNIMAP search command in the gnus References: <20210807045230.23998-1-jan@stranik.org> <87tuk097of.fsf@ericabrahamsen.net> <8735rjeqo5.fsf@stranik.org> <87eeb391qz.fsf@ericabrahamsen.net> X-Now-Playing: Mirry's _Mirry_: "Study in F" Date: Sat, 06 Nov 2021 03:39:35 +0100 In-Reply-To: <87eeb391qz.fsf@ericabrahamsen.net> (Eric Abrahamsen's message of "Sun, 08 Aug 2021 12:26:28 -0700") Message-ID: <87ilx6aty0.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Eric Abrahamsen writes: > (Putting debbugs back in the cc) [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 49926 Cc: Jan Stranik , 49926@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Eric Abrahamsen writes: > (Putting debbugs back in the cc) [...] >> New patch attached. The new version of the patch didn't make it to the bug tracker. Could you re-send it, Jan? -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 05 22:39:52 2021 Received: (at control) by debbugs.gnu.org; 6 Nov 2021 02:39:52 +0000 Received: from localhost ([127.0.0.1]:47942 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mjBcW-0004K9-CY for submit@debbugs.gnu.org; Fri, 05 Nov 2021 22:39:52 -0400 Received: from quimby.gnus.org ([95.216.78.240]:46790) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mjBcV-0004Ji-22 for control@debbugs.gnu.org; Fri, 05 Nov 2021 22:39:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=c1F5fhTkWBhkZucboEN/E+v4iud7/2hx8R92NYT5hc4=; b=owHb6NOUzNapv2TZ2VdWkm3dbk 2VhAV+eD8Ev138WdJu2oTXtW+HAJLJLu63u5k2FCisN2dz6YJm2Q/usPHPW51VAm/wL3urqOb5DLa E4Jlk2kTnAeUDciT5lOaZh71r2xJvBoHjExhwAi+ujNYXDmD2Po89Y75HemmTOS/VU0Q=; Received: from [84.212.220.105] (helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mjBcM-00025M-UZ for control@debbugs.gnu.org; Sat, 06 Nov 2021 03:39:45 +0100 Date: Sat, 06 Nov 2021 03:39:42 +0100 Message-Id: <87h7cqatxt.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #49926 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: tags 49926 + moreinfo quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) tags 49926 + moreinfo quit From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 06 10:55:40 2021 Received: (at 49926) by debbugs.gnu.org; 6 Nov 2021 14:55:40 +0000 Received: from localhost ([127.0.0.1]:50122 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mjN6a-00072X-6w for submit@debbugs.gnu.org; Sat, 06 Nov 2021 10:55:40 -0400 Received: from mail.ericabrahamsen.net ([52.70.2.18]:54878) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mjN6Y-00072K-Ef for 49926@debbugs.gnu.org; Sat, 06 Nov 2021 10:55:39 -0400 Received: from localhost (c-71-197-232-156.hsd1.wa.comcast.net [71.197.232.156]) (Authenticated sender: eric@ericabrahamsen.net) by mail.ericabrahamsen.net (Postfix) with ESMTPSA id 1364EFA02C; Sat, 6 Nov 2021 14:55:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ericabrahamsen.net; s=mail; t=1636210531; bh=g9Kx6wPPuGVlLnbVo+JQBzOVN4r0Xv4WnKfL/vRX2yM=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=grOLiLHLDoLXLz3yUtLw0DrEHcHWPaUefkN3DcqZE+XdZ1bB5xr/za0hwhVGAoUVz g0buTUmZVBq/Shli7JqSrGVE2YN/6e8MKlFtC9tQl3tVjteA2prvGWNgDNbiF5FHMw CcDFKpF4hjwjyLMYsZZxpqlQ/AXXLnHEQcWxZfdY= From: Eric Abrahamsen To: Lars Ingebrigtsen Subject: Re: bug#49926: [PATCH] Fix NNIMAP search command in the gnus References: <20210807045230.23998-1-jan@stranik.org> <87tuk097of.fsf@ericabrahamsen.net> <8735rjeqo5.fsf@stranik.org> <87eeb391qz.fsf@ericabrahamsen.net> <87ilx6aty0.fsf@gnus.org> Date: Sat, 06 Nov 2021 07:55:29 -0700 In-Reply-To: <87ilx6aty0.fsf@gnus.org> (Lars Ingebrigtsen's message of "Sat, 06 Nov 2021 03:39:35 +0100") Message-ID: <87mtmh49lq.fsf@ericabrahamsen.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 49926 Cc: Jan Stranik , 49926@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) --=-=-= Content-Type: text/plain On 11/06/21 03:39 AM, Lars Ingebrigtsen wrote: > Eric Abrahamsen writes: > >> (Putting debbugs back in the cc) > > [...] > >>> New patch attached. > > The new version of the patch didn't make it to the bug tracker. Could > you re-send it, Jan? He sent that directly to me, attached here. I guess I don't see any problem with it. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Fix-NNIMAP-search-command-in-the-gnus.patch >From 7f877856766b3e6b668ce4dc52130a3367f5dc6f Mon Sep 17 00:00:00 2001 From: Jan Stranik Date: Sat, 7 Aug 2021 00:17:03 -0400 Subject: [PATCH] Fix NNIMAP search command in the gnus In the version 27.2 of emacs, the nnimap search commands stopped working in gnus. Good example is a command AT to find a referred thread in the summary buffer. The observed behaviour was that the search command returned no error. The problem turned out to be in the way how imap query is sent to the server. The function nnimap-make-thread-query used a format function with foramt specifier %S. For string values with formatting the string returned is in the format #("string" ....). The result was tha the query sent to the server looked like: 23:52:00 [stranik.org] 1980 UID SEARCH (OR HEADER REFERENCES #("<87pmurac3u.fsf@stranik.org>" 0 28 (ws-butler-chg chg)) HEADER Message-Id #("<87pmurac3u.fsf@stranik.org>" 0 28 (ws-butler-chg chg))) which is an invalid query. The change formats the string with %s specifier which discards text properties. --- lisp/gnus/nnimap.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/gnus/nnimap.el b/lisp/gnus/nnimap.el index 3cf65453f3..6e3c411bf2 100644 --- a/lisp/gnus/nnimap.el +++ b/lisp/gnus/nnimap.el @@ -2295,11 +2295,11 @@ Return the server's response to the SELECT or EXAMINE command." ""))) (value (format - "(OR HEADER REFERENCES %S HEADER Message-Id %S)" + "(OR HEADER REFERENCES \"%s\" HEADER Message-Id \"%s\")" id id))) (dolist (refid refs value) (setq value (format - "(OR (OR HEADER Message-Id %S HEADER REFERENCES %S) %s)" + "(OR (OR HEADER Message-Id \"%s\" HEADER REFERENCES \"%s\") %s)" refid refid value))))) -- 2.31.1 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 06 14:26:25 2021 Received: (at 49926) by debbugs.gnu.org; 6 Nov 2021 18:26:25 +0000 Received: from localhost ([127.0.0.1]:50568 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mjQOX-0004Id-27 for submit@debbugs.gnu.org; Sat, 06 Nov 2021 14:26:25 -0400 Received: from quimby.gnus.org ([95.216.78.240]:53754) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mjQOV-0004IO-MI for 49926@debbugs.gnu.org; Sat, 06 Nov 2021 14:26:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=Xwm20TxeCBvzK06x3AT9lyDB0cjsfEwutq2ZdD29O50=; b=AF8O/Xx43d0+FMy7YNSQP0R/C1 uggXDpOUry7gkSuIb3ZPvmU8kz4BzDCx49BEwhlRxwp1HBTTuW3NxZ3cjAvQt85U4bSXIAl8L0x6S UfDPA4F6lrv9doruQy2BVhVB8OoqrHYezNiutVHBu5lZNSEQUelNd8OMrSZxS1jyFV/I=; Received: from [84.212.220.105] (helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mjQOM-0000TN-KG; Sat, 06 Nov 2021 19:26:17 +0100 From: Lars Ingebrigtsen To: Eric Abrahamsen Subject: Re: bug#49926: [PATCH] Fix NNIMAP search command in the gnus References: <20210807045230.23998-1-jan@stranik.org> <87tuk097of.fsf@ericabrahamsen.net> <8735rjeqo5.fsf@stranik.org> <87eeb391qz.fsf@ericabrahamsen.net> <87ilx6aty0.fsf@gnus.org> <87mtmh49lq.fsf@ericabrahamsen.net> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAIVBMVEX6+vfn5NaqpZnb 39XW1M3UyraZiHl6bGiqwqHItqn////0osDuAAAAAWJLR0QKaND0VgAAAAd0SU1FB+ULBhIMO9r6 n2oAAAGqSURBVDjL5dO/b5tAFAfwo7iVsnE5GDL2yTZmAx1/QBDvIjGCeFUZ6yFWVoawe/KYnkzS +297gIWr2lWkrP2KBT53737owdhlHM75J+Ym/ErSW+Yu7jPMM0Ss7Rg7KuEyRcfCFwi3XbsL2/D7 4bDZHw77zQa4BSfFLEUPpe85QiSJ5LkUwwyXiZhJKWKZ5jKP0yyVUk7geENlLxaMc/sI4Qnnjrns Wj4Awb/A/zhUYKqoivT2cXoXJwgKMK9hB78MxH/CTQtak0H9VGg9Cp/grWsN6a2OnrSJjme4gQ52 PYVR/W2JqvfOMy7zLgAYQ82qJ6KxEvMmuFuvGqo0ENk9LM/g2OHUdLCOegif4X6GIDCqVgA7gHXX 6q8zHH1jqr6BRwB7eoi8Eyx6wmpVgI603tmC8GNe/HyrDrd96F3CnAlcbY4qS+wG8rSA9csMDxFm BZXcR1S1GQ8ygrMMetvIvm/BRpl5V9zWCWhIjaanpjxB2vwU8nb4rBSRoqae4DMdkWcc/ZKycpho +niEoOQ4/i0ZV4R7WNn7ee8c/ycs+NXEtkuH2F79K78BdqdwbmQ0LlMAAAAldEVYdGRhdGU6Y3Jl YXRlADIwMjEtMTEtMDZUMTg6MTI6NTkrMDA6MDAlr6aZAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDIx LTExLTA2VDE4OjEyOjU5KzAwOjAwVPIeJQAAAABJRU5ErkJggg== X-Now-Playing: Floating Points with Pharoah Sanders and the London Symphony Orchestra's _Promises_: "Movement 3" Date: Sat, 06 Nov 2021 19:26:09 +0100 In-Reply-To: <87mtmh49lq.fsf@ericabrahamsen.net> (Eric Abrahamsen's message of "Sat, 06 Nov 2021 07:55:29 -0700") Message-ID: <87a6ihb0ou.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Eric Abrahamsen writes: > - "(OR HEADER REFERENCES %S HEADER Message-Id %S)" > + "(OR HEADER REFERENCES \"%s\" HEADER Message-Id \"%s\")" > id id))) This is not correct -- this would yield an incorrect syntax for IDs that contain a " character. I've now fixed this in emacs-28 by just removing the text properties from `id' instead. Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 49926 Cc: Jan Stranik , 49926@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Eric Abrahamsen writes: > - "(OR HEADER REFERENCES %S HEADER Message-Id %S)" > + "(OR HEADER REFERENCES \"%s\" HEADER Message-Id \"%s\")" > id id))) This is not correct -- this would yield an incorrect syntax for IDs that contain a " character. I've now fixed this in emacs-28 by just removing the text properties from `id' instead. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 06 14:26:36 2021 Received: (at control) by debbugs.gnu.org; 6 Nov 2021 18:26:36 +0000 Received: from localhost ([127.0.0.1]:50571 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mjQOi-0004J0-9c for submit@debbugs.gnu.org; Sat, 06 Nov 2021 14:26:36 -0400 Received: from quimby.gnus.org ([95.216.78.240]:53770) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mjQOg-0004In-15 for control@debbugs.gnu.org; Sat, 06 Nov 2021 14:26:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=byuA2VPyNDt36dX4yWjHx1AEALTToQfj7wwJY/OOqzY=; b=PbU8gi1XMRvJ39199+Lya6uSEz yJUONlP9yj+Tn/Ma71qBitsQyiM1czF09YIzrAH2Y3opIq5vhTm3mlX4QFP7xd6Fa9Dyb94HhfewD rBp0JC2X0rfVNFNxl0viJhatJ/spxwKA6fAcxwHdrCG82QdCc5hTb6kc4Ah8uNCZVzNo=; Received: from [84.212.220.105] (helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mjQOY-0000TY-1A for control@debbugs.gnu.org; Sat, 06 Nov 2021 19:26:28 +0100 Date: Sat, 06 Nov 2021 19:26:25 +0100 Message-Id: <878ry1b0oe.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #49926 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: close 49926 28.1 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) close 49926 28.1 quit From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 06 15:14:26 2021 Received: (at submit) by debbugs.gnu.org; 6 Nov 2021 19:14:26 +0000 Received: from localhost ([127.0.0.1]:50731 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mjR90-0003y3-1j for submit@debbugs.gnu.org; Sat, 06 Nov 2021 15:14:26 -0400 Received: from lists.gnu.org ([209.51.188.17]:56726) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mjR8x-0003xv-Qt for submit@debbugs.gnu.org; Sat, 06 Nov 2021 15:14:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60352) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mjR8x-0005Qb-My for bug-gnu-emacs@gnu.org; Sat, 06 Nov 2021 15:14:23 -0400 Received: from ciao.gmane.io ([116.202.254.214]:45560) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mjR8v-0006th-Pv for bug-gnu-emacs@gnu.org; Sat, 06 Nov 2021 15:14:23 -0400 Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1mjR8s-00076z-Of for bug-gnu-emacs@gnu.org; Sat, 06 Nov 2021 20:14:18 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: bug-gnu-emacs@gnu.org From: Eric Abrahamsen Subject: Re: bug#49926: [PATCH] Fix NNIMAP search command in the gnus Date: Sat, 06 Nov 2021 12:14:12 -0700 Message-ID: <878ry13xmj.fsf@ericabrahamsen.net> References: <20210807045230.23998-1-jan@stranik.org> <87tuk097of.fsf@ericabrahamsen.net> <8735rjeqo5.fsf@stranik.org> <87eeb391qz.fsf@ericabrahamsen.net> <87ilx6aty0.fsf@gnus.org> <87mtmh49lq.fsf@ericabrahamsen.net> <87a6ihb0ou.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cancel-Lock: sha1:VhTwgwJCJXyYlx2G8ID0kcK4Ua0= Received-SPF: pass client-ip=116.202.254.214; envelope-from=geb-bug-gnu-emacs@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.249, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.1 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.1 (--) Lars Ingebrigtsen writes: > Eric Abrahamsen writes: > >> - "(OR HEADER REFERENCES %S HEADER Message-Id %S)" >> + "(OR HEADER REFERENCES \"%s\" HEADER Message-Id \"%s\")" >> id id))) > > This is not correct -- this would yield an incorrect syntax for IDs that > contain a " character. I've now fixed this in emacs-28 by just removing > the text properties from `id' instead. Sounds good. From unknown Mon Aug 18 09:00:55 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sun, 05 Dec 2021 12:24:07 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator