From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.help Subject: Re: Help with debugging error from jit-lock-fontify-now Date: Wed, 15 Apr 2020 00:27:00 -0400 Message-ID: References: <874ktltqom.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="43023"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) To: help-gnu-emacs@gnu.org Cancel-Lock: sha1:/E79LQvbPpvugwSpqqwC4eLrIIw= Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Wed Apr 15 06:27:31 2020 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jOZe7-000B6q-Iq for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 15 Apr 2020 06:27:31 +0200 Original-Received: from localhost ([::1]:42708 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jOZe6-00071M-Kq for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 15 Apr 2020 00:27:30 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53086) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jOZdn-00070w-7F for help-gnu-emacs@gnu.org; Wed, 15 Apr 2020 00:27:13 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jOZdl-0003mK-3Q for help-gnu-emacs@gnu.org; Wed, 15 Apr 2020 00:27:11 -0400 Original-Received: from ciao.gmane.io ([159.69.161.202]:52502) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jOZdk-0003lY-Pn for help-gnu-emacs@gnu.org; Wed, 15 Apr 2020 00:27:09 -0400 Original-Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1jOZdj-000Ajh-UU for help-gnu-emacs@gnu.org; Wed, 15 Apr 2020 06:27:07 +0200 X-Injected-Via-Gmane: http://gmane.org/ X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 159.69.161.202 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:122820 Archived-At: > Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p nil) > jit-lock--run-functions(1 10813) > jit-lock-fontify-now() > hfy-force-fontification() Seems like a bug in `hfy-force-fontification` (it uses `jit-lock-fontify-now` without checking if `jit-lock` is activated in the buffer). I just installed the patch below in Emacs's `master`, can you confirm that it fixes the problem for you? Stefan diff --git a/lisp/htmlfontify.el b/lisp/htmlfontify.el index 1d98b633d7..7a5d88ce83 100644 --- a/lisp/htmlfontify.el +++ b/lisp/htmlfontify.el @@ -136,8 +136,8 @@ htmlfontify-manual \"s section[eg- emacs / p4-blame]:\\nD source-dir: \\nD output-dir: \") (require \\='htmlfontify) (hfy-load-tags-cache srcdir) - (let ((hfy-page-header \\='rtfm-build-page-header) - (hfy-page-footer \\='rtfm-build-page-footer) + (let ((hfy-page-header #\\='rtfm-build-page-header) + (hfy-page-footer #\\='rtfm-build-page-footer) (rtfm-section section) (hfy-index-file \"index\")) (htmlfontify-run-etags srcdir) @@ -151,7 +151,7 @@ htmlfontify :link '(info-link "(htmlfontify) Customization") :prefix "hfy-") -(defcustom hfy-page-header 'hfy-default-header +(defcustom hfy-page-header #'hfy-default-header "Function called to build the header of the HTML source. This is called with two arguments (the filename relative to the top level source directory being etag'd and fontified), and a string containing @@ -159,7 +159,6 @@ hfy-page-header It should return a string that will be used as the header for the htmlfontified version of the source file.\n See also `hfy-page-footer'." - :group 'htmlfontify ;; FIXME: Why place such a :tag everywhere? Isn't it imposing your ;; own Custom preference on your users? --Stef :tag "page-header" @@ -170,32 +169,27 @@ hfy-split-index If non-nil, the index is split on the first letter of each tag. Useful when the index would otherwise be large and take a long time to render or be difficult to navigate." - :group 'htmlfontify :tag "split-index" :type '(boolean)) -(defcustom hfy-page-footer 'hfy-default-footer +(defcustom hfy-page-footer #'hfy-default-footer "As `hfy-page-header', but generates the output footer. It takes only one argument, the filename." - :group 'htmlfontify :tag "page-footer" :type '(function)) (defcustom hfy-extn ".html" "File extension used for output files." - :group 'htmlfontify :tag "extension" :type '(string)) (defcustom hfy-src-doc-link-style "text-decoration: underline;" "String to add to the `