From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id mKlsH7y2nl7ZLAAA0tVLHw (envelope-from ) for ; Tue, 21 Apr 2020 09:02:52 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id 4GiVK8G2nl4xIwAAB5/wlQ (envelope-from ) for ; Tue, 21 Apr 2020 09:02:57 +0000 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 F1E3F941CA0 for ; Tue, 21 Apr 2020 09:02:56 +0000 (UTC) Received: from localhost ([::1]:54224 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jQonv-0002rR-8t for larch@yhetil.org; Tue, 21 Apr 2020 05:02:55 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58284) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jQojx-0006Ch-P6 for emacs-orgmode@gnu.org; Tue, 21 Apr 2020 04:58:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jQojw-0001uI-Tw for emacs-orgmode@gnu.org; Tue, 21 Apr 2020 04:58:49 -0400 Received: from outpost1.zedat.fu-berlin.de ([130.133.4.66]:55861) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jQojw-0001lH-2m for emacs-orgmode@gnu.org; Tue, 21 Apr 2020 04:58:48 -0400 Received: from inpost2.zedat.fu-berlin.de ([130.133.4.69]) by outpost.zedat.fu-berlin.de (Exim 4.93) for emacs-orgmode@gnu.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (envelope-from ) id 1jQojr-001xU8-5G; Tue, 21 Apr 2020 10:58:43 +0200 Received: from [130.133.144.203] (helo=hornfels) by inpost2.zedat.fu-berlin.de (Exim 4.93) for emacs-orgmode@gnu.org with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (envelope-from ) id 1jQojq-000oS0-SY; Tue, 21 Apr 2020 10:58:43 +0200 From: "Loris Bennett" To: Org Mode Mailing List Subject: Conditionally loading ob-sh or ob-shell Date: Tue, 21 Apr 2020 10:58:42 +0200 Message-ID: <87tv1d2p19.fsf@hornfels.zedat.fu-berlin.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Original-Sender: loris.bennett@fu-berlin.de X-Originating-IP: 130.133.144.203 Received-SPF: pass client-ip=130.133.4.66; envelope-from=loris@zedat.fu-berlin.de; helo=outpost1.zedat.fu-berlin.de X-detected-operating-system: by eggs.gnu.org: First seen = 2020/04/21 04:58:43 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] X-Received-From: 130.133.4.66 X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 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-Scanner: scn0 X-Spam-Score: -1.11 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Scan-Result: default: False [-1.11 / 13.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; GENERIC_REPUTATION(0.00)[-0.56767392930286]; HAS_XOIP(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:209.51.188.0/24:c]; IP_REPUTATION_HAM(0.00)[asn: 22989(0.23), country: US(-0.01), ip: 209.51.188.17(-0.57)]; TO_DN_ALL(0.00)[]; MX_GOOD(-0.50)[cached: eggs.gnu.org]; MAILLIST(-0.20)[mailman]; FORGED_RECIPIENTS_MAILLIST(0.00)[]; RCVD_IN_DNSWL_LOW(-0.10)[209.51.188.17:from]; RCVD_TLS_LAST(0.00)[]; R_DKIM_NA(0.00)[]; ASN(0.00)[asn:22989, ipnet:209.51.188.0/24, country:US]; MIME_TRACE(0.00)[0:+]; TAGGED_FROM(0.00)[larch=yhetil.org]; ARC_NA(0.00)[]; FROM_NEQ_ENVFROM(0.00)[loris.bennett@fu-berlin.de,emacs-orgmode-bounces@gnu.org]; FROM_HAS_DN(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[fu-berlin.de]; HAS_LIST_UNSUB(-0.01)[]; RCPT_COUNT_ONE(0.00)[1]; RCVD_COUNT_SEVEN(0.00)[7]; FORGED_SENDER_MAILLIST(0.00)[] X-TUID: CJwo02jXhga+ Hi, I want to use one init.el across multiple machines with different versions of Emacs and Org. Since 'ob-sh.el' changed to 'ob-shell', I need to do either (org-babel-do-load-languages 'org-babel-load-languages '((org . t) (emacs-lisp . t) (shell . t) (perl . t) (R . t) (matlab . t) (gnuplot . t) (dot . t) (ditaa . t) (plantuml . t) (sqlite . t) (python . t) (latex . t))) or (org-babel-do-load-languages 'org-babel-load-languages '((org . t) (emacs-lisp . t) (sh . t) (perl . t) (R . t) (matlab . t) (gnuplot . t) (dot . t) (ditaa . t) (plantuml . t) (sqlite . t) (python . t) (latex . t))) I can obviously use a conditional to test the Emacs or Org version and execute one block or the other. However, since the list of languages is quite long, I would like to avoid repeating it. I create init.el from an init.org, so I am open to tangling solutions too. Cheers, Loris -- This signature is currently under construction.