From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id 8BkPFKvjOmOrhwAAbAwnHQ (envelope-from ) for ; Mon, 03 Oct 2022 15:29:15 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id cNQqE6vjOmMqWQAAG6o9tA (envelope-from ) for ; Mon, 03 Oct 2022 15:29:15 +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 CD27219817 for ; Mon, 3 Oct 2022 15:29:14 +0200 (CEST) Received: from localhost ([::1]:60912 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ofLVR-0002iB-Rz for larch@yhetil.org; Mon, 03 Oct 2022 09:29:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33380) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ofLOm-00035K-FS for emacs-orgmode@gnu.org; Mon, 03 Oct 2022 09:22:20 -0400 Received: from mail-ed1-x52f.google.com ([2a00:1450:4864:20::52f]:41849) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ofLOk-0006vi-OG for emacs-orgmode@gnu.org; Mon, 03 Oct 2022 09:22:20 -0400 Received: by mail-ed1-x52f.google.com with SMTP id z97so14528302ede.8 for ; Mon, 03 Oct 2022 06:22:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date; bh=IusibPkBl2332MMJzvytpBy4movCyaG1ld0306MjfX0=; b=NN3vZlkDG+zqBULxoTYB6HKE9G5VGqoAvr5un00invg7VAKN3o/pW2zsVrT5sgIsaS Cx1ViedlZDmJyL4nTUNtzPL9WoobKCM/wFQFfDv6KFfv8uykSXcwoU/C9uBt6zhzmLeW CXnmB4JTiL8bzyhXqiBM6LARKcMP3rWiHqIN0eMWVg7HPqWgtswLCr69dm/UOmDJGcuN EbIUnTQEeKAW11l+YjEuQNlNrYXfRlfMR7ChJfpPEVg7jMbSXXEz9SC5ytPsBaynLaem wIf8AbEOqdXkTUCSJpC1iaZsYJXzOyUtSmkIFgfRnsB1m33HSf63O7GjPAbsFT7Z3tVI nt9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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; bh=IusibPkBl2332MMJzvytpBy4movCyaG1ld0306MjfX0=; b=CxGH56+5lPKTDqkXTK+JDD0Vp/4Mk49c2UuJoG9owH9H4WXZlmBYNw6wwRRqanNjem tVsSL9bvQnRmStd1eyC+8MiDbMVtI/fa32vFasonTgqQk3Auxe0wzaZl5VmPR0Vawu6a /1a67lUTwhUA4dl1AV+nm8g/E5XFPRMYEfTfegx9Bs/OWlA2X4xmF/Vt4UUUvh4pJx9/ I60CMNVpw9Z+68wwfoN0BwAtNisk6eeKcMX1Oaep/tS07Oqt5QQzT73Su4W1hSy0f8U8 cChwSIzqGrztHpUcusxBgF1Sbmx0BZsypkK8VyquSy7KjN7JzzgVgTZtnP67CRGCCmMq /m1A== X-Gm-Message-State: ACrzQf0KcNOaRqTcMtOkQhGE8h07NRRt+B/JXp+3UvA3FiSlERCe0vPv Ru8d4mUNLXr5jCBzCuhEwIMTAAziJjV4eKMRT+Q= X-Google-Smtp-Source: AMsMyM7vFHNOpTbnJtQvmZ/rbOhmfCa+Hq+OUT7MAUqCV824RSVSDKNSHyqphvucI2rvr/qfzDbLoX505fT3/A5Kp5I= X-Received: by 2002:a05:6402:27d0:b0:451:b381:e0a1 with SMTP id c16-20020a05640227d000b00451b381e0a1mr18073915ede.4.1664803336972; Mon, 03 Oct 2022 06:22:16 -0700 (PDT) MIME-Version: 1.0 References: <878rly1ydl.fsf@localhost> <87tu4ldqky.fsf@tec.tecosaur.net> In-Reply-To: <87tu4ldqky.fsf@tec.tecosaur.net> From: =?UTF-8?B?RGF2aWQgTHVrZcWh?= Date: Mon, 3 Oct 2022 15:22:05 +0200 Message-ID: Subject: Re: Code block syntax highlighting in async export To: Timothy Cc: Max Nikulin , emacs-orgmode@gnu.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2a00:1450:4864:20::52f; envelope-from=dafydd.lukes@gmail.com; helo=mail-ed1-x52f.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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1664803755; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=IusibPkBl2332MMJzvytpBy4movCyaG1ld0306MjfX0=; b=TjXKASpT36uN7JfvZvOxkQSl4lBfPu/bT5ax7lyWrkq370mR8gWecff4g0qRROMdJnWXz4 SAEUxkpb+pfNvBaTwwfrNhinAEXAg0gJr2+fRo5rvMKXzWwonBfm1lD5EJeiT6A1+I6YPq gBai/v4VK+5SzYyXp71PI0THau77eov3oYQ4VO67hK7mHsOnEFK3vdv4W7RyR8UWfIT/Yu JZo3Ebz2Bu62cYFz28yiag+Px6HXAPMuo+3zW0m7Bt8Bo65b0716XuaQX8Ik4mZ4nJwX3v CUk42EVAEI5jiVLSGHsNaXclipkMXbHYPKr1szE0wPLttrPpKeKB6oxYuOj46Q== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1664803755; a=rsa-sha256; cv=none; b=iE66K89iC6vWADRLxgaBayMscK1xJjj1x2YYBF/suTTaLWRQ1bVNjgXSYCR3oCfta5Pb8J negfmIMmaGDK8W9R5NdDZM//oW0PNpM1MNhbCTC91Kr42J2w8/4HOdrtXUTQp8KsaE0/RJ h5YXRu9JCl+AxVeZiktBOk0egKskMltdIV7GhNhLhN/n+5eQy9dhBoLNkXq3uStNMz5ZMq X81dZfmydN6m80D7VEZIPdYL7UF5eeNWguGMpWbixRUzXJTq/cMsdYOJlCEw1xOWNcJvpN K7MlCxs+0dQX0xPWOE3UWBxVEYViqcR/dNYiyqyaKONDoPVA15/KKY1SjsIIFw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=NN3vZlkD; dmarc=pass (policy=none) header.from=gmail.com; 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: -7.35 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=NN3vZlkD; dmarc=pass (policy=none) header.from=gmail.com; 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: CD27219817 X-Spam-Score: -7.35 X-Migadu-Scanner: scn0.migadu.com X-TUID: /2p6A6aZgnSw > I'll investigate if I can leverage any of the workarounds mentioned. So, for batch processing, avoiding --batch or --script and just using --load with a script that either ends by killing Emacs, or killing it via an additional --eval, works, i.e. syntax highlighting uses colors. This was suggested in [1]. As [2] points out, adding -nw removes the colors, and so does adding --daemon (suggested in [3]), so don't do either. Enabling font-lock-mode manually and defining all the fontification (see [4]) sounds like it would also work, but honestly, that's too involved, so I didn't try it. Using an external colorizer (as shown in [5]), seems like a good alternative, if non-Emacs dependencies are acceptable. These two last options can also be made to work with async export (my original question), where you don't have control over how the batch instance of Emacs is invoked. > There=E2=80=99s a decent chance that `engrave-faces' (a package of mine t= hat can now be > used for code blocks in LaTeX) will work in batch mode. Integrating it wi= th > `ox-html', `ox-ansii', and `ox-odt' are all (distantly) on my todo list. Sounds great! If it will work in regular batch mode, then it should work with async as well :) Best, David [1] https://list.orgmode.org/orgmode/vZh_aXsUhlwNcRMF3miS6hNUo6xxUCFuzm4dwf= CNQHcm4Ib53t8sJVVJ-PmYD4sRfoCvWRjtEG7L5rfN4pRe5nDxLFWxWEG8ZqcZ5YvJyDs=3D@pr= otonmail.com/ [2] https://list.orgmode.org/orgmode/YmBR481ZMgZpA6svOfEMt3nYa8UPEKgvFUY5s8= SpRWu2YdJz0pb0gPz8ajcTeKFbF7SD1fD9XibICa8Z-JdTiIqgjOlD1y4yg9uHCB176ZA=3D@pr= otonmail.com/ [3] https://list.orgmode.org/orgmode/87a6923dbw.fsf@localhost/ [4] https://list.orgmode.org/AE5693F1-F63D-4383-8840-0FD2DBAAC5D6@gmail.com= / [5] https://linevi.ch/en/org-pygments.html