Re: Problems with unicode characters under emacs and Xorg

2020-11-02 Thread David Edmondson
On Monday, 2020-11-02 at 04:26:27 -08, David Mazieres wrote:

> dm-list-email-notm...@scs.stanford.edu writes:
>
>> I just installed the ttf-symbola package from AUR and ran fc-cache (not
>> sure if necessary).  Now the problem is completely gone.  Not only that,
>> but I even get the little memo symbol instead of a box with the hex code
>> point number.
>>
>> Thank you so much!  This was driving me nuts for months.
>
> Sadly, I spoke too soon.  This does fix the particular problem that I
> posted, and makes the situation better, but I'm still getting occasional
> lockups, presumably because symbola does not cover every possible
> symbol.  For example, I had another email containing U+8BDD (CJK UNIFIED
> IDEOGRAPH-8BDD), and this one still caused my emacs to spin for many
> minutes, before displaying a box with 8BDD in it.

That one is from:

-isas-song ti-medium-r-normal--16-160-72-72-c-160-gb2312.1980-0

though I'm not sure which package provides that.

> So unfortunately the problem seems to be that any character not
> supported by an installed font takes about 2-5 minutes of CPU time to
> resolve.  And of course most characters that I'd use are in installed
> fonts, except that I can control what's in the emails I receive, so this
> makes notmuch very painful to use.  But if no one else is running into
> the problems, then I may be able to get around it by installing whatever
> fonts other people have installed.

I don't seem to have the root problem - that unknown characters cause a
delay. I get the hex-filled box immediately.

dme.
-- 
Maybe then I'll fade away and not have to face the facts.
___
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org


Re: Problems with unicode characters under emacs and Xorg

2020-11-02 Thread David Mazieres
dm-list-email-notm...@scs.stanford.edu writes:

> I just installed the ttf-symbola package from AUR and ran fc-cache (not
> sure if necessary).  Now the problem is completely gone.  Not only that,
> but I even get the little memo symbol instead of a box with the hex code
> point number.
>
> Thank you so much!  This was driving me nuts for months.

Sadly, I spoke too soon.  This does fix the particular problem that I
posted, and makes the situation better, but I'm still getting occasional
lockups, presumably because symbola does not cover every possible
symbol.  For example, I had another email containing U+8BDD (CJK UNIFIED
IDEOGRAPH-8BDD), and this one still caused my emacs to spin for many
minutes, before displaying a box with 8BDD in it.

So unfortunately the problem seems to be that any character not
supported by an installed font takes about 2-5 minutes of CPU time to
resolve.  And of course most characters that I'd use are in installed
fonts, except that I can control what's in the emails I receive, so this
makes notmuch very painful to use.  But if no one else is running into
the problems, then I may be able to get around it by installing whatever
fonts other people have installed.

Thanks,
David
___
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org


Re: Problems with unicode characters under emacs and Xorg

2020-11-02 Thread dm-list-email-notmuch
David Edmondson  writes:

> This works fine for me, and I get an appropriate character (not just the
> hex box).
>
> According to `describe-char' it's rendered using the Symbola font. Do
> you have that installed? (It's the "font-symbola" package on Debian I
> believe.)

I just installed the ttf-symbola package from AUR and ran fc-cache (not
sure if necessary).  Now the problem is completely gone.  Not only that,
but I even get the little memo symbol instead of a box with the hex code
point number.

Thank you so much!  This was driving me nuts for months.

David
___
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org


Re: Problems with unicode characters under emacs and Xorg

2020-11-02 Thread David Edmondson
On Monday, 2020-11-02 at 01:21:00 -08, dm-list-email-notm...@scs.stanford.edu 
wrote:

> David Edmondson  writes:
>
>> I haven't seen this. Threads with a lot of complex HTML content (lots of
>> nested tables, for example) can take a long time to render for me, but
>> that is generally interruptable.
>>
>> Could you share one of these messages, or a sufficiently similar test
>> case?
>
> Thanks for the reply.  I can send one of these emails to you privately
> if necessary, as it might contain semi-sensitive information.  However,
> I think all you need is the subject line.  For example:
>
> Subject: 
> =?UTF-8?B?RGF2aWQ6IEhvdy1UbyBIaXJlIHRoZSBCZXN0IFJlbW9kZWxpbmcgQ29udHJhY3RvciDwn5Od?=
>
> That subject line alone triggers the problem, because any search
> returning that thread triggers the problem.  When decoded, the subject
> line ends with unicode code point 0x1F4DD (MEMO).  Indeed, if I open up
> a fresh emacs, and, independent of notmuch, type "C-x 8 RET memo RET",
> it causes the emacs to hang for a minute or so.

This works fine for me, and I get an appropriate character (not just the
hex box).

According to `describe-char' it's rendered using the Symbola font. Do
you have that installed? (It's the "font-symbola" package on Debian I
believe.)

