From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id oG2hKLyF+16eYAAA0tVLHw (envelope-from ) for ; Tue, 30 Jun 2020 18:34:36 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id sNKFJLyF+172WgAA1q6Kng (envelope-from ) for ; Tue, 30 Jun 2020 18:34:36 +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 DB917940221 for ; Tue, 30 Jun 2020 18:34:35 +0000 (UTC) Received: from localhost ([::1]:34110 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jqL5V-0003pD-Hz for larch@yhetil.org; Tue, 30 Jun 2020 14:34:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60348) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jqL5K-0003p2-5k for help-guix@gnu.org; Tue, 30 Jun 2020 14:34:22 -0400 Received: from mout01.posteo.de ([185.67.36.65]:60311) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jqL5H-0007g3-CO for help-guix@gnu.org; Tue, 30 Jun 2020 14:34:21 -0400 Received: from submission (posteo.de [89.146.220.130]) by mout01.posteo.de (Postfix) with ESMTPS id 8FE9C16005C for ; Tue, 30 Jun 2020 20:34:12 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017; t=1593542052; bh=IMHsn5+srQcWpoc+rMd+YjiNHm48W7zqeArkUVNvDg0=; h=Subject:To:Cc:From:Date:From; b=CSQvdUUnbscTQpUZZQgQtyd7l+4Qvi6ummlYHdSiUlRk/nWKzTGB45d+xCd1OT4Wj FDRLn3bL429AfxM0qv0c+azyaVUlI4eEF3BV08cSTqLIJVhnlFT3nMsGQwiczxdRKm QiytQsPDkg91tRd29pw84KbEOsfj+/x/BnJNuw10JordH9UymCjR94KFZARAtj06o3 0zyQSfIDe6XYtoSNFBKE/1oxAvi9PI2ebhaf8DncxmJEZsn+B3tJKzfPlacreJUpw3 yFQr19oiJeFLhv7lfPF/MHrNKjTTlYvZhztusRyUQBvwddftYbL4B0kOPX32RTDc9C wuTm8H0pVnMoQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 49xCgR5pbLz9rxq; Tue, 30 Jun 2020 20:34:11 +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: <1acf372d-40ff-299b-afc7-30156d2f9bc4@posteo.de> Date: Tue, 30 Jun 2020 20:34:11 +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.65; envelope-from=zelphirkaltstahl@posteo.de; helo=mout01.posteo.de X-detected-operating-system: by eggs.gnu.org: First seen = 2020/06/30 14:34:12 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=CSQvdUUn; 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: oOFs18FNpg6s Hi Maxim! 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")) ~~~~ ~~~~ ~~~~ ~~~~ executing Erlang code block... append-export-all: Symbol’s function definition is void: string-join ~~~~ ~~~~ ~~~~ 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