all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Basic Emacs setup
@ 2017-05-11 12:57 Efraim Flashner
  2017-05-11 13:17 ` Catonano
  2017-05-11 15:50 ` myglc2
  0 siblings, 2 replies; 3+ messages in thread
From: Efraim Flashner @ 2017-05-11 12:57 UTC (permalink / raw)
  To: help-guix

I've never been an Emacs user so I'm out of my league when it comes to writing up a basic .emacs for guix-emacs, debbugs-gnu and whatever else I might need/want for workig with patches. Assuming my .emacs is completely empty can someone help me out with a snippet/config to work with guix?

Thanks
-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Basic Emacs setup
  2017-05-11 12:57 Basic Emacs setup Efraim Flashner
@ 2017-05-11 13:17 ` Catonano
  2017-05-11 15:50 ` myglc2
  1 sibling, 0 replies; 3+ messages in thread
From: Catonano @ 2017-05-11 13:17 UTC (permalink / raw)
  To: Efraim Flashner; +Cc: help-guix

[-- Attachment #1: Type: text/plain, Size: 1676 bytes --]

2017-05-11 14:57 GMT+02:00 Efraim Flashner <efraim@flashner.co.il>:

> I've never been an Emacs user so I'm out of my league when it comes to
> writing up a basic .emacs for guix-emacs, debbugs-gnu and whatever else I
> might need/want for workig with patches. Assuming my .emacs is completely
> empty can someone help me out with a snippet/config to work with guix?
>

Assuming you mean to run Emacs on GuixSD, there's not so much to configure

You just install the emacs related packages in your profile (emacs-debbugs,
emacs-guix and maybe emacs-hydra)

This is the ONLY piece of guix related configuration I have in my .emacs
file

(with-eval-after-load 'debbugs-gnu
  (add-to-list 'debbugs-gnu-all-packages "guix-patches"))


that's it

It might be useful to conigure an Emacs based email client, to conveniently
process patches.

That is something I still lack, but at least this is enough to see patches
in Emacs

Not related to guix but very useful Emacs usage tips are: an appropriate
theme, a dark one and an appropriate set of fonts. That can dramatically
improve your Emacs experience

I use the zenburn theme (there are more that are at least as cool as
zenburn) and the Source Code Pro fonts. So:

(set-frame-font "Source Code Pro-20" nil t)
(load-theme 'zenburn) ;; zenburn has to be installed too, of course

As for scheme code this is a little trick but this also improves the
experience greatly

(show-paren-mode)

You might want to use smartparens (to move balanced blocks of code)
I should update it, the version in Guix is quite old. I didn't yet, out of
lazyness :-/
But you can use it anyway. Even old versions can be useful


That's it, on my side ;-)

[-- Attachment #2: Type: text/html, Size: 2304 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Basic Emacs setup
  2017-05-11 12:57 Basic Emacs setup Efraim Flashner
  2017-05-11 13:17 ` Catonano
@ 2017-05-11 15:50 ` myglc2
  1 sibling, 0 replies; 3+ messages in thread
From: myglc2 @ 2017-05-11 15:50 UTC (permalink / raw)
  To: Efraim Flashner, Catonano; +Cc: help-guix

On 05/11/2017 at 12:57 Efraim Flashner writes:

> I've never been an Emacs user so I'm out of my league when it comes to
> writing up a basic .emacs for guix-emacs, debbugs-gnu and whatever
> else I might need/want for workig with patches. Assuming my .emacs is
> completely empty can someone help me out with a snippet/config to work
> with guix?
>
> Thanks

Note: Please discard my earlier direct reply.

Hi Efraim,

Here is how I run guix and emacs-guix from git checkouts. First I
installed GuixSD in the normal way using the attached system (sys.scm)
and user configurations (g1.scm).

Note: I run GuixSD on a headless server and log in via ssh using a term
program or X11 so these configs reflect that pattern of use.

Then I did this one time ...

### clone guix
mkdir -p ~/src
cd ~/src && git clone git://git.savannah.gnu.org/guix.git

*** clone emacs-guix
mkdir -p ~/.emacs.d/lisp/
cd ~/.emacs.d/lisp/ && git clone https://github.com/alezost/guix.el.git

Then ...

### to pull and build the latest guix
cd ~/src/guix && guix environment -e "(@ (gnu packages package-management) guix)" -M 4 -c 4
git pull
make clean-go
./bootstrap
./configure --localstatedir=/var --sysconfdir=/etc
make -j 10 check
ln -f -s -T ~/src/guix/ ~/.config/guix/latest
sudo ln -f -s -T ~/src/guix/ /root/.config/guix/latest
exit

### to update the user profile
guix package -m ~/src/g1.scm -M 4 -c 4

### to update the system profile
su 
guix system build sys.scm  -M 4 -c 4
guix system reconfigure sys.scm  -M 4 -c 4
guix package -m g1.scm  -M 4 -c 4
### and, only if guix-daemon changed
reboot

*** to pull and build the latest guix.el
cd ~/.emacs.d/lisp/guix.el && git pull
cd ~/.emacs.d/lisp/guix.el && guix environment --pure --load=guix.scm -M 4 -c 4
cd ~/.emacs.d/lisp/guix.el && make clean && ./autogen.sh && ./configure && make
exit

Some of these steps are "overkill", e.g., 'make clean-go', 'make clean',
'reboot' and are only occasionally needed, e.g. if the guix API
changes. But I have a fast server and I tend to just do them anyway.

There have also been a couple cases where it was necessary to ...

### delete the guile caches
rm -fr ~/.cache/guile/ccache
sudo rm -fr /root/.cache/guile/ccache

You will want to set up emacs for email. The attached configs support
mu4e and gnus/notmuch, but my config is a rather baroque so it might be
more confusing than helpful.  I don't use debbugs-gnu. Hopefully someone
using debbugs-gnu and mu4e will suggest a simple setup.

My .emacs init file has the line '(load "~/.emacs.d/guix.el")' to load
the guix-specific stuff (guix.el, attached) to work with the above.
Then you should be able to 'M-x guix edit' and edit package recipes with
abandon.

HTH - George

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-05-11 15:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-11 12:57 Basic Emacs setup Efraim Flashner
2017-05-11 13:17 ` Catonano
2017-05-11 15:50 ` myglc2

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.