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 iBeHGmVm1mImDgEAbAwnHQ (envelope-from ) for ; Tue, 19 Jul 2022 10:08:05 +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 2rdJGmVm1mIg2gAAauVa8A (envelope-from ) for ; Tue, 19 Jul 2022 10:08:05 +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 3692031F72 for ; Tue, 19 Jul 2022 10:08:05 +0200 (CEST) Received: from localhost ([::1]:40756 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oDiGy-0007FW-Ab for larch@yhetil.org; Tue, 19 Jul 2022 04:08:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53900) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oDiEi-0007Dk-PT for emacs-orgmode@gnu.org; Tue, 19 Jul 2022 04:05:46 -0400 Received: from mail-pj1-x102f.google.com ([2607:f8b0:4864:20::102f]:35541) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oDiEg-00043q-Gl for emacs-orgmode@gnu.org; Tue, 19 Jul 2022 04:05:44 -0400 Received: by mail-pj1-x102f.google.com with SMTP id d7-20020a17090a564700b001f209736b89so403632pji.0 for ; Tue, 19 Jul 2022 01:05:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=references:user-agent:from:to:cc:subject:date:in-reply-to :message-id:mime-version; bh=z9Lk/iol0JPfT6poUuCxt6EJm8Ss3G4UGa+zaLFfMlU=; b=oi3A5Mj56GyjESMxhO7qw7rbfzc9MSfKWRga2P2AiYlGcUqvkz544QF4LV4VjgBq/v ea10tNwqT+23gWZdwqMnkWIhX+cVW5DeYEwq0var3Wx3HHQrFfevEQG9B+HooYv3vtCF Ze3sBAMQwkv9EvZRtF59opA+veW4F0+5lprYsVknQoFMqa+PLoASvZR21QYcD1FKIMpp fgTwyRjT3yCQIlpyMLvNzjAiSk8VlpK2YbUHT6WWvB1bh8niBy5ccMRk4WYCxR3VEXAv 1XK1D4b00btBNLZzOKSTjaVLJI971W0GJi5JqzrtSVwzx/7pySUN/uthtSLwC5KJK7gW iA/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:references:user-agent:from:to:cc:subject:date :in-reply-to:message-id:mime-version; bh=z9Lk/iol0JPfT6poUuCxt6EJm8Ss3G4UGa+zaLFfMlU=; b=1eijS1GBq1Oz6X01dVNm/vl7ZAtzeV2CJYDKREkeukHRl8e6nKPsidMVV7gfosS7M3 gZev14UtE9Q4jI87hwY53NcDvnUweYvMhhXPWQ8Ycwe9x/5sJEJ7B6tBxQZ08QxafzRn 2xRDjdsHCJ3E9e4bDa0x9Dk3D0Q3slR1dx1TKFhFKF7b9y/yxfgnlXz//yY/5QeXwaxn sCkefoR1NNOC9Fx57b0wVocvJg3bwQJxbGkzSmroSS15dCYLiTr9xH25UbmOaWoPJPkF QaW5ariYEjo7b7AxrANTd2ayzEQChX39gvtlhHIMQO9aYECrW3bZqVNYyb+o2sG1AhKS jK/A== X-Gm-Message-State: AJIora9TU647eTg27iWTkmm1ao0OTgUa09HwhBi3Ug3wwvUZHJErssAc QbpFUO4tmPXvyQ5Nzcy4nRkr4RuBw+hciw== X-Google-Smtp-Source: AGRyM1u0Mr68sewcCm9Vpm9sFhAG1q2wAXxqa802rvZp0MbqLMHgVw6Rh0HrmhYQ2OHhHvHOJgoA/w== X-Received: by 2002:a17:90b:1c8e:b0:1f1:b5a9:20c3 with SMTP id oo14-20020a17090b1c8e00b001f1b5a920c3mr14195737pjb.47.1658217940138; Tue, 19 Jul 2022 01:05:40 -0700 (PDT) Received: from dingbat (2001-44b8-31f2-bb00-842a-7361-87c7-2662.static.ipv6.internode.on.net. [2001:44b8:31f2:bb00:842a:7361:87c7:2662]) by smtp.gmail.com with ESMTPSA id q5-20020aa79605000000b0052a297324cbsm10671033pfg.41.2022.07.19.01.05.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Jul 2022 01:05:39 -0700 (PDT) References: <87zgh7i9vk.fsf@localhost> <864jzegk4q.fsf@gmail.com> User-agent: mu4e 1.8.6; emacs 29.0.50 From: Tim Cross To: "M. Pger" Cc: emacs-orgmode@gnu.org Subject: Re: no syntax highlighting for code blocks with org-publish Date: Tue, 19 Jul 2022 17:51:25 +1000 In-reply-to: Message-ID: <86v8rtfrxs.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::102f; envelope-from=theophilusx@gmail.com; helo=mail-pj1-x102f.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, T_SCC_BODY_TEXT_LINE=-0.01 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-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=1658218085; 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:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=z9Lk/iol0JPfT6poUuCxt6EJm8Ss3G4UGa+zaLFfMlU=; b=TsWsrvS0h8xQg4/t/MS/j2i7Hs2qEl0Ukpc3STUfzDqH1bm3kSqRvLjAlsicMsLH1CAOp7 6FtRiHSVKD8SdPSBG9cmk/YLXfRzInPuAXR9Ks+f0/tnqc+JxFbEhZ3SKhrYNTsDrYXHKq 8JqCGwZvKvLqSCGiazVcVi8fRv42daTm4rjhHLD3as8r6wYmOFEaz71f1eEUwY686thAEA m8BBg2oqMJkahUN76JJ58KiWSRbgPaCCvB7EGx/yLJyAEPWUZosRiqYY4gd2GvRysQ+Z7K 6Q03T2RjYXIdBmopBjOt8zK/xH2NHyJ2Z115xmOJAzFHio1KWpuKcLatYBKMtA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1658218085; a=rsa-sha256; cv=none; b=O1PtEPYxAyUsenasPAhOTLtOD7AQv61Pg0j3dNThhzbOUAij2VlnmYNPD4dct2F7BmBSen s6MMjnuZOqn0PJ9TBCHEFvCV4WapzPjnU+SEWm/mAAedq78CdiHDgnXUAzmzrRn7lilcvF 8XA7Wkv0fiMNia4e5hbF3kCKyDZVVlBzPlOX7LkmEcZ6xpSJHlShzlAoxu1yMrq+KhxjN+ v8GWDPk7iQsdFbg3zZ0zacZgKV3bCXU/5E8dIi+0l3hqxIrbDXoDxkZTlzwGtyuVfMtofb XezhbNBuhzotfOXMrn9/yl5pSjyFeFJI/fMdIEmt4t+7X9zEoJQFBcjnQQArow== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=oi3A5Mj5; 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.23 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=oi3A5Mj5; 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: 3692031F72 X-Spam-Score: -7.23 X-Migadu-Scanner: scn0.migadu.com X-TUID: mGqepX7KA7EA "M. Pger" writes: > Thanks for your suggestion. I added the following: > > #+begin_src elisp :eval no :exports code > (setq my-var "org mailing list") > (message "Hello, %s" my-var) > #+end_src > > When exported with ~C-c C-e h o~, syntax highlighting is implemented (with colors). When > exported with org-publish interestingly I have no color, but =setq= is in bold. Would it > be possible that ox-publish implements some kind of really basic builtin syntax > highlighting and ignores htmlize? > > I tried both exporting an org file into html and publishing and didn't get any syntax highlighting for either case. Had a closer look and noticed it didn't look like htmlize was being loaded. Did a (require 'htmlize) and did both an export and publish, betting syntax highlighting for both. My suspicion is that for the publish option, htmlize wasn't loaded? Maybe worth doing an explicit require and then call org-publish directly and see if that makes any difference. Below is the basic publish alist setting I used. Doubt all the slots are relevant - it was just a snippet from another project I grabbed to get setup. I also run M-x org-publish orgfiles rather than the export menu. (setq org-publish-project-alist '(("orgfiles" :base-directory "~/playground/org/" :base-extension "org" :recursive t :publishing-directory "~/Public" :publishing-function org-html-publish-to-html :exclude "PrivatePage.org" :html-style-default "" :html-scripts "" :html-htmlize-output-type 'inline-css :html-doctype "html5" :html-html5-fancy t :html-validation-link nil )))