unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Joshua Branson <jbranso@dismail.de>
To: Feng Shu <tumashu@163.com>
Cc: guix-devel@gnu.org
Subject: Re: Suggest improve emacs setting in 'The Perfect Setup'
Date: Sat, 31 Dec 2022 18:17:30 -0500	[thread overview]
Message-ID: <87mt73jh85.fsf@dismail.de> (raw)
In-Reply-To: <87k02990ee.fsf@163.com> (Feng Shu's message of "Fri, 30 Dec 2022 08:54:17 +0800")

Feng Shu <tumashu@163.com> writes:

> Hello:
>
> In 'The Perfect Setup', we suggest user to use the below emacs config:
>
> ```
> ;; Assuming the Guix checkout is in ~/src/guix.
> (with-eval-after-load 'geiser-guile
>   (add-to-list 'geiser-guile-load-path "~/src/guix"))
> ```
>
> This config need user to deal with %load-path of guix, which seem to be
> a hard job for new guile user for many dirs of guix and other guix channels,
> why not suggest new user to use the below config:
>

How about you go ahead and make a patch on guix-patches@gnu.org, that
way this issue is not forgotten?

>
> ```
> (setq geiser-guile-binary (list "guix" "repl"))
> ```
>
>
> or:
>
> ```
> (setq geiser-guile-binary (list "guix" "repl" "-L" "/path/to/user-own-config-dir"))
> ```
>
> when user just want to develop his own guix config, just run:
>
> ```
> emacs
> ```
>
> guix and other channels installed by 'guix pull' will be used properly.
>
> when user want to develop in guix.git, he just run emacs like the below:
>
> ```
> ./pre-inst-env emacs
> ```
>
> The below is my guix emacs config, seem to work:
>
> --------------------------------------------------------------------------------
>
> (require 'geiser)
> (require 'geiser-guile)
> (require 'guix)
> (require 'magit)
>
> ;; ** My own guix config.
> (defvar eh-geeguix-dir (expand-file-name "~/geeguix"))
>
> ;; ** Let geiser-guile use 'guix repl'
> (setq geiser-guile-binary (list "guix" "repl" "-L" eh-geeguix-dir))
>
> ;; ** guix-devel-mode
> (add-hook 'scheme-mode-hook #'guix-devel-mode)
>
> ;; ** Get guix dir installed by 'guix pull'.
> (defun eh-guix-dir ()
>   (file-name-as-directory
>    (cl-find-if
>     (lambda (dir)
>       (file-exists-p (expand-file-name "guix.scm" dir)))
>     (directory-files
>      (expand-file-name "~/.cache/guix/checkouts/")
>      t))))
>
> ;; ** copyright-update
> (when (eh-guix-dir)
>   (let* ((dir (eh-guix-dir))
>          (file (expand-file-name "etc/copyright.el" dir)))
>     (when (file-exists-p file)
>       (load-file file)
>       ;; (add-hook 'after-save-hook 'copyright-update)
>       (setq copyright-names-regexp
>             (format "%s <%s>" user-full-name user-mail-address)))))
>
> ;; ** tempel
> (when (eh-guix-dir)
>   (let* ((dir (eh-guix-dir))
>          (path (expand-file-name "etc/snippets/tempel/*" dir)))
>     (add-to-list 'tempel-path path)))

I would also add:

(add-hook! 'scheme-mode-hook #'display-fill-column-indicator-mode)

This creates a vertical line that reminds you that your code should fit
inside 80 columns.

Possible also mention how to set up page break lines:

https://github.com/purcell/page-break-lines


  reply	other threads:[~2022-12-31 23:18 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-30  0:54 Suggest improve emacs setting in 'The Perfect Setup' Feng Shu
2022-12-31 23:17 ` Joshua Branson [this message]
2023-01-01 19:53   ` Feng Shu
2023-01-01 20:35   ` jbranso
2023-01-01 21:05     ` Feng Shu
2023-01-02 21:36     ` jbranso
2023-01-03  1:18       ` Feng Shu
2023-06-08 22:08   ` Mekeor Melire
2023-01-06 16:07 ` Simon Tournier
2023-01-07 22:43   ` Feng Shu

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=87mt73jh85.fsf@dismail.de \
    --to=jbranso@dismail.de \
    --cc=guix-devel@gnu.org \
    --cc=tumashu@163.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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).