unofficial mirror of help-guix@gnu.org 
 help / color / Atom feed
From: Zelphir Kaltstahl <zelphirkaltstahl@posteo.de>
To: zimoun <zimon.toutoune@gmail.com>
Cc: help-guix@gnu.org
Subject: Re: Erlang + Emacs profile
Date: Mon, 29 Jun 2020 23:12:43 +0200
Message-ID: <b63704b0-8c9e-0766-f702-bd283c701744@posteo.de> (raw)
In-Reply-To: <86h7utbnrq.fsf@gmail.com>

Hi Simon!

On 29.06.20 22:49, zimoun wrote:
> Dear,
>
> On Mon, 29 Jun 2020 at 21:37, Zelphir Kaltstahl <zelphirkaltstahl@posteo.de> wrote:
>>> On Thu, 25 Jun 2020 at 21:25, Zelphir Kaltstahl <zelphirkaltstahl@posteo.de> wrote:
>>>
>>>> * It requires keeping multiple Emacs on my system. How will they
>>>> interact with the same ~/.emacs.d/.init.el?
>>> Emacs reads init.el when it starts so yes all Emacs will interact with
>>> this file if you do not specify explicitly to not do it.  Well, if you
>>> use 'with-eval-after-load' in your Emacs configuration files, it should
>>> not be a problem. Otherwise give a look at "emacs-guix" or try "emacs -q
>>> -l /path/to/your/specific/config.el", as Maxim pointed.
>> OK, so basically the way would then be to have 2 Emacs, but always start
>> one of them with with the `-l <path>` argument, so that it makes use of
>> another config file.
> I am not sure to understand what you want.  Could you describe what is
> your desired workflow to hack Erlang?

I'm only trying to understand how it would work with 2 Emacs, one in the
main profile and one in another profile, which can be created from
manifest. What I would like to achieve is, that I can do some literate
programming in org-mode, while following along an online course about
Erlang. In the past I had some pretty good experience with that approach
to understanding some code and making sure I also write down what I
understand, so that later on, I can go back and read again. I am not
asking, whether this is a good or typical approach to any Erlang
development.

>> OK nice! I'll try it for a package! I noticed, that there are only 3
>> Emacs Org-Babel packages available (or visible)
>> at: https://guix.gnu.org/packages/E/page/9/. I'l try with some of
>> those
> First, in case you do not know this web interface for searching
> packages:
>
> https://hpc.guix.info/browse
Indeed I did not know that one yet and always clicked through the pages,
estimating, how many pages ahead I would need to go, to approximately
find a package. :D
> Second, I am not following closely Org Babel extensions but what
> languages appear to you missing?

I was thinking, that `ob-python` was missing, because I only found
`emacs-ob-ipython`, but apparently `ob-python` does not exist and is
instead built in? Because it works without me installing any `ob-python`
Emacs package. Same seems to be true for `ob-scheme`. Only needed to
install `geiser` I think.

For now it seems nothing is missing.

>> Also the edit thing `guix edit emacs-ob-erlang` sounds interesting.
> It depends if you use Guix System or Guix as package manager solely.
> For the latter, the 'edit' is read-only.
>
>> I just did the edit thing and I am not sure how to then "upload" a
>> package. But I will read the docs a little and will probably all clear
>> up.
> What do you mean by "upload"?
> If you mean contribute, you might be interested by this section of the
> manual:
>
> https://guix.gnu.org/manual/devel/en/guix.html#Contributing
>
>
>
>> So if I understand this correctly, there are different channels for
>> different types of packages, for example for Rust packages we have
>> `gnu/packages/crates-io.scm` and for Emacs packages we have
>> `gnu/packages/emacs-xyz.scm`.
> Channel is not the right term, in Guix parlance.  To be clear, channel
> means a collection of packages living in files.  The previous different
> types of packages are all in the same channel, i.e., the default
> channel.
>
> https://guix.gnu.org/manual/devel/en/guix.html#Channels
>
> For channels examples, you can give a look at:
>
> https://gitlab.inria.fr/guix-hpc/guix-hpc
> ahttps://gitlab.inria.fr/guix-hpc/guix-past
>
>
>> The command `guix describe -f channels` does not work for me:
>>
>> ~~~~
>> xiaolong@xlx200:~$ guix describe -f channels
>> guix describe: error: failed to determine origin
>> hint: Perhaps this `guix' command was not obtained with `guix pull'? Its version string is
>> 36da62f1b9c78a2729658143a7df1845cd532afa.
>> ~~~~
> How did you install Guix?  Have you run "guix pull" before trying "guix
> describe"?

