From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id uNQFBFZ12GV4ygAAe85BDQ:P1 (envelope-from ) for ; Fri, 23 Feb 2024 11:37:10 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id uNQFBFZ12GV4ygAAe85BDQ (envelope-from ) for ; Fri, 23 Feb 2024 11:37:10 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=FgY56bSk; 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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1708684629; 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=HdXtwxMLJd63LYRta06GBWMFVbE+d+jf8oPUO4/i9ik=; b=TJnybs/tPfsSoTk6+vQxPKcm6mTW75tqS4D9VllkFeHxopHXwWQHC5jZgB0Uu3eEpgyeS8 hh1SKoqD6qPTlNz9sI8VfeorLfyYQmPFsn7ddxpnNwSySX+BAtBbugX920DncvyNkFbpN/ +F3zjgGEwaiJvLSi9sMtY1u7LXFg03CiqVa/P7UNBCPVm9P3pob5EZZAah3CXgGbZkNRNh 1e6dy/aFjX10Oey5u7ZdqBLiArt2ZdUxxN5oRTd6NFuPbuRQvwyNkUrwPTrgo/2ISIQyTZ 2GayH8iT0mc/1TZrIBt1dwcC1LArXFdtjb/6SV8GED8/LA3vUdhFwuP3rRrJcg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=FgY56bSk; 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" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1708684629; a=rsa-sha256; cv=none; b=X9zsnbywzCTooRlxyEX1g/3TrJtCrlOGAbp3hJbK9rfLj9GnLK6Ww+qxsgOKMAY0XpNDb+ 7SD/K6QXXoVHd2ENGkwkFiDwdAbe1xNtataHEoy/Z1bgNX06jejJPUPZeS2hPHDYpOMd6o /kzAQqw/IBlOoGeMDotdhyc/1DxPMTj8GryMJJrOLrGb2x538KXqyCNrKvZpdPkvu6IGa5 pU7GbcTH/aydY3El6hItrl3+ccKUgZb3kj0g7LuV2PzCXkSZn/4nAPX30aP+avnQCOryxq oTgi/qZF+F/thFktf9uDhmGJtT/Psa8lhO3+QN7c26bFr7L0NzvZoTZh1ehkuw== 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 C19F417D16 for ; Fri, 23 Feb 2024 11:37:09 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rdSu0-0004rq-J6; Fri, 23 Feb 2024 05:35:36 -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 ) id 1rdStn-0004cO-GX for emacs-orgmode@gnu.org; Fri, 23 Feb 2024 05:35:28 -0500 Received: from mail-lj1-x231.google.com ([2a00:1450:4864:20::231]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rdStd-0002Ga-BA for emacs-orgmode@gnu.org; Fri, 23 Feb 2024 05:35:23 -0500 Received: by mail-lj1-x231.google.com with SMTP id 38308e7fff4ca-2d24a727f78so10203161fa.0 for ; Fri, 23 Feb 2024 02:35:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1708684508; x=1709289308; darn=gnu.org; h=mime-version:date:references:in-reply-to:subject:cc:to:from :message-id:from:to:cc:subject:date:message-id:reply-to; bh=HdXtwxMLJd63LYRta06GBWMFVbE+d+jf8oPUO4/i9ik=; b=FgY56bSk3eRMGhv0xvt6EvjmydvsU2vv/3CvRTiWEcFlr+3Xu3Hn+8jva2QN22fVfD 60KmqZjxDbb+5AMqpiquVTReScv1KhO4CDYQ0vQSvKp4VNOOYVOcpOpm5KHmsE1Qa6gi 93XUU+1ash3Ii1OKcFTRpcnsSDa3FScheVNVZgh22aECCSa+PAcuVC9AE66Gh/Mt23T4 n/lUMc+fETMBL5oJlEgbgBQzr+LtHZSWw6uwSvidnn6yFqtkWEzyi6cO/cvuRcF98qm+ EgaoZlUJ3E7GS6OTFV3pIuu4HIYGgf4YMm8ZGHHHs7k5NeCGBwx45cwYifP4TYix/QGd iqng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708684508; x=1709289308; h=mime-version:date:references:in-reply-to:subject:cc:to:from :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=HdXtwxMLJd63LYRta06GBWMFVbE+d+jf8oPUO4/i9ik=; b=aUx9U1D2YtwNZB1rWtEAxLttm59xjBAXsRm0fIlu9y71a1MdGcSNCE5as/JA4RdXDX s6rGzSd9CH3dyQDwoiK+jX6i+1l9O8A5p36ANFdq9wcJ06pj5QVtJnx23hacS+/vwxNP r4uTC6Lv6gsxG5707r8CBfpLPe5VM9qkyv7AZSQOFpu4SjGj/2oV+TM4JT/yLXyaw0r6 3WkUhswjfvQUNLxTg6newqtxfi/3HwpQ6wwZdvRjepMJ+zdii58WI9RMoDmMvyk85+az zr9KINhe3gNMO8B7Hi7E8Ezq4HO8ftPir1gUIh/yjApGSpqg5tZaswrSh/gW7aLj9IzX J2fg== X-Gm-Message-State: AOJu0Ywzh8QVHuyCRJQwNXyP9napHAv919zbqQns/lxvFauaTpQjA0Eo 4K4SFmxCQjOVm91j8nzX4S9O0BqNUPCldXYXWyQpE7eOMdWe8u8V X-Google-Smtp-Source: AGHT+IGeGdhGHtH/qQcBJGSIt3DUaD9yV2+nN9f+/CU5aV1ArOUFavvSW67bPbCPij4uUtIEfN+QCw== X-Received: by 2002:a05:651c:b28:b0:2d2:3c9f:36b4 with SMTP id b40-20020a05651c0b2800b002d23c9f36b4mr1433479ljr.13.1708684507538; Fri, 23 Feb 2024 02:35:07 -0800 (PST) Received: from keynux ([2a01:e0a:505:3460:1c18:688d:ece4:372e]) by smtp.gmail.com with ESMTPSA id cg6-20020a5d5cc6000000b0033cf2063052sm2225412wrb.111.2024.02.23.02.35.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Feb 2024 02:35:07 -0800 (PST) Message-ID: <65d874db.5d0a0220.e15b3.6301@mx.google.com> Received: by keynux (sSMTP sendmail emulation); Fri, 23 Feb 2024 11:35:05 +0100 From: Bruno Barbier To: Rudi C Cc: emacs-orgmode@gnu.org Subject: Re: org-mode: example blocks are no longer syntax highlighted in emacs In-Reply-To: References: <65d76c84.df0a0220.8cb17.afd6@mx.google.com> Date: Fri, 23 Feb 2024 11:35:05 +0100 MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2a00:1450:4864:20::231; envelope-from=brubar.cs@gmail.com; helo=mail-lj1-x231.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, MSGID_FROM_MTA_HEADER=0.001, RCVD_IN_DNSWL_NONE=-0.0001, T_SCC_BODY_TEXT_LINE=-0.01, T_SPF_HELO_TEMPERROR=0.01, T_SPF_TEMPERROR=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-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -9.57 X-Spam-Score: -9.57 X-Migadu-Queue-Id: C19F417D16 X-Migadu-Scanner: mx13.migadu.com X-TUID: 2EbDmDw5HsMp Hi Rudy, Note that I am not an org maintainer; just trying to help :-) Rudi C writes: >> Why is `:eval never` not as good ? You don't have to write it on each >> code block; you may set it globally, per file, per headline, etc. > > The main reason is that I also use source blocks for babel blocks that are > runnable. So I cannot use per headline etc. solutions. I can use snippets > to automatically insert `:eval never`, but it's not as good a UX. You could customize `org-insert-structure-template' like this: (add-to-list 'org-structure-template-alist (cons "p" "src python :eval never")) Then: C-c C-, p should insert your code example: #+begin_src python :eval never #+end_src > I also already have lots of org-mode notes written using `example lang` > blocks. Rewriting all of these will be a PITA. You could teach Emacs to fix/rewrite those for you. Ask here if you need help. You're probably not the only one that will need to fix them. > NickD has identified the commit that introduced this breaking change: > > ... > https://github.com/bzg/org-mode/commit/616e80a9f10c4bd085d7b5ac96fd6ea23e9c9191 > I wrote this patch which can be put in one's config to make this behavior > configurable. Thanks for the link. (your code layout was broken, it's more reliable to attach these kinds of documents) > Can you merge this upstream? emacs is all about user customizability, and > in general, breaking backward compatibility without giving a way out is bad. According to the email thread, the change was made only to match the documentation (see https://list.orgmode.org/87zg7lghzz.fsf@gmail.com/). So, maybe a new option, like you suggested will be accepted, something like: (defvar org-fontify-block-types '("src") "Which block types to fontify. Prior versions of Org may fontify other blocks than src. That invalid behavior is now fixed. If you have documents relying on this invalid behavior, and, you cannot fix them, add the block types to this list.") But: - Fontification must be fast. The more options, the harder to optimize. - It might just be opening a can of worms: Why is editing not working too then ? Why is the indentation incorrect? Why are they not exported correctly ? Why is pandoc not able to handle them correctly ? etc. Let see what other people think. Bruno