From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tim Cross Subject: Re: org-babel-load-file support elisp Date: Tue, 04 Feb 2020 09:47:30 +1100 Message-ID: <871rrbb85a.fsf@gmail.com> References: <87tv47mq59.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:35320) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iykVH-0006tQ-5y for emacs-orgmode@gnu.org; Mon, 03 Feb 2020 17:47:40 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iykVF-0001de-4K for emacs-orgmode@gnu.org; Mon, 03 Feb 2020 17:47:38 -0500 Received: from mail-pj1-x1033.google.com ([2607:f8b0:4864:20::1033]:51699) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iykVE-0001a0-TS for emacs-orgmode@gnu.org; Mon, 03 Feb 2020 17:47:37 -0500 Received: by mail-pj1-x1033.google.com with SMTP id fa20so439363pjb.1 for ; Mon, 03 Feb 2020 14:47:36 -0800 (PST) Received: from tim-desktop (203-173-17-111.dyn.iinet.net.au. [203.173.17.111]) by smtp.gmail.com with ESMTPSA id l1sm476359pjb.28.2020.02.03.14.47.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Feb 2020 14:47:34 -0800 (PST) In-reply-to: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane-mx.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.org I came across this inconsistency a while back. I think the problem is that you should *not* be able to use elisp as a language specifier in source blocks. All other language specifiers comply to the pattern of source block languages being the language major mode name without the '-mode', but there is no elisp-mode. The problem now is that removing support for 'elisp' would break too much. So the question becomes 'Do we want to continue down this road and if so, does it make sense to support 'elisp' as a synonym for emacs-lisp in all places where specifying the language is used?'. Troy Hinckley writes: > > I think supporting "#+begin_src elisp" would be confusing > > elisp is already supported in all other babel > functions. org-babel-load-file is the only function that makes a > distinction as far as I can tell. And since that function is outlier it > makes sense to document this limitation in its docstring. > > Or even better would be to detect if the user had elisp blocks and throw > and error. Though I am not sure how to do that outside of seeing if > tangling elisp is successful. > > -Troy Hinckley > > On Feb 3, 2020, 12:23 PM -0700, Bastien , wrote: > > Hi Troy, > > I tracked down an issue trying to load a literate config file. > org-babel-load-file calls org-babel-tangle-file with lang set to > "emacs-lisp". This means that it won't tangle any blocks with > language set to "elisp", which is equivalent. I can't think of an > easy way to fix this since you would need to target both languages. > Maybe at very least we could add something to the doc string to draw > attention to this limitation. > > > I think supporting "#+begin_src elisp" would be confusing but I agree > we could give a hint somewhere about this. > > Can you suggest which docstring should be updated and how? > > Thanks, -- Tim Cross