From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id gID6E3Ifk2JpHQAAbAwnHQ (envelope-from ) for ; Sun, 29 May 2022 09:23:30 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id aAPRE3Ifk2J5EgAAauVa8A (envelope-from ) for ; Sun, 29 May 2022 09:23:30 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id DC892D474 for ; Sun, 29 May 2022 09:23:28 +0200 (CEST) Received: from localhost ([::1]:60138 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nvDGp-0005ZP-Df for larch@yhetil.org; Sun, 29 May 2022 03:23:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60356) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nvDEK-00058o-1f for emacs-orgmode@gnu.org; Sun, 29 May 2022 03:20:52 -0400 Received: from [39.171.214.172] (port=7715 helo=Mac-mini.local) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nvDEI-00007S-3L for emacs-orgmode@gnu.org; Sun, 29 May 2022 03:20:51 -0400 Received: by Mac-mini.local (Postfix, from userid 501) id A633E52242F2; Sun, 29 May 2022 15:20:28 +0800 (CST) References: <87k0a7kzlh.fsf@guelker.eu> <629180cb.1c69fb81.4263.8e2fSMTPIN_ADDED_BROKEN@mx.google.com> <87czfye6ty.fsf@localhost> User-agent: mu4e 1.6.10; emacs 28.1 From: "Christopher M. Miles" To: Ihor Radchenko Cc: numbchild@gmail.com, Marvin =?utf-8?Q?G=C3=BClker?= , emacs-orgmode@gnu.org Subject: Re: [BUG] Setting compile command causes fontification error [9.5 (release_9.5-661-g5e0afb @ /home/quintus/.emacs.d/org-mode/lisp/)] Date: Sun, 29 May 2022 15:17:28 +0800 In-reply-to: <87czfye6ty.fsf@localhost> Message-ID: MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Host-Lookup-Failed: Reverse DNS lookup failed for 39.171.214.172 (deferred) Received-SPF: softfail client-ip=39.171.214.172; envelope-from=numbchild@gmail.com; helo=Mac-mini.local X-Spam_score_int: 58 X-Spam_score: 5.8 X-Spam_bar: +++++ X-Spam_report: (5.8 / 5.0 requ) BAYES_00=-1.9, DKIM_ADSP_CUSTOM_MED=0.001, FORGED_GMAIL_RCVD=1, FREEMAIL_FROM=0.001, MSGID_MULTIPLE_AT=1, NML_ADSP_CUSTOM_MED=0.9, RCVD_IN_PBL=3.335, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_SOFTFAIL=0.665, SPOOFED_FREEMAIL_NO_RDNS=0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: reject X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: numbchild@gmail.com Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1653809009; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=05LMifJP0im7SfdXPnZREAe9qlnO6tyXQor95ETeqEM=; b=jdN7VoOkL4E8tJN2jufGlh/GgvxYzvLxoT/Wjtc2k/NuM61W3ftSD8jVajM8P1wyCgqwKM VLRm95x29eRzHhJRoOVCaW73WpKgXpILUFOhBaAiLidc9iTl2ekmT8WlFtv7Wt1f5/gpH/ IMr9IFiyey47DU81iB17Us6ZlwzB+rHJZAsPKLDkgvg4hCJUBFyOik+hSCzprfibW7XwiC PiFN8zaMLV0kbwSB+5y4r/rZgJDGD/PaVDYifuzYh9FCX52QxbEqYFwn8hPHopHRNZBfVG +DRx/1Cr9ARTYf3ySpcBnyFmGuCtHo5zhaoGzfn92FOygk2/RDSUi+MMxQd0GQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1653809009; a=rsa-sha256; cv=none; b=Zi//ilYakTZ1qGHsz35iFjs7pNOHw3ZPv0RCnZyf4T2uv6oHXFxKtaMWuVp0PSuHNvq7I5 ppMdakkcSSd3fROZuOWndz7Mhbn5HYHbXOkQhXQ5iSTXeRJivECjTIC4xd5wfDKGzb4eYQ du5lvfdMRyJ6DWTJJlvFkLiDKx2k6OFHtQbx7wrDIiDjH9Ja5WX6fHGdOBFGYEYbXAa8BD NwL7AokAoJEyJ81f6roL+dL0J6WUgzz2aJOxHuHT59M8CTYoGC4MyGNtzrts5Xttcb8X7Q ok8WZ10qeCiA9ypasz0QjRkSqOacdRI0eB+zI/7NO7Y/Ezij1JeKPe8ojb6ziw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: 1.56 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: DC892D474 X-Spam-Score: 1.56 X-Migadu-Scanner: scn1.migadu.com X-TUID: Le4bd8mA7Oeh --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Ihor Radchenko writes: > "Christopher M. Miles" writes: > >> From the backtrace, seems (buffer-file-name) returned nil, I guess you >> first created a new buffer and have not saved it to file. That caused it >> return nil. Not Org Mode problem. Not saving file is a common problem in >> young programmer as I experienced. No offence. > > To clarify, the problem is in the user-defined hook: > > (add-hook 'latex-mode-hook (lambda() > (set (make-local-variable 'compile-command) > (concat "lualatex " (shell-quote-argument (buffer-file-name))))= )) > > The hook does not work when (buffer-file-name) returns nil, which is > exactly what happens when Org mode tries to fontify the source block. > Org does it inside a temporary buffer not associated with any real file. > That's why you are senior developer, I haven't fount the hook in his error = report. Good job. > One way to fix the problem would be > > (add-hook 'latex-mode-hook (lambda() > (when (buffer-file-name) > (set (make-local-variable 'compile-command) > (concat "lualatex " (shell-quote-argument (buffer-file-name))))= ))) > > Best, > Ihor =2D-=20 [ stardiviner ] I try to make every word tell the meaning that I want to express. Blog: https://stardiviner.github.io/ IRC(freenode): stardiviner, Matrix: stardiviner GPG: F09F650D7D674819892591401B5DF1C95AE89AC3 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEE8J9lDX1nSBmJJZFAG13xyVromsMFAmKTHrgACgkQG13xyVro msNZDQgAz/eXI9ajEZE9Eo27LuGvOo+xJp2Pc0+dXbOGaD+ukTJJkielL1zIh70l kBQLSCh3ex4OuogIDdkCkRoXxF0CHYeDATW447fC5PZ4Fnf+hn9lc5yCp5B00G/t 3Yo9ysJkbyb8c6OyK1zEzfCexY2+5md1MPHo13rcIYU++V8CjjKiCAsNPWjQ0n/D RTVOF+xnDpu/UY9xfb79lwHBFxtmGomxtW21nlJaUr6URRb38qMxAavDCZuBqog8 TKR3VkJ8ugbtLRwXI0GHS7A7zrjoY6jaqiWdIFlkOgwJJj054Xp3sCuOwlk8Lmj8 HuCEvQuI7JJAtJgh2hjiCtL89qDqmw== =Xo+L -----END PGP SIGNATURE----- --=-=-=--