For some time I've had:

  (set-fontset-font t 'symbol "Symbola" nil 'prepend)

in ~/.emacs.el, but I just tested without and it doesn't seem to be
required.

> Arguably this is a limitation of emacs or fontconfig, or I've installed
> too many fonts on my system, or I've installed too few fonts (because
> after all that computation it just renders a box with hext digits 01F4DD
> in it instead of showing the MEMO icon).  However, the problem only
> happens with notmuch, because notmuch is the only emacs functionality I
> need that renders anything other than a very limited set of unicode
> characters.  So if there's any way either to workaround the problem, or
> to copy whatever other notmuch users are doing (is there some particular
> unicode font I should just install on my system?), I would be very
> happy.
>
> Thanks,
> David

dme.
-- 
I walk like a building, I never get wet.
___
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org


Re: Problems with unicode characters under emacs and Xorg

2020-11-02 Thread dm-list-email-notmuch
David Edmondson  writes:

> I haven't seen this. Threads with a lot of complex HTML content (lots of
> nested tables, for example) can take a long time to render for me, but
> that is generally interruptable.
>
> Could you share one of these messages, or a sufficiently similar test
> case?

Thanks for the reply.  I can send one of these emails to you privately
if necessary, as it might contain semi-sensitive information.  However,
I think all you need is the subject line.  For example:

Subject: 
=?UTF-8?B?RGF2aWQ6IEhvdy1UbyBIaXJlIHRoZSBCZXN0IFJlbW9kZWxpbmcgQ29udHJhY3RvciDwn5Od?=

That subject line alone triggers the problem, because any search
returning that thread triggers the problem.  When decoded, the subject
line ends with unicode code point 0x1F4DD (MEMO).  Indeed, if I open up
a fresh emacs, and, independent of notmuch, type "C-x 8 RET memo RET",
it causes the emacs to hang for a minute or so.

Arguably this is a limitation of emacs or fontconfig, or I've installed
too many fonts on my system, or I've installed too few fonts (because
after all that computation it just renders a box with hext digits 01F4DD
in it instead of showing the MEMO icon).  However, the problem only
happens with notmuch, because notmuch is the only emacs functionality I
need that renders anything other than a very limited set of unicode
characters.  So if there's any way either to workaround the problem, or
to copy whatever other notmuch users are doing (is there some particular
unicode font I should just install on my system?), I would be very
happy.

Thanks,
David
___
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org


Re: Problems with unicode characters under emacs and Xorg

2020-11-02 Thread David Edmondson
On Sunday, 2020-11-01 at 22:57:58 -08, David Mazieres wrote:

> I usually use notmuch in emacs under X windows on arch linux.  Recently,
> I've had a problem where some screens in notmuch take several minutes of
> 100% CPU time to load.  For example, I'll just open a search, and emacs
> will completely lock up (even Ctrl-G doesn't do anything) for 3 minutes
> while my fan spins and my laptop battery drains significantly.
>
> This appears to be related to the display of certain unicode characters
> in email--particularly if they are in the email subject, because then
> the whole search screen will freeze.  So far, the only workaround I've
> found is to kill -15 emacs, start it again in an xterm or urxvt with
> "emacs -nw", delete or archive the offending message, and then restart
> the Xorg emacs.  This is quite painful particularly since it's not
> always obvious which email message is causing the problem.
>
> Has anyone else experienced this problem?  Is there any way to
> workaround the problem by, for instance, defaulting to unibyte mode for
> notmuch buffers?  I do use unicode for other languages, but I guess
> wouldn't mind having to type "M-x toggle-enable-multibyte-characters" to
> get them if as a result my emacs never locked up.
>
> It's likely that this is an emacs-wide problem, but since whatever these
> characters are only show up in email, I'm hoping there are people on
> this list who know how to solve the problem or have better workarounds.

I haven't seen this. Threads with a lot of complex HTML content (lots of
nested tables, for example) can take a long time to render for me, but
that is generally interruptable.

Could you share one of these messages, or a sufficiently similar test
case?

dme.
-- 
Driving at 90 down those country lanes, singing to "Tiny Dancer".
___
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org