unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: David Bremner <david@tethera.net>
To: yoctocell <public@yoctocell.xyz>, notmuch@notmuchmail.org
Cc: David Edmondson <dme@dme.org>
Subject: Re: emacs-notmuch: notmuch-show-hook runs too early
Date: Fri, 08 Jan 2021 16:23:53 -0400	[thread overview]
Message-ID: <871rev89eu.fsf@tethera.net> (raw)
In-Reply-To: <875z4bvkjj.fsf@yoctocell.xyz>

yoctocell <public@yoctocell.xyz> writes:

> I am using a package called gnus-article-treat-patch[0] which colorizes
> patches in emails. It works expected when I manually call
> `ft/gnus-article-treat-patch' in a notmuch-show buffer, but it doesn't
> work when I add it as a hook.
>
> (add-hook 'notmuch-show-hook 'ft/gnus-article-treat-patch)
>
> `notmuch-show-hook' seems to be called too early so
> `ft/gnus-article-treat-patch' isn't able to read the contents of the
> message and apply any highlighting.
>
> I managed to get it to work with the following patch.

Can you have a look at

    https://nmbug.notmuchmail.org/nmweb/show/20210108184004.781702-3-dme%40dme.org

and see if that approach would work with you?

At first glance I am more in favour of adding a hook than changing the
semantics of an existing one.

d

  reply	other threads:[~2021-01-08 20:24 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-05  8:45 emacs-notmuch: notmuch-show-hook runs too early yoctocell
2021-01-08 20:23 ` David Bremner [this message]
2021-01-08 20:38   ` yoctocell
2021-01-08 20:41 ` David Edmondson
2021-01-08 20:58   ` yoctocell
  -- strict thread matches above, loose matches on Subject: below --
2020-12-29 14:59 yoctocell
2020-12-29 15:03 ` yoctocell
2020-12-29 14:58 yoctocell

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=871rev89eu.fsf@tethera.net \
    --to=david@tethera.net \
    --cc=dme@dme.org \
    --cc=notmuch@notmuchmail.org \
    --cc=public@yoctocell.xyz \
    /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).