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 AKdWLzL69F7iFgAA0tVLHw (envelope-from ) for ; Thu, 25 Jun 2020 19:25:38 +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 SOwiKzL69F4RJwAAB5/wlQ (envelope-from ) for ; Thu, 25 Jun 2020 19:25:38 +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 09B4194051B for ; Thu, 25 Jun 2020 19:25:37 +0000 (UTC) Received: from localhost ([::1]:38268 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1joXV8-0003My-VM for larch@yhetil.org; Thu, 25 Jun 2020 15:25:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49092) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1joXV1-0003Ll-2W for help-guix@gnu.org; Thu, 25 Jun 2020 15:25:27 -0400 Received: from mout02.posteo.de ([185.67.36.66]:45257) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1joXUy-0005xl-9z for help-guix@gnu.org; Thu, 25 Jun 2020 15:25:26 -0400 Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id 4C10F2400FB for ; Thu, 25 Jun 2020 21:25:20 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017; t=1593113120; bh=g2BC9UCJHjNlVde21Fx6Bn7PXGgXNyQy/3r/NJAunac=; h=Subject:To:Cc:From:Date:From; b=bB4mzwIrpu9Lb1FDhOi6nYutsYroLVvdNfMzUnBKWox37XZfazPSrwWBmUcla6s3N gTeNvlGaSQWIr7myGn2KeshL0yUzfycRH7gqf96a55kY6lfRALh9f7MzaR12Qnz4AX 8p4MrbVCKzKszcn4wTUjAigTix/MLOZKODEFrcKKIGYkCeYsu33pm+YjHame8qW3/Y aU/FjpB+aPWGnBaaYBNsSI3UfFDWj8wWciFgLtnfyfXUHMR9MOejSQ0hiQz6kplEXn 0uaGUmIRlz60ps6k1gGabzCnHtzR6czcZdBnLhvJDBedM4KMvrjd9EhElPfUXoUqkm zutAHsYSymQRA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 49t92l6R38z9rxM; Thu, 25 Jun 2020 21:25:19 +0200 (CEST) Subject: Re: Erlang + Emacs profile To: Maxim Cournoyer References: <3801410f-667e-9cac-74f3-d56a519adcc2@posteo.de> <871rm4mcm1.fsf@gmail.com> From: Zelphir Kaltstahl Message-ID: <8211be1b-21d0-36bb-c89d-a92581af594a@posteo.de> Date: Thu, 25 Jun 2020 21:25:19 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: <871rm4mcm1.fsf@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Content-Language: en-US Received-SPF: pass client-ip=185.67.36.66; envelope-from=zelphirkaltstahl@posteo.de; helo=mout02.posteo.de X-detected-operating-system: by eggs.gnu.org: First seen = 2020/06/25 15:21:35 X-ACL-Warn: Detected OS = Linux 3.11 and newer X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H4=-0.01, RCVD_IN_MSPIKE_WL=-0.01, 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=posteo.de header.s=2017 header.b=bB4mzwIr; dmarc=pass (policy=none) header.from=posteo.de; 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: xY64N7dCY1VE Hi Maxim! Thanks for your message! I'll try it out. It implies some things I'd rather not do though: * It requires keeping multiple Emacs on my system. How will they interact with the same ~/.emacs.d/.init.el? * This approach seems to install everything only temporary, reinstalling every single time. But I can use a profile, so that's fine. How did you package emacs-ob-erlang? (I did not yet package a single package for Guix, so I assume no prior knowledge.) Or is it a rather lengthy procedure to do so? I think this might be one of the next things I learn about Guix, which is very useful, because if a package is missing, one can add it oneself, without having to rely on others to add it. It's an OK-ish solution to simply modify my PATH to make ob-erlang find erl, however, I was hoping for a configuration value in ob-emacs itself, so that I can set everything inside that plugin. I usually install Emacs packages inside Emacs, instead of using Guix for it. I do this, because probably not all packages I want are available in Guix, but I have not checked this assumption at all. I think I'll be fine with adapting my PATH for now, just need to do it in a way, that will keep working when I update Guix packages. Thanks, Zelphir On 6/24/20 10:29 PM, Maxim Cournoyer wrote: > 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 profile >> * [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 – 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) > (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