From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Eric Abrahamsen Newsgroups: gmane.emacs.bugs Subject: bug#35443: 27.0.50; Gnus (nnimap) shows "ghost" messages in summary buffer Date: Thu, 11 Jul 2019 13:28:37 -0700 Message-ID: <87k1cotix6.fsf@ericabrahamsen.net> References: <87wojfjxry.fsf@ericabrahamsen.net> <87h8ajjhux.fsf@ericabrahamsen.net> <87lfztiqu3.fsf@ericabrahamsen.net> <871s1735ec.fsf@ericabrahamsen.net> <87ftpn75bv.fsf@ericabrahamsen.net> <87pnn5wbea.fsf@ericabrahamsen.net> <87a7dkv5cx.fsf@ericabrahamsen.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="243857"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) To: 35443@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Jul 11 22:31:27 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hlfiv-0011EU-Ln for geb-bug-gnu-emacs@m.gmane.org; Thu, 11 Jul 2019 22:31:25 +0200 Original-Received: from localhost ([::1]:45154 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hlfgg-00087N-ME for geb-bug-gnu-emacs@m.gmane.org; Thu, 11 Jul 2019 16:29:06 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33656) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hlfgd-00086z-BA for bug-gnu-emacs@gnu.org; Thu, 11 Jul 2019 16:29:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hlfgc-00072K-6c for bug-gnu-emacs@gnu.org; Thu, 11 Jul 2019 16:29:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:58194) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hlfgc-00072G-30 for bug-gnu-emacs@gnu.org; Thu, 11 Jul 2019 16:29:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hlfgb-00072Q-V0 for bug-gnu-emacs@gnu.org; Thu, 11 Jul 2019 16:29:01 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: Resent-From: Eric Abrahamsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 11 Jul 2019 20:29:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 35443 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.156287693427041 (code B ref -1); Thu, 11 Jul 2019 20:29:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 11 Jul 2019 20:28:54 +0000 Original-Received: from localhost ([127.0.0.1]:38782 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hlfgT-000724-Va for submit@debbugs.gnu.org; Thu, 11 Jul 2019 16:28:54 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:38356) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hlfgS-00071x-1B for submit@debbugs.gnu.org; Thu, 11 Jul 2019 16:28:52 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33564) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hlfgQ-0007IG-Qg for bug-gnu-emacs@gnu.org; Thu, 11 Jul 2019 16:28:51 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hlfgP-0006tX-OV for bug-gnu-emacs@gnu.org; Thu, 11 Jul 2019 16:28:50 -0400 Original-Received: from 195-159-176-226.customer.powertech.no ([195.159.176.226]:38430 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hlfgP-0006rp-Gn for bug-gnu-emacs@gnu.org; Thu, 11 Jul 2019 16:28:49 -0400 Original-Received: from list by blaine.gmane.org with local (Exim 4.89) (envelope-from ) id 1hlfgL-000xvK-8F for bug-gnu-emacs@gnu.org; Thu, 11 Jul 2019 22:28:45 +0200 X-Injected-Via-Gmane: http://gmane.org/ Cancel-Lock: sha1:XstAmgY8S4xviNOHzHHGs5/HN1I= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:162732 Archived-At: Eric Abrahamsen writes: > On 06/23/19 14:23 PM, Lars Ingebrigtsen wrote: >> Eric Abrahamsen writes: >> >>>> Did you get any further in fixing this nnimap parsing bug? >>> >>> Here's a whack at it. I tried to make sure that it would handle unwanted >>> FETCH responses whether they came before or after (or in the middle of) >>> the wanted FETCH responses, but I'm not in love with checking the header >>> regexp this way. >> >> Well, I think it's OK... >> >>> Because this IMAP server feature is very closely focused on adding a >>> flag in case of attachment (and because Gnus never explicitly requests >>> this flag, though I'd sure like to in the future), another more targeted >>> approach would be to simply delete any lines containing >>> $Has\(No\)?Attachment, assuming that these FETCH responses will only >>> take up one line. >> >> That sounds a bit brittle -- I'm sure there'll be other extensions like >> this in the future to the IMAP protocol. >> >>> I've configured my local Dovecot with the offending setting, and will >>> test it out for a bit. >> >> Great! > > (NB This patch is very broken and no one should use it; I'm still > working on it. I want a proper parser!) Turns out the dumb thing was simple: I was testing if the FETCH line was followed by mail headers by looking for: "\\(From\\|To\\|Subject\\|Date\\|Message-ID\\)" Which is obviously insufficient. I've since changed it to: "\\([A-Z][[:ascii:]-]+: \\)" Which works better, but also seems susceptible to breakage due to ignorance. A quick scan doesn't turn up any `mail-header-regexp' variables or `this-is-a-mail-header-p' functions -- does the above regexp seem reasonable?