emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: dmg <dmg@turingmachine.org>
To: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: bug processing non emacs-lisp blocks
Date: Wed, 28 Jul 2021 20:37:01 -0700	[thread overview]
Message-ID: <CAEBXXD_VNau1=TSLAoe4WkeJfuu7FJb7KghpuJafJLp=jEhzJg@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 621 bytes --]

org-babel-load-file will try to tangle any source block that contains
the substring emacs-lisp or elisp in their language.

For example, the following code block will be tangled:

#+begin_src emacs-lispDONOT
(use-package "org-sidebar")
#+end_src

the following patch fixes that problem. The Regular expression should
be more stringent, so it does match exactly the string and not a
substring.

I think this is a regression. I used to comment out blocks from my
.org init files by simply adding a XXX (as in emacs-lispXXXX). In
current org these blocks are tangled :(



-- 
--dmg

---
D M German
http://turingmachine.org

[-- Attachment #2: patch --]
[-- Type: application/octet-stream, Size: 488 bytes --]

diff --git a/lisp/org.el b/lisp/org.el
index 1bd9e02eb..099655ff6 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -229,7 +229,7 @@ byte-compiled before it is loaded."
 	     tangled-file
 	     (file-attribute-modification-time
 	      (file-attributes (file-truename file))))
-      (org-babel-tangle-file file tangled-file "emacs-lisp\\|elisp"))
+      (org-babel-tangle-file file tangled-file "^\\(emacs-lisp\\|elisp\\)$"))
     (if compile
 	(progn
 	  (byte-compile-file tangled-file)

             reply	other threads:[~2021-07-29  3:38 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-29  3:37 dmg [this message]
2021-07-29  4:13 ` bug processing non emacs-lisp blocks Tim Cross
2021-07-29 14:54   ` Maxim Nikulin
2021-08-07 20:24 ` Nicolas Goaziou

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAEBXXD_VNau1=TSLAoe4WkeJfuu7FJb7KghpuJafJLp=jEhzJg@mail.gmail.com' \
    --to=dmg@turingmachine.org \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).