unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* Removing notmuch-wash-excerpt-citations from hook breaks fontlocking
@ 2018-07-24 13:03 Sean Whitton
  2018-07-25  8:33 ` David Bremner
  0 siblings, 1 reply; 3+ messages in thread
From: Sean Whitton @ 2018-07-24 13:03 UTC (permalink / raw)
  To: notmuch, notmuch

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

Hello,

Steps to reproduce:

1. emacs -q

2. M-x load-library notmuch RET

3. M-x customize-variable notmuch-show-insert-text/plain-hook RET

4. Untick notmuch-wash-excerpt-citations

5. Open notmuch-show on a message

Expected result:

Quoted text is fontlocked, i.e. a different colour to body text.

Actual result:

Quoted text is not fontlocked.

Thanks.

-- 
Sean Whitton

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Removing notmuch-wash-excerpt-citations from hook breaks fontlocking
  2018-07-24 13:03 Removing notmuch-wash-excerpt-citations from hook breaks fontlocking Sean Whitton
@ 2018-07-25  8:33 ` David Bremner
  2018-07-26  3:42   ` Sean Whitton
  0 siblings, 1 reply; 3+ messages in thread
From: David Bremner @ 2018-07-25  8:33 UTC (permalink / raw)
  To: Sean Whitton, notmuch, notmuch

Sean Whitton <spwhitton@spwhitton.name> writes:

>
> 3. M-x customize-variable notmuch-show-insert-text/plain-hook RET
>
> 4. Untick notmuch-wash-excerpt-citations
>
> 5. Open notmuch-show on a message
>
> Expected result:
>
> Quoted text is fontlocked, i.e. a different colour to body text.
>
> Actual result:
>
> Quoted text is not fontlocked.

The issue is that the notmuch-wash-cited-text is applied in
notmuch-was-excerpt-citations. A simple solution would be to make
another wash function that did less (only did the overlay application)
and use that.

d

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Removing notmuch-wash-excerpt-citations from hook breaks fontlocking
  2018-07-25  8:33 ` David Bremner
@ 2018-07-26  3:42   ` Sean Whitton
  0 siblings, 0 replies; 3+ messages in thread
From: Sean Whitton @ 2018-07-26  3:42 UTC (permalink / raw)
  To: notmuch, notmuch

Hello,

On Wed 25 Jul 2018 at 04:33PM +0800, David Bremner wrote:

> The issue is that the notmuch-wash-cited-text is applied in
> notmuch-was-excerpt-citations. A simple solution would be to make
> another wash function that did less (only did the overlay application)
> and use that.

Thank you for your reply.

Here is how to get what I wanted when I ran into this bug:

  ;; don't collapse cited text
  ;; We ought to be able to just remove
  ;; `notmuch-wash-excerpt-citations' from
  ;; `notmuch-show-insert-text/plain-hook', but that function is also
  ;; responsible for colouring cited text (this is an upstream bug:
  ;; that function does the colouring for performance reasons but the
  ;; right answer is to use fontlocking, not overlays, for the colouring)
  (setq notmuch-wash-citation-lines-prefix 10000
        notmuch-wash-citation-lines-suffix 10000)

-- 
Sean Whitton

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-07-26  3:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-24 13:03 Removing notmuch-wash-excerpt-citations from hook breaks fontlocking Sean Whitton
2018-07-25  8:33 ` David Bremner
2018-07-26  3:42   ` Sean Whitton

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).