From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id iCiCCWOH+16KSAAA0tVLHw (envelope-from ) for ; Tue, 30 Jun 2020 18:41:39 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id kJ0sBWOH+17zZwAAbx9fmQ (envelope-from ) for ; Tue, 30 Jun 2020 18:41:39 +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 41629940308 for ; Tue, 30 Jun 2020 18:41:38 +0000 (UTC) Received: from localhost ([::1]:35324 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jqLCK-0005th-LV for larch@yhetil.org; Tue, 30 Jun 2020 14:41:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34036) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jqLCC-0005tO-Ec for help-guix@gnu.org; Tue, 30 Jun 2020 14:41:28 -0400 Received: from mout02.posteo.de ([185.67.36.66]:42099) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jqLC9-0000C5-P3 for help-guix@gnu.org; Tue, 30 Jun 2020 14:41:28 -0400 Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id 80E29240103 for ; Tue, 30 Jun 2020 20:41:23 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017; t=1593542483; bh=dAon5bUgNa8N6LOjL2YLcqAA2Abioa+LLFtPR7iI468=; h=Subject:To:Cc:From:Date:From; b=bPnewIS8BvEtqRqEp6SJJGbmsWAapC3d1pif4MXgvvQmGTHcU2xd0+tmxm4xxK4ZW haQJKewMAA8Wfe+INRZbEXzHjQGJvGJ/lua05UTAdX0gGthJ5aG6HsOSI29wjHGByU IhQs/jpuFTjyi44Kb8k8iBda/sfJPxxHBJxwUyqamQOxvYqhqjzl5PAFbPL/UZmSMQ 8c1A3m7lGwYRZAdMDdZW2tsAC1bFBjZow6e6wln1DQlkXEOhfkfU1z9DVhEU5m+Ume JTpx+AWLVNgVrEEOIrLoAHdUDey0YostqqEYxBXNQ5GoXvwUk7PEFdrR+vxWN8OeDR 6ukD7WFHj4f+g== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 49xCqk2pRvz6tmG; Tue, 30 Jun 2020 20:41:22 +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: <17cbeb3d-8950-3f96-6106-ad2dbde661db@posteo.de> Date: Tue, 30 Jun 2020 20:41:21 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Icedove/68.8.0 MIME-Version: 1.0 In-Reply-To: <871rm4mcm1.fsf@gmail.com> 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/30 14:41:23 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, HTML_MESSAGE=0.001, 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 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Content-Filtered-By: Mailman/MimeDel 2.1.23 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=fail (body hash did not verify) header.d=posteo.de header.s=2017 header.b=bPnewIS8; dmarc=fail reason="SPF not aligned (strict)" header.from=posteo.de (policy=none); 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.59 X-TUID: 73Rzxhm5ZSS3 Hi Maxim, Sorry for the incomplete previous e-mail, somehow I hit send, instead of changing formatting. So here I go again: I got around to trying it your way, I think. I have the manifest file `manifest.scm`: ~~~~ (specifications->manifest '("erlang" "emacs" "emacs-org" "emacs-erlang" "emacs-ob-erlang")) ~~~~ Then I run the command you wrote: `guix environment -m manifest.scm`, which created the environment just fine. Then I created a little Bash script, to make sure to start the separate Emacs without looking at the normal `~/.emacs.d/init.el` file: ~~~~ #!/usr/bin/env bash set -Eeuxo pipefail emacs --no-init-file --no-desktop --maximized ~~~~ And Emacs starts up just fine. Then I run the Elisp code in the *scratch* buffer: ~~~~ (require 'org-tempo) (require 'ob-erlang) (org-babel-do-load-languages 'org-babel-load-languages '((erlang . t))) ~~~~ Then I try to run the org-mode source block hello world Erlang: ~~~~ start() -> io:format("hello world"). ~~~~ Here however, I get an error logged in my *Messages* buffer: ~~~~ executing Erlang code block... append-export-all: Symbol’s function definition is void: string-join ~~~~ Is there anything I missed? Best regards, Zelphir On 24.06.20 22:29, 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 -- repositories: https://notabug.org/ZelphirKaltstahl