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 wDx4Ibe3814gAgAA0tVLHw (envelope-from ) for ; Wed, 24 Jun 2020 20:29:43 +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 wEtPHbe38156CgAAB5/wlQ (envelope-from ) for ; Wed, 24 Jun 2020 20:29:43 +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 0FF6694021E for ; Wed, 24 Jun 2020 20:29:43 +0000 (UTC) Received: from localhost ([::1]:33896 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1joC1e-0006Qt-0h for larch@yhetil.org; Wed, 24 Jun 2020 16:29:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56616) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1joC1T-0006Pj-Dx for help-guix@gnu.org; Wed, 24 Jun 2020 16:29:31 -0400 Received: from mail-qv1-xf43.google.com ([2607:f8b0:4864:20::f43]:44111) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1joC1R-0004fU-7p for help-guix@gnu.org; Wed, 24 Jun 2020 16:29:31 -0400 Received: by mail-qv1-xf43.google.com with SMTP id g7so1684979qvx.11 for ; Wed, 24 Jun 2020 13:29:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=egH0n8DpdIiheAY06bIyJASU0y+qc8xmVivOj29MN4M=; b=RLBsixbE/aXbXJ/RWZWlIu5zMJm/xdDIEC0DS3Up1tJRMRfySmkV9KN6bRgpEwpSAD S8+0lBU83osKWaMd/CTuNz2fKsykRCTA60gOW6Q5t0ozoApZbMM4LOXNjAQgvNjaXo8T CDb55NHsek4vkM+BoIeQnUGwLDy+f3tebLMdYaNEcH4lajwpIcx9oCuAJ5NOILoufwTA iAK+XxQp0j0b95O5OKSAs+Lyjuka5pIgw8ikg0lsJW6Kin9t715JeZvyfpI5vY4mSgTM 19Zc1pLYT8nReu1sRPs8XzPJgiY7w6A7yI/cWtzD4HNUGAsfv/Pa3jLN5al+RhR3XdIf Wj0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=egH0n8DpdIiheAY06bIyJASU0y+qc8xmVivOj29MN4M=; b=iyrBdJqvux3mXIphqu9YJow3V100/FT1IWx8zwhIco4e54sU4q+/O8hNfzSw/mTdZq qAa7gXrfFVCGT6Nz3vdcU9ZPJdC+JR/HxKtGcAUscdt3TQsy6TL1GMfBt5DcRvW+l1w0 0idckIqMVl26IYCIoYJD7BDEEPMtpWorS9j0bFzb839aZsjhM/CqeVlyW0GdY55NDTrO Al8IvRvq4s22L5klRFKOdO9qdiJL51Ws0OUfJ8KB28B5yGk2YeqzT3Zw/m/XFFpZseHR UdEy/DEw3VxAR3K/z0fNlY59EF00WdgsXeHFA9NbfDbXA2axVblef2tjS19VEIDsoJV0 WtTg== X-Gm-Message-State: AOAM531r39T74m7o8+zlPYYf1P3KfVaPSvCTtOS204RQ41d2d/pB2dNT zpz8DSQM0ffyhgpRnQKWJBmKmK3u X-Google-Smtp-Source: ABdhPJwO4Ru4+T/kakx6Ja6Pth5HrxSoFgKyUdKocxoY5mfX7dnTKBb3yp47xq3RCbs8Qe5tX8+CZg== X-Received: by 2002:a05:6214:906:: with SMTP id dj6mr19051901qvb.37.1593030568153; Wed, 24 Jun 2020 13:29:28 -0700 (PDT) Received: from hurd (dsl-10-134-241.b2b2c.ca. [72.10.134.241]) by smtp.gmail.com with ESMTPSA id m26sm4769245qtm.73.2020.06.24.13.29.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Jun 2020 13:29:27 -0700 (PDT) From: Maxim Cournoyer To: Zelphir Kaltstahl Subject: Re: Erlang + Emacs profile References: <3801410f-667e-9cac-74f3-d56a519adcc2@posteo.de> Date: Wed, 24 Jun 2020 16:29:26 -0400 In-Reply-To: <3801410f-667e-9cac-74f3-d56a519adcc2@posteo.de> (Zelphir Kaltstahl's message of "Wed, 24 Jun 2020 00:49:14 +0200") Message-ID: <871rm4mcm1.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2607:f8b0:4864:20::f43; envelope-from=maxim.cournoyer@gmail.com; helo=mail-qv1-xf43.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: help-guix@gnu.org Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: "Help-Guix" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=RLBsixbE; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of help-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=help-guix-bounces@gnu.org X-Spam-Score: -1.71 X-TUID: X/GlzcaU9HPf Hello Zelphir, Zelphir Kaltstahl writes: > Hello Guix users! > > What is your way of setting up a profile for Erlang development? > > There are some things I would like to have, some of which I already > managed to get: > > * [X] Erlang installed through Guix package manager in a separate profi= le > * [X] `erl` REPL available in that separate profile > * [X] an Emacs Erlang mode (installed it through M-x list-pack RET and > searched for erlang there) > * [_] org-mode babel erlang for literate programming in org-mode, > using the Guix installed erlang executable =E2=80=93 I found > https://github.com/xfwduke/ob-erlang, which also seems to work, but > I do not know how to point it to the Guix installed Erlang, so that > it can actually run code. Currently it complains about not finding > Erlang. Does anyone know how to point it to the Erlang executable? I > created this issue: https://github.com/xfwduke/ob-erlang/issues/1 It just looks up erl from your PATH, so the problem must be that you started Emacs from your user profile, which doesn't know about the separate Guix profile you created which contains Erlang. You'd have to start Emacs from an shell where your separate profile was sourced, or fiddle with M-x setenv to fix this. emacs-guix also has some guix-set-emacs-environment procedure that can be used to augment Emacs environment variables given a profile, but it seems broken at the moment. I just tried the following approach, where everything is managed by Guix in a separate profile: --8<---------------cut here---------------start------------->8--- ;; file: manifest.scm (specifications->manifest '("erlang" "emacs" "emacs-org" "emacs-erlang" "emacs-ob-erlang")) ;; freshly packaged for you ;-) --8<---------------cut here---------------end--------------->8--- Then spawn an environment with guix environment -m manifest.scm And then ran the following experiment: --8<---------------cut here---------------start------------->8--- # file: test.org Put this in your ~/.emacs or evaluate it ad-hoc before running the rest. #+begin_src elisp (require 'org-tempo)=09=09=09 (require 'ob-erlang) (org-babel-do-load-languages 'org-babel-load-languages '((erlang . t))) #+end_src Example taken from: https://github.com/xfwduke/ob-erlang With your cursor on the code block, I ran M-x org-babel-execute-src-block #+BEGIN_SRC erlang :module tryerlang start() -> io:format("hello world"). #+END_SRC And it produced: #+RESULTS: : hello world --8<---------------cut here---------------end--------------->8--- Hope this helps! Maxim