unofficial mirror of 
 help / color / Atom feed
From: Zelphir Kaltstahl <>
To: Maxim Cournoyer <>
Subject: Re: Erlang + Emacs profile
Date: Mon, 29 Jun 2020 22:26:50 +0200
Message-ID: <> (raw)
In-Reply-To: <>

Hi Maxim!

Although I installed emacs-ob-erlang in my main profile, where Emacs is
installed, I get an error, when I try to evaluate Erlang code in
Org-mode. A new buffer *Org-Babel Error Output* opens and displays:

bash: cannot set terminal process group (-1): Inappropriate ioctl for device
bash: no job control in this shell

When I open an `eshell` and do `which`:

Welcome to the Emacs shell

$ which erl
$ which erlc

So it can definitely find Erlang. I am not sure what the problem is. I
did not exactly follow the approach of using a manifest and instead
installed everything in the main profile, but to my understanding, that
should also work the same way, as long as it is all in the same profile.

The whole file I have for trying it:

#+BEGIN_SRC python :results output

: 2

#+BEGIN_SRC scheme
(define abc
  (lambda (a)

(abc 123)

: 123

#+begin_src elisp
  ;; (require 'org-tempo)
  (require 'ob-erlang)
   '((erlang . t)))


#+BEGIN_SRC erlang :module tryerlang
start() ->
	io:format("hello world").


So Python works, Scheme (Guile in this case) works, and Elisp simply had
no output but worked and was run before the Erlang one. Only Erlang did
not work.

Do you know what causes this error? I've seen it with other org-babel
source blocks, but usually accompanied by some more error telling me,
what is wrong. For example, when there is no Python at the specified
executable path of Python in Emacs settings / config, it would tell me
that there is no such file or directory or something like that.

Best regards,

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
>>, 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:
> 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:
> 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:
> 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").
> And it produced:
> : hello world
> --8<---------------cut here---------------end--------------->8---
> Hope this helps!
> Maxim


  parent reply index

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-23 22:49 Zelphir Kaltstahl
2020-06-24 20:29 ` Maxim Cournoyer
2020-06-25 19:25   ` Zelphir Kaltstahl
2020-06-28  4:41     ` Maxim Cournoyer
2020-06-29  8:50     ` zimoun
2020-06-29 19:37       ` Zelphir Kaltstahl
2020-06-29 20:24         ` Ricardo Wurmus
2020-06-29 20:37           ` Zelphir Kaltstahl
2020-06-29 20:49         ` zimoun
2020-06-29 21:12           ` Zelphir Kaltstahl
2020-06-29 22:08             ` zimoun
2020-06-29 20:26   ` Zelphir Kaltstahl [this message]
2020-06-30 18:34   ` Zelphir Kaltstahl
2020-06-30 18:41   ` Zelphir Kaltstahl
2020-07-06  3:50     ` Maxim Cournoyer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

  List information:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

unofficial mirror of 

Archives are clonable:
	git clone --mirror guix-user/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 guix-user guix-user/ \
	public-inbox-index guix-user

Example config snippet for mirrors

Newsgroups are available over NNTP:

AGPL code for this site: git clone