Received: (at 68217) by debbugs.gnu.org; 2 Jan 2024 22:11:53 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jan 02 17:11:53 2024 Received: from localhost ([127.0.0.1]:51497 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1rKmzI-0006j8-Nw for submit <at> debbugs.gnu.org; Tue, 02 Jan 2024 17:11:53 -0500 Received: from mail-lj1-x22b.google.com ([2a00:1450:4864:20::22b]:56464) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <joaotavora@HIDDEN>) id 1rKmzG-0006ip-7h for 68217 <at> debbugs.gnu.org; Tue, 02 Jan 2024 17:11:51 -0500 Received: by mail-lj1-x22b.google.com with SMTP id 38308e7fff4ca-2cd0c17e42bso13567601fa.0 for <68217 <at> debbugs.gnu.org>; Tue, 02 Jan 2024 14:11:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1704233501; x=1704838301; darn=debbugs.gnu.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=AAD9jeHiT+yxzTr9DdPx3JezkAahObKi+wDjqAkx1RY=; b=kTOFiwO9LeTpw9R9KkN/wc9GExYFv6nmLxTpujU/LH3smJ+jLdT5rIXzG7aoobLfEo 6KueCf3t4ksQUjCrv8Fo3DnwQ+OZP0iwCvPw2zvNlObNRFlkEksclS9WcSeuDLreH0tJ ThKyRMbkcFqSm4v7C2laxw4FNb75vGLjTop5MjJQOLi1weu0xjcT9Q2ycyqFqMW6aptg wLZSCKZGCdkXDFqz+WcO5v1ROJDa84jFlXZtjMq6j7O3d/iGarC89LJ3KMlKWNlKtSJp g/AxNIVDmIbPY10lMhlGhzwR0SPkB8e7QcaH0zoPbSUCPAu8JUWYxReNgfaeX9w4P1yI iyQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704233501; x=1704838301; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=AAD9jeHiT+yxzTr9DdPx3JezkAahObKi+wDjqAkx1RY=; b=TN1brNXp+Bo3eei6tgCm4IOT1wytrPcXX4zaF8NaK8hSsL4gmR2eLLjI52LJba5TnO rWdXVmY9/F81mb9pBTeTa+qIKI11bKn3YQ0+GUAtopT33QxNAYBzULQ4aIuZzqGoEEvC D0YF3018mRslySNt2XuoSdQfvlO8ejg2FRfDhNuHaJwJMNa3A9kQeBit7cwp3XH3jerO FW8yVjwVZk8TFHvx4DY3xzpWqUwRUnZ3Ow8ajrakYXfiBD13QKjIP9cN/Q0+P4TyjtIO exJ3hyTcDz8kLHR9ZVRL3vsTatvQEJmP+p0AEbp1wrlq0ZJeJprtefkuHZ/V/IZUmgx/ Q8Vw== X-Gm-Message-State: AOJu0YzBp/VmQH1qtq27OdS7c5pWsSbirSgDFDc1KIFjajNrKUtHFRV+ LzNx5h+O+uydbniU+y0CVZtBp6oa76apWipgzGM= X-Google-Smtp-Source: AGHT+IHOaFGsGuLMMXn0h6qQAybJTSLj6XQ1M1YdP1h90/8JGaSzzSSb8EUV2LoLNysgefzj0nsvzOabCKKerkWmXUI= X-Received: by 2002:a2e:870e:0:b0:2cc:5cf8:13d with SMTP id m14-20020a2e870e000000b002cc5cf8013dmr9441703lji.102.1704233500767; Tue, 02 Jan 2024 14:11:40 -0800 (PST) MIME-Version: 1.0 References: <CAFChFygDVPR=HkysX_oEGrApb6nHrGDt7xNbzP0wgPer7ygguQ@HIDDEN> In-Reply-To: <CAFChFygDVPR=HkysX_oEGrApb6nHrGDt7xNbzP0wgPer7ygguQ@HIDDEN> From: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= <joaotavora@HIDDEN> Date: Tue, 2 Jan 2024 22:11:29 +0000 Message-ID: <CALDnm52QkHT5N9jF67y2Qd4N3shRw02conTueKZx9VP-nmhDog@HIDDEN> Subject: Re: bug#68217: 30.0.50; Fix for eglot--format-markup to handle bad markdown To: Gary Oberbrunner <garyo@HIDDEN>, Yuan Fu <casouri@HIDDEN> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 68217 Cc: jblevins@HIDDEN, 68217 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) On Tue, Jan 2, 2024 at 6:29=E2=80=AFPM Gary Oberbrunner <garyo@oberbrunner.= com> wrote: > The markup arg passed to eglot--format-markup is: > > (:kind "markdown" :value "```python\n(class) openfx\n```") > > I'm using pyright-langserver as the LSP server; I expect it is > returning malformed markup or something that eglot doesn't expect. Just for a bit of context to readers, markdown-mode at least in certain situations, uses Emacs major modes to achieve syntactic fontification of markdown code blocks. Here, I don't think it's malformed markdown per se, it's that between the markdown code block that the server says is Python there seems to be some odd Python snippet: (class) fx So yes, the server is returning something fishy, but the way we react right now isn't reasonable. For me, it seems likely that python-mode when invoked by markdown-mode didn't care about this and fontified away (when triggered with font-lock-ensure), but python-ts-mode doesn't and signals this error. It could be caused by markdown-mode defaulting to the (new?) TS mode when fontifying such markup. Why is it defaulting like that? Maybe it's just doing what Emacs would do if the user visited a Python file? I think markdown-mode choosing the same mode that Emacs would choose for interactive operation is correct. But I'd first like to confirm it isn't doing this arbitrarily: in the recent past, I've seen markdown-mode load up cc-mode when I'm not using the TS mode by default. Jason, can you confirm what the intended behaviour is? Also, I think python-ts-mode is also correct to signal the error when finding this odd form, at least when the fontification routines are invoked non-interactively. Yuan, can you confirm what the intended behaviour is? > I note that the following patch appears to fix it for me: > > modified eglot.el > @@ -1813,7 +1813,9 @@ Doubles as an indicator of snippet support." > (message-log-max nil) > match) > (ignore-errors (delay-mode-hooks (funcall mode))) > - (font-lock-ensure) > + (condition-case-unless-debug oops > + (font-lock-ensure) > + (error (eglot--warn (error-message-string oops)))) > (goto-char (point-min)) > (let ((inhibit-read-only t)) > (when (fboundp 'text-property-search-forward) ;; FIXME: use co= mpat Finally there is this muffling of the error unless debug-on-error is true. I think this is the right thing to do, at least right now. In an alternate universe with a restart system, it would probably be more elegantly solved, but that's what we have now. Jo=C3=A3o
bug-gnu-emacs@HIDDEN
:bug#68217
; Package emacs
.
Full text available.Received: (at submit) by debbugs.gnu.org; 2 Jan 2024 18:28:54 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jan 02 13:28:54 2024 Received: from localhost ([127.0.0.1]:51265 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1rKjVU-0003qB-D8 for submit <at> debbugs.gnu.org; Tue, 02 Jan 2024 13:28:54 -0500 Received: from lists.gnu.org ([2001:470:142::17]:57322) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <garyo@HIDDEN>) id 1rKjVO-0003pu-Td for submit <at> debbugs.gnu.org; Tue, 02 Jan 2024 13:28:50 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <garyo@HIDDEN>) id 1rKjVG-0005UL-Nv for bug-gnu-emacs@HIDDEN; Tue, 02 Jan 2024 13:28:38 -0500 Received: from mail-io1-xd2f.google.com ([2607:f8b0:4864:20::d2f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <garyo@HIDDEN>) id 1rKjVC-0003TK-Lt for bug-gnu-emacs@HIDDEN; Tue, 02 Jan 2024 13:28:38 -0500 Received: by mail-io1-xd2f.google.com with SMTP id ca18e2360f4ac-7bb0ab8e79fso306599739f.1 for <bug-gnu-emacs@HIDDEN>; Tue, 02 Jan 2024 10:28:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oberbrunner.com; s=google; t=1704220111; x=1704824911; darn=gnu.org; h=cc:to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=Jel7JfyCuzeWbfzakMSzq+pFsKb7BX91/GQBS5yxa9k=; b=frIhzPSnJkLE1MwaDqCQR9DQDrbchoFbXwth0UBDAvRW4o8LB7rf4ivrbiI+TuI/92 n25XyiUGKaG4ZEVJxpccPdSVQcV5Ks7QKYfVW8XGrIM5KRrqstl2jtVqNsP7t4u7vD3G lqWy2lJHsSgqC1yVguD67fM1bQGCx1x8CD6TJUu2ppHYKhsOAHs7VIXl9+3hw55giO0/ cMBoDHeRpHNOIsGtYeFQ9PNSDfMcnHq3KZ+x3EyXV670O7ELfbyIgxGeO6sBHXVxk2DC P+n7qzHUrAb+v2f67ov1foI9FCdJM0bcTqwyA+mYALR1T5mzxPjvTrs2D4sJSyTg84/V vD9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704220111; x=1704824911; h=cc:to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=Jel7JfyCuzeWbfzakMSzq+pFsKb7BX91/GQBS5yxa9k=; b=n6DRttuGJBcnQTQzfZ0nepIjHwTOpEkr9rRm1DBrk/FQ9C6jFOZz0IWDfQFOi+xCxj 4Wu2sN03D9rKzcctbxmNKHlQy4P/QcNTJ0TIOoTSkT7su+sw5MZReKR5twcDcTNOKnyz Ym+pdYiszs96Va0db3R5c6CYC746oGwbRzrwQz6/hqdNeI8Ii21DUVxS13HI32Nb53AK TTPqwLJdqcPK8+5iLazhyD+eujLymW39Gun5+quDfKUB4tCseX78uUXtN2vvOFhiNDrR x1kyF0X7oP9L738vy3ninMfv0ZBTXW+fE4X6JhyPSFsirZRhr26rW0cqDLGvHeWCX5br BSFA== X-Gm-Message-State: AOJu0YzQjTzwURnBiQzPbyZvJtzzfSfHg8MZDRl7LL2U/2ERetNJ4d2I F/GMjYOFC2UljfgM7jcKCH/Uo0d44vRK45zBkTnnkhD0ozOk0Nvsdprf6lGnqz4= X-Google-Smtp-Source: AGHT+IEj+k4wHiLHiztyep/nWrjf7/CbQ2XxGt4EFmanSpXWFVcYvVGmTsND/ihlyzqyXuuB8NLYnE3qqLdef9fhl3g= X-Received: by 2002:a5d:8555:0:b0:7bb:5c57:419d with SMTP id b21-20020a5d8555000000b007bb5c57419dmr9859074ios.25.1704220110724; Tue, 02 Jan 2024 10:28:30 -0800 (PST) MIME-Version: 1.0 From: Gary Oberbrunner <garyo@HIDDEN> Date: Tue, 2 Jan 2024 13:28:16 -0500 Message-ID: <CAFChFygDVPR=HkysX_oEGrApb6nHrGDt7xNbzP0wgPer7ygguQ@HIDDEN> Subject: 30.0.50; Fix for eglot--format-markup to handle bad markdown To: bug-gnu-emacs@HIDDEN Content-Type: multipart/alternative; boundary="00000000000051e0ea060dfaaa50" Received-SPF: pass client-ip=2607:f8b0:4864:20::d2f; envelope-from=garyo@HIDDEN; helo=mail-io1-xd2f.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: submit Cc: jblevins@HIDDEN, =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= <joaotavora@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -0.0 (/) --00000000000051e0ea060dfaaa50 Content-Type: text/plain; charset="UTF-8" With most recent eglot and emacs (as of a couple of days ago) I'm getting an error in my python-mode buffers. While eglot is trying to show hover info, it gets a treesit error. I'm using eldoc and treesit a bunch of other stuff so I'm not sure where the real bug is. But basically it looks like treesit is trying to fontify a temp python-mode buffer that just contains (class) openfx and getting an error. Markdown mode is involved too (see the stack trace). I think the simplest solution is to ignore errors while fontifying the temp buffer, and I believe joaotavora agrees. The markup arg passed to eglot--format-markup is: (:kind "markdown" :value "```python\n(class) openfx\n```") I'm using pyright-langserver as the LSP server; I expect it is returning malformed markup or something that eglot doesn't expect. I note that the following patch appears to fix it for me: modified eglot.el @@ -1813,7 +1813,9 @@ Doubles as an indicator of snippet support." (message-log-max nil) match) (ignore-errors (delay-mode-hooks (funcall mode))) - (font-lock-ensure) + (condition-case-unless-debug oops + (font-lock-ensure) + (error (eglot--warn (error-message-string oops)))) (goto-char (point-min)) (let ((inhibit-read-only t)) (when (fboundp 'text-property-search-forward) ;; FIXME: use compat See https://github.com/joaotavora/eglot/discussions/1345 for more details. The stack trace looks like this: Debugger entered--Lisp error: (treesit-query-error "Node type error at" 271 "[\"as\" \"assert\" \"async\" \"await\" \"break\" \"case\" \"class\" \"continue\" \"def\" \"del\" \"elif\" \"else\" \"except\" \"exec\" \"finally\" \"for\" \"from\" \"global\" \"if\" \"import\" \"lambda\" \"match\" \"nonlocal\" \"pass\" \"print\" \"raise\" \"return\" \"try\" \"while\" \"with\" \"yield\" \"and\" \"in\" \"is\" \"not\" \"or\" \"not in\"] @font-lock-keyword-face ((identifier) @font-lock-keyword-face (#match \"\\\\`self\\\\'\" @font-lock-keyword-face))" "Debug the query with `treesit-query-validate'") treesit--font-lock-fontify-region-1(#<treesit-node module in 1-17> #<treesit-compiled-query> 1 17 nil nil) treesit-font-lock-fontify-region(1 17 nil) font-lock-fontify-syntactically-region(1 17 nil) font-lock-default-fontify-region(1 17 nil) font-lock-fontify-region(1 17) #f(compiled-function (beg end) #<bytecode -0x147d5368d5be984b>)(1 17) font-lock-ensure() (save-current-buffer (set-buffer (get-buffer-create (concat " markdown-code-fontification:" (symbol-name lang-mode)))) (let ((inhibit-modification-hooks nil)) (delete-region (point-min) (point-max)) (insert string " ")) (if (eq major-mode lang-mode) nil (funcall lang-mode)) (font-lock-ensure) (setq pos (point-min)) (while (setq next (next-single-property-change pos 'face)) (let ((val (get-text-property pos 'face))) (if val (progn (put-text-property (+ start (1- pos)) (1- (+ start next)) 'face val markdown-buffer)))) (setq pos next))) (let ((string (buffer-substring-no-properties start end)) (modified (buffer-modified-p)) (markdown-buffer (current-buffer)) pos next) (remove-text-properties start end '(face nil)) (save-current-buffer (set-buffer (get-buffer-create (concat " markdown-code-fontification:" (symbol-name lang-mode)))) (let ((inhibit-modification-hooks nil)) (delete-region (point-min) (point-max)) (insert string " ")) (if (eq major-mode lang-mode) nil (funcall lang-mode)) (font-lock-ensure) (setq pos (point-min)) (while (setq next (next-single-property-change pos 'face)) (let ((val (get-text-property pos 'face))) (if val (progn (put-text-property (+ start ...) (1- ...) 'face val markdown-buffer)))) (setq pos next))) (add-text-properties start end '(font-lock-fontified t fontified t font-lock-multiline t)) (set-buffer-modified-p modified)) (progn (let ((string (buffer-substring-no-properties start end)) (modified (buffer-modified-p)) (markdown-buffer (current-buffer)) pos next) (remove-text-properties start end '(face nil)) (save-current-buffer (set-buffer (get-buffer-create (concat " markdown-code-fontification:" (symbol-name lang-mode)))) (let ((inhibit-modification-hooks nil)) (delete-region (point-min) (point-max)) (insert string " ")) (if (eq major-mode lang-mode) nil (funcall lang-mode)) (font-lock-ensure) (setq pos (point-min)) (while (setq next (next-single-property-change pos 'face)) (let ((val (get-text-property pos ...))) (if val (progn (put-text-property ... ... ... val markdown-buffer)))) (setq pos next))) (add-text-properties start end '(font-lock-fontified t fontified t font-lock-multiline t)) (set-buffer-modified-p modified))) (if (fboundp lang-mode) (progn (let ((string (buffer-substring-no-properties start end)) (modified (buffer-modified-p)) (markdown-buffer (current-buffer)) pos next) (remove-text-properties start end '(face nil)) (save-current-buffer (set-buffer (get-buffer-create (concat " markdown-code-fontification:" (symbol-name lang-mode)))) (let ((inhibit-modification-hooks nil)) (delete-region (point-min) (point-max)) (insert string " ")) (if (eq major-mode lang-mode) nil (funcall lang-mode)) (font-lock-ensure) (setq pos (point-min)) (while (setq next (next-single-property-change pos 'face)) (let ((val ...)) (if val (progn ...))) (setq pos next))) (add-text-properties start end '(font-lock-fontified t fontified t font-lock-multiline t)) (set-buffer-modified-p modified)))) (let ((lang-mode (if lang (markdown-get-lang-mode lang) markdown-fontify-code-block-default-mode))) (if (fboundp lang-mode) (progn (let ((string (buffer-substring-no-properties start end)) (modified (buffer-modified-p)) (markdown-buffer (current-buffer)) pos next) (remove-text-properties start end '(face nil)) (save-current-buffer (set-buffer (get-buffer-create (concat " markdown-code-fontification:" ...))) (let ((inhibit-modification-hooks nil)) (delete-region (point-min) (point-max)) (insert string " ")) (if (eq major-mode lang-mode) nil (funcall lang-mode)) (font-lock-ensure) (setq pos (point-min)) (while (setq next (next-single-property-change pos ...)) (let (...) (if val ...)) (setq pos next))) (add-text-properties start end '(font-lock-fontified t fontified t font-lock-multiline t)) (set-buffer-modified-p modified))))) markdown-fontify-code-block-natively("python" 11 26) (if (and markdown-fontify-code-blocks-natively (or (setq lang (markdown-code-block-lang)) markdown-fontify-code-block-default-mode)) (markdown-fontify-code-block-natively lang start end) (add-text-properties start end '(face markdown-pre-face))) (let* ((start (match-beginning 0)) (end (match-end 0)) (bol-prev (progn (goto-char start) (if (bolp) (line-beginning-position 0) (line-beginning-position)))) (eol-next (progn (goto-char end) (if (bolp) (line-beginning-position 2) (line-beginning-position 3)))) lang) (if (and markdown-fontify-code-blocks-natively (or (setq lang (markdown-code-block-lang)) markdown-fontify-code-block-default-mode)) (markdown-fontify-code-block-natively lang start end) (add-text-properties start end '(face markdown-pre-face))) (font-lock-append-text-property bol-prev eol-next 'face 'markdown-code-face) (add-text-properties bol-prev start '(invisible markdown-markup)) (add-text-properties end eol-next '(invisible markdown-markup))) (progn (let* ((start (match-beginning 0)) (end (match-end 0)) (bol-prev (progn (goto-char start) (if (bolp) (line-beginning-position 0) (line-beginning-position)))) (eol-next (progn (goto-char end) (if (bolp) (line-beginning-position 2) (line-beginning-position 3)))) lang) (if (and markdown-fontify-code-blocks-natively (or (setq lang (markdown-code-block-lang)) markdown-fontify-code-block-default-mode)) (markdown-fontify-code-block-natively lang start end) (add-text-properties start end '(face markdown-pre-face))) (font-lock-append-text-property bol-prev eol-next 'face 'markdown-code-face) (add-text-properties bol-prev start '(invisible markdown-markup)) (add-text-properties end eol-next '(invisible markdown-markup)))) (unwind-protect (progn (let* ((start (match-beginning 0)) (end (match-end 0)) (bol-prev (progn (goto-char start) (if (bolp) (line-beginning-position 0) (line-beginning-position)))) (eol-next (progn (goto-char end) (if (bolp) (line-beginning-position 2) (line-beginning-position 3)))) lang) (if (and markdown-fontify-code-blocks-natively (or (setq lang (markdown-code-block-lang)) markdown-fontify-code-block-default-mode)) (markdown-fontify-code-block-natively lang start end) (add-text-properties start end '(face markdown-pre-face))) (font-lock-append-text-property bol-prev eol-next 'face 'markdown-code-face) (add-text-properties bol-prev start '(invisible markdown-markup)) (add-text-properties end eol-next '(invisible markdown-markup)))) (set-match-data saved-match-data t)) (let ((saved-match-data (match-data))) (unwind-protect (progn (let* ((start (match-beginning 0)) (end (match-end 0)) (bol-prev (progn (goto-char start) (if ... ... ...))) (eol-next (progn (goto-char end) (if ... ... ...))) lang) (if (and markdown-fontify-code-blocks-natively (or (setq lang ...) markdown-fontify-code-block-default-mode)) (markdown-fontify-code-block-natively lang start end) (add-text-properties start end '(face markdown-pre-face))) (font-lock-append-text-property bol-prev eol-next 'face 'markdown-code-face) (add-text-properties bol-prev start '(invisible markdown-markup)) (add-text-properties end eol-next '(invisible markdown-markup)))) (set-match-data saved-match-data t))) (save-excursion (let ((saved-match-data (match-data))) (unwind-protect (progn (let* ((start (match-beginning 0)) (end (match-end 0)) (bol-prev (progn ... ...)) (eol-next (progn ... ...)) lang) (if (and markdown-fontify-code-blocks-natively (or ... markdown-fontify-code-block-default-mode)) (markdown-fontify-code-block-natively lang start end) (add-text-properties start end '...)) (font-lock-append-text-property bol-prev eol-next 'face 'markdown-code-face) (add-text-properties bol-prev start '(invisible markdown-markup)) (add-text-properties end eol-next '(invisible markdown-markup)))) (set-match-data saved-match-data t)))) (progn (save-excursion (let ((saved-match-data (match-data))) (unwind-protect (progn (let* ((start ...) (end ...) (bol-prev ...) (eol-next ...) lang) (if (and markdown-fontify-code-blocks-natively ...) (markdown-fontify-code-block-natively lang start end) (add-text-properties start end ...)) (font-lock-append-text-property bol-prev eol-next 'face 'markdown-code-face) (add-text-properties bol-prev start '...) (add-text-properties end eol-next '...))) (set-match-data saved-match-data t)))) t) (if (funcall matcher last) (progn (save-excursion (let ((saved-match-data (match-data))) (unwind-protect (progn (let* (... ... ... ... lang) (if ... ... ...) (font-lock-append-text-property bol-prev eol-next ... ...) (add-text-properties bol-prev start ...) (add-text-properties end eol-next ...))) (set-match-data saved-match-data t)))) t)) markdown-fontify-code-blocks-generic(markdown-match-gfm-code-blocks 29) markdown-fontify-gfm-code-blocks(29) font-lock-fontify-keywords-region(1 29 nil) font-lock-default-fontify-region(1 29 nil) font-lock-fontify-region(1 29) #f(compiled-function (beg end) #<bytecode -0x147d5368d5be984b>)(1 29) font-lock-ensure() (let ((inhibit-message t) (message-log-max nil) match) (condition-case nil (progn (progn (make-local-variable 'delay-mode-hooks) (let ((delay-mode-hooks t)) (funcall mode)))) (error nil)) (font-lock-ensure) (goto-char (point-min)) (let ((inhibit-read-only t)) (if (fboundp 'text-property-search-forward) (progn (while (setq match (text-property-search-forward 'invisible)) (delete-region (let* (...) (progn ... ...)) (let* (...) (progn ... ...))))))) (string-trim (buffer-string))) (progn (set (make-local-variable 'markdown-fontify-code-blocks-natively) t) (insert string) (let ((inhibit-message t) (message-log-max nil) match) (condition-case nil (progn (progn (make-local-variable 'delay-mode-hooks) (let ((delay-mode-hooks t)) (funcall mode)))) (error nil)) (font-lock-ensure) (goto-char (point-min)) (let ((inhibit-read-only t)) (if (fboundp 'text-property-search-forward) (progn (while (setq match (text-property-search-forward ...)) (delete-region (let* ... ...) (let* ... ...)))))) (string-trim (buffer-string)))) (unwind-protect (progn (set (make-local-variable 'markdown-fontify-code-blocks-natively) t) (insert string) (let ((inhibit-message t) (message-log-max nil) match) (condition-case nil (progn (progn (make-local-variable 'delay-mode-hooks) (let (...) (funcall mode)))) (error nil)) (font-lock-ensure) (goto-char (point-min)) (let ((inhibit-read-only t)) (if (fboundp 'text-property-search-forward) (progn (while (setq match ...) (delete-region ... ...))))) (string-trim (buffer-string)))) (and (buffer-name temp-buffer) (kill-buffer temp-buffer))) (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (set (make-local-variable 'markdown-fontify-code-blocks-natively) t) (insert string) (let ((inhibit-message t) (message-log-max nil) match) (condition-case nil (progn (progn (make-local-variable ...) (let ... ...))) (error nil)) (font-lock-ensure) (goto-char (point-min)) (let ((inhibit-read-only t)) (if (fboundp 'text-property-search-forward) (progn (while ... ...)))) (string-trim (buffer-string)))) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))) (let ((temp-buffer (generate-new-buffer " *temp*" t))) (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (set (make-local-variable 'markdown-fontify-code-blocks-natively) t) (insert string) (let ((inhibit-message t) (message-log-max nil) match) (condition-case nil (progn (progn ... ...)) (error nil)) (font-lock-ensure) (goto-char (point-min)) (let ((inhibit-read-only t)) (if (fboundp ...) (progn ...))) (string-trim (buffer-string)))) (and (buffer-name temp-buffer) (kill-buffer temp-buffer))))) (let ((string x614) (mode x616)) (let ((temp-buffer (generate-new-buffer " *temp*" t))) (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (set (make-local-variable 'markdown-fontify-code-blocks-natively) t) (insert string) (let ((inhibit-message t) (message-log-max nil) match) (condition-case nil (progn ...) (error nil)) (font-lock-ensure) (goto-char (point-min)) (let (...) (if ... ...)) (string-trim (buffer-string)))) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))))) (progn (ignore (null x617)) (let ((string x614) (mode x616)) (let ((temp-buffer (generate-new-buffer " *temp*" t))) (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (set (make-local-variable ...) t) (insert string) (let (... ... match) (condition-case nil ... ...) (font-lock-ensure) (goto-char ...) (let ... ...) (string-trim ...))) (and (buffer-name temp-buffer) (kill-buffer temp-buffer))))))) (let* ((x616 (car-safe x615)) (x617 (cdr-safe x615))) (progn (ignore (null x617)) (let ((string x614) (mode x616)) (let ((temp-buffer (generate-new-buffer " *temp*" t))) (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (set ... t) (insert string) (let ... ... ... ... ... ...)) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))))))) (progn (ignore (consp x615)) (let* ((x616 (car-safe x615)) (x617 (cdr-safe x615))) (progn (ignore (null x617)) (let ((string x614) (mode x616)) (let ((temp-buffer (generate-new-buffer " *temp*" t))) (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn ... ... ...) (and ... ...)))))))) (let* ((x614 (car-safe val)) (x615 (cdr-safe val))) (progn (ignore (consp x615)) (let* ((x616 (car-safe x615)) (x617 (cdr-safe x615))) (progn (ignore (null x617)) (let ((string x614) (mode x616)) (let ((temp-buffer ...)) (save-current-buffer (set-buffer temp-buffer) (unwind-protect ... ...)))))))) (progn (ignore (consp val)) (let* ((x614 (car-safe val)) (x615 (cdr-safe val))) (progn (ignore (consp x615)) (let* ((x616 (car-safe x615)) (x617 (cdr-safe x615))) (progn (ignore (null x617)) (let ((string x614) (mode x616)) (let (...) (save-current-buffer ... ...)))))))) (let* ((val (if (stringp markup) (list markup 'gfm-view-mode) (list (plist-get markup :value) (let* ((val ...)) (cond (... ...) (... ...) (t ...))))))) (progn (ignore (consp val)) (let* ((x614 (car-safe val)) (x615 (cdr-safe val))) (progn (ignore (consp x615)) (let* ((x616 (car-safe x615)) (x617 (cdr-safe x615))) (progn (ignore (null x617)) (let (... ...) (let ... ...)))))))) eglot--format-markup((:kind "markdown" :value "```python\n(class) openfx\n```")) mapconcat(eglot--format-markup ((:kind "markdown" :value "```python\n(class) openfx\n```")) "\n") eglot--hover-info((:kind "markdown" :value "```python\n(class) openfx\n```") (:start (:line 7 :character 6) :end (:line 7 :character In GNU Emacs 30.0.50 (build 1, x86_64-w64-mingw32) of 2023-12-23 built on fv-az1258-535Repository revision: 5c3ff1494b69bf45b99125f2423174222badfa43 Repository branch: master Windowing system distributor 'Microsoft Corp.', version 10.0.22635 System Description: Microsoft Windows 10 Pro (v10.0.2009.22635.2915) Configured using: 'configure --prefix=/d/a/emacs-build/emacs-build/pkg/master-x86_64 'CFLAGS=-Ofast -fno-finite-math-only -fomit-frame-pointer -funroll-loops -floop-parallelize-all -ftree-parallelize-loops=4 -march=skylake -mtune=znver1' --with-native-compilation --with-zlib --with-xpm --with-xml2 --with-tree-sitter --with-tiff --with-rsvg --with-png --with-lcms2 --with-json --with-jpeg --with-harfbuzz --with-gnutls --with-gif --with-cairo --without-dbus --with-compress-install' -- Gary --00000000000051e0ea060dfaaa50 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr">With most recent eglot and emacs (as of a couple of days a= go) I'm<br>getting an error in my python-mode buffers. While eglot is t= rying to<br>show hover info, it gets a treesit error.<br><br>I'm using = eldoc and treesit a bunch of other stuff so I'm not sure where<br>the r= eal bug is. But basically it looks like treesit is trying to<br>fontify a t= emp python-mode buffer that just contains<br><br>=C2=A0 (class) openfx<br>= =C2=A0<br>and getting an error. Markdown mode is involved too (see the stac= k<br>trace). I think the simplest solution is to ignore errors while<br>fon= tifying the temp buffer, and I believe joaotavora agrees.<br><br>The markup= arg passed to eglot--format-markup is:<br><br>=C2=A0 (:kind "markdown= " :value "```python\n(class) openfx\n```")<br><br>I'm us= ing pyright-langserver as the LSP server; I expect it is<br>returning malfo= rmed markup or something that eglot doesn't expect.<br><br>I note that = the following patch appears to fix it for me:<br><br>modified =C2=A0 eglot.= el<br>@@ -1813,7 +1813,9 @@ Doubles as an indicator of snippet support.&quo= t;<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(message-log-max nil)= <br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0match)<br>=C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0(ignore-errors (delay-mode-hooks (funcall mode)))<br>-= =C2=A0 =C2=A0 =C2=A0 =C2=A0(font-lock-ensure)<br>+ =C2=A0 =C2=A0 =C2=A0 = =C2=A0(condition-case-unless-debug oops<br>+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0(font-lock-ensure)<br>+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(err= or (eglot--warn (error-message-string oops))))<br>=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0(goto-char (point-min))<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(let= ((inhibit-read-only t))<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(when = (fboundp 'text-property-search-forward) ;; FIXME: use compat<br>=C2=A0<= div>See <a href=3D"https://github.com/joaotavora/eglot/discussions/1345">ht= tps://github.com/joaotavora/eglot/discussions/1345</a> for more=C2=A0detail= s.</div><div><br>The stack trace looks like this:<br><br>Debugger entered--= Lisp error: (treesit-query-error "Node type error at" 271 "[= \"as\" \"assert\" \"async\" \"await\&quo= t; \"break\" \"case\" \"class\" \"contin= ue\" \"def\" \"del\" \"elif\" \"els= e\" \"except\" \"exec\" \"finally\" \&qu= ot;for\" \"from\" \"global\" \"if\" \&qu= ot;import\" \"lambda\" \"match\" \"nonlocal\&= quot; \"pass\" \"print\" \"raise\" \"ret= urn\" \"try\" \"while\" \"with\" \"= yield\" \"and\" \"in\" \"is\" \"not= \" \"or\" \"not in\"] @font-lock-keyword-face ((id= entifier) @font-lock-keyword-face (#match \"\\\\`self\\\\'\" = @font-lock-keyword-face))" "Debug the query with `treesit-query-v= alidate'")<br>=C2=A0 treesit--font-lock-fontify-region-1(#<tree= sit-node module in 1-17> #<treesit-compiled-query> 1 17 nil nil)<b= r>=C2=A0 treesit-font-lock-fontify-region(1 17 nil)<br>=C2=A0 font-lock-fon= tify-syntactically-region(1 17 nil)<br>=C2=A0 font-lock-default-fontify-reg= ion(1 17 nil)<br>=C2=A0 font-lock-fontify-region(1 17)<br>=C2=A0 #f(compile= d-function (beg end) #<bytecode -0x147d5368d5be984b>)(1 17)<br>=C2=A0= font-lock-ensure()<br>=C2=A0 (save-current-buffer (set-buffer (get-buffer-= create (concat " markdown-code-fontification:" (symbol-name lang-= mode)))) (let ((inhibit-modification-hooks nil)) (delete-region (point-min)= (point-max)) (insert string " ")) (if (eq major-mode lang-mode) = nil (funcall lang-mode)) (font-lock-ensure) (setq pos (point-min)) (while (= setq next (next-single-property-change pos 'face)) (let ((val (get-text= -property pos 'face))) (if val (progn (put-text-property (+ start (1- p= os)) (1- (+ start next)) 'face val markdown-buffer)))) (setq pos next))= )<br>=C2=A0 (let ((string (buffer-substring-no-properties start end)) (modi= fied (buffer-modified-p)) (markdown-buffer (current-buffer)) pos next) (rem= ove-text-properties start end '(face nil)) (save-current-buffer (set-bu= ffer (get-buffer-create (concat " markdown-code-fontification:" (= symbol-name lang-mode)))) (let ((inhibit-modification-hooks nil)) (delete-r= egion (point-min) (point-max)) (insert string " ")) (if (eq major= -mode lang-mode) nil (funcall lang-mode)) (font-lock-ensure) (setq pos (poi= nt-min)) (while (setq next (next-single-property-change pos 'face)) (le= t ((val (get-text-property pos 'face))) (if val (progn (put-text-proper= ty (+ start ...) (1- ...) 'face val markdown-buffer)))) (setq pos next)= )) (add-text-properties start end '(font-lock-fontified t fontified t f= ont-lock-multiline t)) (set-buffer-modified-p modified))<br>=C2=A0 (progn (= let ((string (buffer-substring-no-properties start end)) (modified (buffer-= modified-p)) (markdown-buffer (current-buffer)) pos next) (remove-text-prop= erties start end '(face nil)) (save-current-buffer (set-buffer (get-buf= fer-create (concat " markdown-code-fontification:" (symbol-name l= ang-mode)))) (let ((inhibit-modification-hooks nil)) (delete-region (point-= min) (point-max)) (insert string " ")) (if (eq major-mode lang-mo= de) nil (funcall lang-mode)) (font-lock-ensure) (setq pos (point-min)) (whi= le (setq next (next-single-property-change pos 'face)) (let ((val (get-= text-property pos ...))) (if val (progn (put-text-property ... ... ... val = markdown-buffer)))) (setq pos next))) (add-text-properties start end '(= font-lock-fontified t fontified t font-lock-multiline t)) (set-buffer-modif= ied-p modified)))<br>=C2=A0 (if (fboundp lang-mode) (progn (let ((string (b= uffer-substring-no-properties start end)) (modified (buffer-modified-p)) (m= arkdown-buffer (current-buffer)) pos next) (remove-text-properties start en= d '(face nil)) (save-current-buffer (set-buffer (get-buffer-create (con= cat " markdown-code-fontification:" (symbol-name lang-mode)))) (l= et ((inhibit-modification-hooks nil)) (delete-region (point-min) (point-max= )) (insert string " ")) (if (eq major-mode lang-mode) nil (funcal= l lang-mode)) (font-lock-ensure) (setq pos (point-min)) (while (setq next (= next-single-property-change pos 'face)) (let ((val ...)) (if val (progn= ...))) (setq pos next))) (add-text-properties start end '(font-lock-fo= ntified t fontified t font-lock-multiline t)) (set-buffer-modified-p modifi= ed))))<br>=C2=A0 (let ((lang-mode (if lang (markdown-get-lang-mode lang) ma= rkdown-fontify-code-block-default-mode))) (if (fboundp lang-mode) (progn (l= et ((string (buffer-substring-no-properties start end)) (modified (buffer-m= odified-p)) (markdown-buffer (current-buffer)) pos next) (remove-text-prope= rties start end '(face nil)) (save-current-buffer (set-buffer (get-buff= er-create (concat " markdown-code-fontification:" ...))) (let ((i= nhibit-modification-hooks nil)) (delete-region (point-min) (point-max)) (in= sert string " ")) (if (eq major-mode lang-mode) nil (funcall lang= -mode)) (font-lock-ensure) (setq pos (point-min)) (while (setq next (next-s= ingle-property-change pos ...)) (let (...) (if val ...)) (setq pos next))) = (add-text-properties start end '(font-lock-fontified t fontified t font= -lock-multiline t)) (set-buffer-modified-p modified)))))<br>=C2=A0 markdown= -fontify-code-block-natively("python" 11 26)<br>=C2=A0 (if (and m= arkdown-fontify-code-blocks-natively (or (setq lang (markdown-code-block-la= ng)) markdown-fontify-code-block-default-mode)) (markdown-fontify-code-bloc= k-natively lang start end) (add-text-properties start end '(face markdo= wn-pre-face)))<br>=C2=A0 (let* ((start (match-beginning 0)) (end (match-end= 0)) (bol-prev (progn (goto-char start) (if (bolp) (line-beginning-position= 0) (line-beginning-position)))) (eol-next (progn (goto-char end) (if (bolp= ) (line-beginning-position 2) (line-beginning-position 3)))) lang) (if (and= markdown-fontify-code-blocks-natively (or (setq lang (markdown-code-block-= lang)) markdown-fontify-code-block-default-mode)) (markdown-fontify-code-bl= ock-natively lang start end) (add-text-properties start end '(face mark= down-pre-face))) (font-lock-append-text-property bol-prev eol-next 'fac= e 'markdown-code-face) (add-text-properties bol-prev start '(invisi= ble markdown-markup)) (add-text-properties end eol-next '(invisible mar= kdown-markup)))<br>=C2=A0 (progn (let* ((start (match-beginning 0)) (end (m= atch-end 0)) (bol-prev (progn (goto-char start) (if (bolp) (line-beginning-= position 0) (line-beginning-position)))) (eol-next (progn (goto-char end) (= if (bolp) (line-beginning-position 2) (line-beginning-position 3)))) lang) = (if (and markdown-fontify-code-blocks-natively (or (setq lang (markdown-cod= e-block-lang)) markdown-fontify-code-block-default-mode)) (markdown-fontify= -code-block-natively lang start end) (add-text-properties start end '(f= ace markdown-pre-face))) (font-lock-append-text-property bol-prev eol-next = 'face 'markdown-code-face) (add-text-properties bol-prev start '= ;(invisible markdown-markup)) (add-text-properties end eol-next '(invis= ible markdown-markup))))<br>=C2=A0 (unwind-protect (progn (let* ((start (ma= tch-beginning 0)) (end (match-end 0)) (bol-prev (progn (goto-char start) (i= f (bolp) (line-beginning-position 0) (line-beginning-position)))) (eol-next= (progn (goto-char end) (if (bolp) (line-beginning-position 2) (line-beginn= ing-position 3)))) lang) (if (and markdown-fontify-code-blocks-natively (or= (setq lang (markdown-code-block-lang)) markdown-fontify-code-block-default= -mode)) (markdown-fontify-code-block-natively lang start end) (add-text-pro= perties start end '(face markdown-pre-face))) (font-lock-append-text-pr= operty bol-prev eol-next 'face 'markdown-code-face) (add-text-prope= rties bol-prev start '(invisible markdown-markup)) (add-text-properties= end eol-next '(invisible markdown-markup)))) (set-match-data saved-mat= ch-data t))<br>=C2=A0 (let ((saved-match-data (match-data))) (unwind-protec= t (progn (let* ((start (match-beginning 0)) (end (match-end 0)) (bol-prev (= progn (goto-char start) (if ... ... ...))) (eol-next (progn (goto-char end)= (if ... ... ...))) lang) (if (and markdown-fontify-code-blocks-natively (o= r (setq lang ...) markdown-fontify-code-block-default-mode)) (markdown-font= ify-code-block-natively lang start end) (add-text-properties start end '= ;(face markdown-pre-face))) (font-lock-append-text-property bol-prev eol-ne= xt 'face 'markdown-code-face) (add-text-properties bol-prev start &= #39;(invisible markdown-markup)) (add-text-properties end eol-next '(in= visible markdown-markup)))) (set-match-data saved-match-data t)))<br>=C2=A0= (save-excursion (let ((saved-match-data (match-data))) (unwind-protect (pr= ogn (let* ((start (match-beginning 0)) (end (match-end 0)) (bol-prev (progn= ... ...)) (eol-next (progn ... ...)) lang) (if (and markdown-fontify-code-= blocks-natively (or ... markdown-fontify-code-block-default-mode)) (markdow= n-fontify-code-block-natively lang start end) (add-text-properties start en= d '...)) (font-lock-append-text-property bol-prev eol-next 'face &#= 39;markdown-code-face) (add-text-properties bol-prev start '(invisible = markdown-markup)) (add-text-properties end eol-next '(invisible markdow= n-markup)))) (set-match-data saved-match-data t))))<br>=C2=A0 (progn (save-= excursion (let ((saved-match-data (match-data))) (unwind-protect (progn (le= t* ((start ...) (end ...) (bol-prev ...) (eol-next ...) lang) (if (and mark= down-fontify-code-blocks-natively ...) (markdown-fontify-code-block-nativel= y lang start end) (add-text-properties start end ...)) (font-lock-append-te= xt-property bol-prev eol-next 'face 'markdown-code-face) (add-text-= properties bol-prev start '...) (add-text-properties end eol-next '= ...))) (set-match-data saved-match-data t)))) t)<br>=C2=A0 (if (funcall mat= cher last) (progn (save-excursion (let ((saved-match-data (match-data))) (u= nwind-protect (progn (let* (... ... ... ... lang) (if ... ... ...) (font-lo= ck-append-text-property bol-prev eol-next ... ...) (add-text-properties bol= -prev start ...) (add-text-properties end eol-next ...))) (set-match-data s= aved-match-data t)))) t))<br>=C2=A0 markdown-fontify-code-blocks-generic(ma= rkdown-match-gfm-code-blocks 29)<br>=C2=A0 markdown-fontify-gfm-code-blocks= (29)<br>=C2=A0 font-lock-fontify-keywords-region(1 29 nil)<br>=C2=A0 font-l= ock-default-fontify-region(1 29 nil)<br>=C2=A0 font-lock-fontify-region(1 2= 9)<br>=C2=A0 #f(compiled-function (beg end) #<bytecode -0x147d5368d5be98= 4b>)(1 29)<br>=C2=A0 font-lock-ensure()<br>=C2=A0 (let ((inhibit-message= t) (message-log-max nil) match) (condition-case nil (progn (progn (make-lo= cal-variable 'delay-mode-hooks) (let ((delay-mode-hooks t)) (funcall mo= de)))) (error nil)) (font-lock-ensure) (goto-char (point-min)) (let ((inhib= it-read-only t)) (if (fboundp 'text-property-search-forward) (progn (wh= ile (setq match (text-property-search-forward 'invisible)) (delete-regi= on (let* (...) (progn ... ...)) (let* (...) (progn ... ...))))))) (string-t= rim (buffer-string)))<br>=C2=A0 (progn (set (make-local-variable 'markd= own-fontify-code-blocks-natively) t) (insert string) (let ((inhibit-message= t) (message-log-max nil) match) (condition-case nil (progn (progn (make-lo= cal-variable 'delay-mode-hooks) (let ((delay-mode-hooks t)) (funcall mo= de)))) (error nil)) (font-lock-ensure) (goto-char (point-min)) (let ((inhib= it-read-only t)) (if (fboundp 'text-property-search-forward) (progn (wh= ile (setq match (text-property-search-forward ...)) (delete-region (let* ..= . ...) (let* ... ...)))))) (string-trim (buffer-string))))<br>=C2=A0 (unwin= d-protect (progn (set (make-local-variable 'markdown-fontify-code-block= s-natively) t) (insert string) (let ((inhibit-message t) (message-log-max n= il) match) (condition-case nil (progn (progn (make-local-variable 'dela= y-mode-hooks) (let (...) (funcall mode)))) (error nil)) (font-lock-ensure) = (goto-char (point-min)) (let ((inhibit-read-only t)) (if (fboundp 'text= -property-search-forward) (progn (while (setq match ...) (delete-region ...= ...))))) (string-trim (buffer-string)))) (and (buffer-name temp-buffer) (k= ill-buffer temp-buffer)))<br>=C2=A0 (save-current-buffer (set-buffer temp-b= uffer) (unwind-protect (progn (set (make-local-variable 'markdown-fonti= fy-code-blocks-natively) t) (insert string) (let ((inhibit-message t) (mess= age-log-max nil) match) (condition-case nil (progn (progn (make-local-varia= ble ...) (let ... ...))) (error nil)) (font-lock-ensure) (goto-char (point-= min)) (let ((inhibit-read-only t)) (if (fboundp 'text-property-search-f= orward) (progn (while ... ...)))) (string-trim (buffer-string)))) (and (buf= fer-name temp-buffer) (kill-buffer temp-buffer))))<br>=C2=A0 (let ((temp-bu= ffer (generate-new-buffer " *temp*" t))) (save-current-buffer (se= t-buffer temp-buffer) (unwind-protect (progn (set (make-local-variable '= ;markdown-fontify-code-blocks-natively) t) (insert string) (let ((inhibit-m= essage t) (message-log-max nil) match) (condition-case nil (progn (progn ..= . ...)) (error nil)) (font-lock-ensure) (goto-char (point-min)) (let ((inhi= bit-read-only t)) (if (fboundp ...) (progn ...))) (string-trim (buffer-stri= ng)))) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))))<br>=C2= =A0 (let ((string x614) (mode x616)) (let ((temp-buffer (generate-new-buffe= r " *temp*" t))) (save-current-buffer (set-buffer temp-buffer) (u= nwind-protect (progn (set (make-local-variable 'markdown-fontify-code-b= locks-natively) t) (insert string) (let ((inhibit-message t) (message-log-m= ax nil) match) (condition-case nil (progn ...) (error nil)) (font-lock-ensu= re) (goto-char (point-min)) (let (...) (if ... ...)) (string-trim (buffer-s= tring)))) (and (buffer-name temp-buffer) (kill-buffer temp-buffer))))))<br>= =C2=A0 (progn (ignore (null x617)) (let ((string x614) (mode x616)) (let ((= temp-buffer (generate-new-buffer " *temp*" t))) (save-current-buf= fer (set-buffer temp-buffer) (unwind-protect (progn (set (make-local-variab= le ...) t) (insert string) (let (... ... match) (condition-case nil ... ...= ) (font-lock-ensure) (goto-char ...) (let ... ...) (string-trim ...))) (and= (buffer-name temp-buffer) (kill-buffer temp-buffer)))))))<br>=C2=A0 (let* = ((x616 (car-safe x615)) (x617 (cdr-safe x615))) (progn (ignore (null x617))= (let ((string x614) (mode x616)) (let ((temp-buffer (generate-new-buffer &= quot; *temp*" t))) (save-current-buffer (set-buffer temp-buffer) (unwi= nd-protect (progn (set ... t) (insert string) (let ... ... ... ... ... ...)= ) (and (buffer-name temp-buffer) (kill-buffer temp-buffer))))))))<br>=C2=A0= (progn (ignore (consp x615)) (let* ((x616 (car-safe x615)) (x617 (cdr-safe= x615))) (progn (ignore (null x617)) (let ((string x614) (mode x616)) (let = ((temp-buffer (generate-new-buffer " *temp*" t))) (save-current-b= uffer (set-buffer temp-buffer) (unwind-protect (progn ... ... ...) (and ...= ...))))))))<br>=C2=A0 (let* ((x614 (car-safe val)) (x615 (cdr-safe val))) = (progn (ignore (consp x615)) (let* ((x616 (car-safe x615)) (x617 (cdr-safe = x615))) (progn (ignore (null x617)) (let ((string x614) (mode x616)) (let (= (temp-buffer ...)) (save-current-buffer (set-buffer temp-buffer) (unwind-pr= otect ... ...))))))))<br>=C2=A0 (progn (ignore (consp val)) (let* ((x614 (c= ar-safe val)) (x615 (cdr-safe val))) (progn (ignore (consp x615)) (let* ((x= 616 (car-safe x615)) (x617 (cdr-safe x615))) (progn (ignore (null x617)) (l= et ((string x614) (mode x616)) (let (...) (save-current-buffer ... ...)))))= )))<br>=C2=A0 (let* ((val (if (stringp markup) (list markup 'gfm-view-m= ode) (list (plist-get markup :value) (let* ((val ...)) (cond (... ...) (...= ...) (t ...))))))) (progn (ignore (consp val)) (let* ((x614 (car-safe val)= ) (x615 (cdr-safe val))) (progn (ignore (consp x615)) (let* ((x616 (car-saf= e x615)) (x617 (cdr-safe x615))) (progn (ignore (null x617)) (let (... ...)= (let ... ...))))))))<br>=C2=A0 eglot--format-markup((:kind "markdown&= quot; :value "```python\n(class) openfx\n```"))<br>=C2=A0 mapconc= at(eglot--format-markup ((:kind "markdown" :value "```python= \n(class) openfx\n```")) "\n")<br>=C2=A0 eglot--hover-info((= :kind "markdown" :value "```python\n(class) openfx\n```"= ;) (:start (:line 7 :character 6) :end (:line 7 :character =C2=A0<br><br>= =C2=A0<br>In GNU Emacs 30.0.50 (build 1, x86_64-w64-mingw32) of 2023-12-23 = built<br>on fv-az1258-535Repository revision: 5c3ff1494b69bf45b99125f242317= 4222badfa43<br>Repository branch: master<br>Windowing system distributor &#= 39;Microsoft Corp.', version 10.0.22635<br>System Description: Microsof= t Windows 10 Pro (v10.0.2009.22635.2915)<br><br>Configured using:<br>=C2=A0= 'configure --prefix=3D/d/a/emacs-build/emacs-build/pkg/master-x86_64 &#= 39;CFLAGS=3D-Ofast -fno-finite-math-only -fomit-frame-pointer -funroll-loop= s -floop-parallelize-all -ftree-parallelize-loops=3D4 -march=3Dskylake -mtu= ne=3Dznver1' --with-native-compilation --with-zlib --with-xpm --with-xm= l2 --with-tree-sitter --with-tiff --with-rsvg --with-png --with-lcms2 --wit= h-json --with-jpeg --with-harfbuzz --with-gnutls --with-gif --with-cairo --= without-dbus --with-compress-install'<br><br><div><br></div><span class= =3D"gmail_signature_prefix">-- </span><br><div dir=3D"ltr" class=3D"gmail_s= ignature" data-smartmail=3D"gmail_signature"><div dir=3D"ltr"><div>Gary</di= v></div></div></div></div> --00000000000051e0ea060dfaaa50--
Gary Oberbrunner <garyo@HIDDEN>
:bug-gnu-emacs@HIDDEN
.
Full text available.bug-gnu-emacs@HIDDEN
:bug#68217
; Package emacs
.
Full text available.
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.