From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id AD2926DE1325 for ; Sun, 9 Oct 2016 08:47:41 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: -0.006 X-Spam-Level: X-Spam-Status: No, score=-0.006 tagged_above=-999 required=5 tests=[AWL=0.005, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 92eOz-QT3WkT for ; Sun, 9 Oct 2016 08:47:40 -0700 (PDT) Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197]) by arlo.cworth.org (Postfix) with ESMTPS id 0F8F86DE12EB for ; Sun, 9 Oct 2016 08:47:40 -0700 (PDT) Received: from remotemail by fethera.tethera.net with local (Exim 4.84_2) (envelope-from ) id 1btGJv-0006JR-GG; Sun, 09 Oct 2016 11:47:23 -0400 Received: (nullmailer pid 18639 invoked by uid 1000); Sun, 09 Oct 2016 15:47:35 -0000 From: David Bremner To: notmuch@notmuchmail.org Subject: Re: "id buttonization" test failure In-Reply-To: <87eg3r3tr0.fsf@zancas.localnet> References: <8737ka19iu.fsf@guixsd.i-did-not-set--mail-host-address--so-tickle-me> <8737k7lj9s.fsf@zancas.localnet> <87eg3r3tr0.fsf@zancas.localnet> Date: Sun, 09 Oct 2016 12:47:35 -0300 Message-ID: <87fuo5wmlk.fsf@zancas.localnet> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Oct 2016 15:47:41 -0000 --=-=-= Content-Type: text/plain David Bremner writes: > > > The following "fixes" this test failure. This suggests to me something > that only fails when notmuch-show-buttonise-links is called from the C > redisplay code, and not when it's called from lisp. The last paragraph of https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20146#47 made a lightbulb turn on over my head. I _think_ the problem is that that fontification expects to be called with the whole message, but jit lock really doesn't guarantee that. If you run the attached test with emacs25, you see the list of calls (in tmp.foo/MESSAGES) fontifying from 1 to 501 fontifying from 1 to 1 fontifying from 62 to 69 fontifying from 494 to 516 fontifying from 187 to 189 fontifying from 195 to 197 fontifying from 198 to 200 fontifying from 210 to 212 fontifying from 214 to 216 fontifying from 226 to 228 fontifying from 230 to 232 fontifying from 586 to 588 and lots more, but the point is many of them are not the whole messages, which would allow buttons to be created out of partial matches --=-=-= Content-Type: text/x-sh Content-Disposition: inline; filename=foo.sh #!/usr/bin/env bash test_description="emacs notmuch-show view" . ./test-lib.sh || exit 1 EXPECTED=$TEST_DIRECTORY/emacs-show.expected-output add_email_corpus test_begin_subtest "id buttonization" add_message '[body]=" id:abc id:abc.def. id:abc,def, id:abc;def; id:abc:def: id:foo@bar.?baz? id:foo@bar!.baz! (id:foo@bar.baz) [id:foo@bar.baz] id:foo@bar.baz... id:2+2=5 id:=_-:/.[]@$%+ id:abc)def id:ab\"c def id:\"abc\"def id:\"ab\"\"c\"def id:\"ab c\"def id:\"abc\".def id:\"abc \" id:) id: cid:xxx mid:abc mid:abc/def mid:abc%20def mid:abc. mid:abc, mid:abc;"' test_emacs '(notmuch-show "id:'$gen_msg_id'") (notmuch-test-mark-links) (test-visible-output "OUTPUT.raw") (with-current-buffer "*Messages*" (test-output "MESSAGES")) ' cat <EXPECTED Notmuch Test Suite (2001-01-05) (inbox) Subject: id buttonization To: Notmuch Test Suite Date: GENERATED_DATE <> <>. <>, <>; <>: <>? <>! (<>) [<>] <>... <> <> <>)def <> def <>def <>def <>def <>.def id:"abc " id:) id: cid:xxx <> <> <> <>. <>, <>; EOF notmuch_date_sanitize < OUTPUT.raw > OUTPUT test_expect_equal_file OUTPUT EXPECTED test_done --=-=-=--