user/dev discussion of public-inbox itself
 help / color / mirror / code / Atom feed
From: Alyssa Ross <>
Cc: Alyssa Ross <>,
	Amitai Schleier <>
Subject: [PATCH] hlmod: update for highlight 3.51 API change
Date: Tue, 24 Sep 2019 20:05:55 +0000	[thread overview]
Message-ID: <> (raw)

Quoting Amitai Schleier, who made this same change in ikiwiki[1],
where lots of the public-inbox highlight code comes from:

> As of 3.51, searchFile() is no longer provided in highlight's Perl
> bindings (at least on NetBSD and OS X, as built from pkgsrc). This
> leaves us falling through to getConfDir(), which has been gone
> rather longer.
> From highlight git, it appears searchFile() and getFiletypesConfPath()
> both originated in the 3.14 release. The latter is still available in
> 3.51, and returns the same result searchFile() used to. Switch to it.

So, this should still be compatible with the version of in
Debian, but add support for newer versions as well.

[1]: commit 4d06df9583e6c4145f8c6fc2fd51d7894c0b85ce

Cc: Amitai Schleier <>
 lib/PublicInbox/ | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/PublicInbox/ b/lib/PublicInbox/
index 36e3110..1d7a460 100644
--- a/lib/PublicInbox/
+++ b/lib/PublicInbox/
@@ -20,7 +20,7 @@ use PublicInbox::Hval qw(src_escape ascii_html);
 my $hl;

 sub _parse_filetypes ($) {
-	my $ft_conf = $_[0]->searchFile('filetypes.conf') or
+	my $ft_conf = $_[0]->getFiletypesConfPath('filetypes') or
 				die 'filetypes.conf not found by highlight';
 	open my $fh, '<', $ft_conf or die "failed to open($ft_conf): $!";
 	local $/;

             reply	other threads:[~2019-09-24 20:12 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-24 20:05 Alyssa Ross [this message]
2019-09-26  1:59 ` [PATCH] hlmod: update for highlight 3.51 API change Eric Wong
2019-09-26 13:18   ` Konstantin Ryabitsev
2019-09-26 15:07     ` Alyssa Ross
2019-10-08 21:53     ` [PATCH] TODO: add an item for Python pygments Eric Wong
2019-10-08 22:00       ` Konstantin Ryabitsev
2019-09-26 15:08   ` [PATCH] hlmod: update for highlight 3.51 API change Alyssa Ross

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:

  List information:

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

  git send-email \ \ \ \ \

* 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

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