From mboxrd@z Thu Jan 1 00:00:00 1970 From: Grant Rettke Subject: How to inspect a document and check for the presence of source block language names and support Date: Fri, 28 Nov 2014 20:08:09 -0600 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:56568) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XuXSF-0004Fx-CM for emacs-orgmode@gnu.org; Fri, 28 Nov 2014 21:08:12 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XuXSE-0008Bf-Ea for emacs-orgmode@gnu.org; Fri, 28 Nov 2014 21:08:11 -0500 Received: from mail-oi0-x230.google.com ([2607:f8b0:4003:c06::230]:43783) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XuXSE-0008BS-9G for emacs-orgmode@gnu.org; Fri, 28 Nov 2014 21:08:10 -0500 Received: by mail-oi0-f48.google.com with SMTP id u20so5241839oif.7 for ; Fri, 28 Nov 2014 18:08:09 -0800 (PST) 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.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: "emacs-orgmode@gnu.org" Good evening, My goal is to obtain the following behavior in org mode for a document: 1) Report an error if there is a source block without a language specified 2) Report an error if there is a source block with a language specified that is *not* present in `org-babel-load-languages' I've thought about ways to do this and come up with: 1) Visually inspect the document 2) Use `org-element' to parse and process the document What are some other ways and what do you think about these two options? Emacs version: `24.4.1' Org version: `8.2.10' Kind regards, --=20 Grant Rettke gcr@wisdomandwonder.com | http://www.wisdomandwonder.com/ =E2=80=9CWisdom begins in wonder.=E2=80=9D --Socrates ((=CE=BB (x) (x x)) (=CE=BB (x) (x x))) =E2=80=9CLife has become immeasurably better since I have been forced to st= op taking it seriously.=E2=80=9D --Thompson