I installed it on Trisquel 8 using the recommended install script. I did
`guix pull` just like the error hinted, but still got the error. Now, a
few terminals closed and opened later, it seems to work and give some
output.

~~~~
(list (channel
        (name 'guix)
        (url "https://git.savannah.gnu.org/git/guix.git")
        (commit
          "6ebf300959a58fd1eda875205c75d21137862285")))
~~~~

I think that is the normal intended output.

>> I did another `guix pull` and `guix package -u` and this is after a
>> fresh Guix package manager install and and installing the following
>> packages:
>>
>> ~~~~
>> xiaolong@xlx200:~$ sudo -i guix package -I
> Note that once you have configured your system (if you use Guix System),
> you can run "guix pull" as a regular user and install package as regular
> user, independently of what your system-wide is.

Yep, sorry for that copy&paste error in my e-mail! The longer output was
actually the output of the non-root profile already.

>> The other command to show the count of packages also does not work for me:
>>
>> ~~~~
>> xiaolong@xlx200:/$ sudo du -sh gnu/packages/*.scm | sort -nr | head -n5
>> du: cannot access 'gnu/packages/*.scm': No such file or directory
>> ~~~~
> You need to be in the Guix repo, i.e., you need to git clone
> https://git.savannah.gnu.org/git/guix.git and the subfolder
> gnu/packages/ contains all the packages stored by thematic.
>
>
>> Do I need to create channels, like a custom way of structuring packages
>> for myself, before running these commands?
> To test and install your own packages, you have 3 choices:
>
>  1. ./pre-inst-env
>  2. local channel
>  3. --load-path
>
> The point #1 means you use the Contribution section, build Guix from
> source, then add your package to the file gnu/packages/emacs-xyz.scm (of
> the Git clone) and then run (from the Git cloned repo):
>
>   ./pre-inst-env guix install emacs-foo
>
> The point #2 means you use a local Git repo containing your definitions
> of packages.  You have the channels.scm file:
>
> --8<---------------cut here---------------start------------->8---
> (cons*
>  (channel
>   (name 'my-stuff)
>   (url "file:////path/to/my/stuff.git")
>   (branch "master"))
>  %default-channels)
> --8<---------------cut here---------------end--------------->8---
>
> then "guix pull -C path/to/channels.scm" and you should be able to
> install your package emacs-foo with "guix install emacs-foo".  Note that
> the Git repo can be also https:// or other protocols.
>
> The point #3 mean you use a local folder containing your definitions as
> for point #2.  Then you simply run:
>
>    guix install -L path/to/your/folder/containing/stuff emacs-foo
>
>
> Hope that helps,
> simon

Thanks Simon, it helps!

I will need to read more about various terms in the Guix universe in its
docs. I've not read that much yet and that is, why some terms and
concepts are unclear to me.

Regards,
Zelphir

-- 
repositories: https://notabug.org/ZelphirKaltstahl


  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 [this message]
2020-06-29 22:08             ` zimoun
2020-06-29 20:26   ` Zelphir Kaltstahl
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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

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

  git send-email \
    --in-reply-to=b63704b0-8c9e-0766-f702-bd283c701744@posteo.de \
    --to=zelphirkaltstahl@posteo.de \
    --cc=help-guix@gnu.org \
    --cc=zimon.toutoune@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

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

unofficial mirror of help-guix@gnu.org 

Archives are clonable:
	git clone --mirror https://yhetil.org/guix-user/0 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/ https://yhetil.org/guix-user \
		help-guix@gnu.org
	public-inbox-index guix-user

Example config snippet for mirrors

Newsgroups are available over NNTP:
	nntp://news.yhetil.org/yhetil.gnu.guix.user
	nntp://news.gmane.io/gmane.comp.gnu.guix.user


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git