unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: David Bremner <david@tethera.net>
To: notmuch@notmuchmail.org
Subject: Re: "id buttonization" test failure
Date: Sun, 09 Oct 2016 12:47:35 -0300	[thread overview]
Message-ID: <87fuo5wmlk.fsf@zancas.localnet> (raw)
In-Reply-To: <87eg3r3tr0.fsf@zancas.localnet>

[-- Attachment #1: Type: text/plain, Size: 1057 bytes --]

David Bremner <david@tethera.net> 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




[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: foo.sh --]
[-- Type: text/x-sh, Size: 1455 bytes --]

#!/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 <<EOF >EXPECTED
Notmuch Test Suite <test_suite@notmuchmail.org> (2001-01-05) (inbox)
Subject: id buttonization
To: Notmuch Test Suite <test_suite@notmuchmail.org>
Date: GENERATED_DATE

<<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>>;
EOF
notmuch_date_sanitize < OUTPUT.raw > OUTPUT
test_expect_equal_file OUTPUT EXPECTED

test_done

  reply	other threads:[~2016-10-09 15:47 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-06  2:44 "id buttonization" test failure Marius Bakke
2016-10-06 13:08 ` David Bremner
2016-10-08  1:30 ` David Bremner
2016-10-08 12:33   ` David Bremner
2016-10-09 15:47     ` David Bremner [this message]
2016-10-09 22:30       ` [PATCH] emacs/show: force notmuch-show-buttonise-links to act on lines David Bremner
2016-10-10 18:30         ` Tomi Ollila
2016-10-11 11:25           ` David Bremner
2016-10-12  1:49         ` David Bremner
2016-10-12  2:05       ` "id buttonization" test failure David Bremner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87fuo5wmlk.fsf@zancas.localnet \
    --to=david@tethera.net \
    --cc=notmuch@notmuchmail.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).