help-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

emacs for config.scm editing


From: znavko
Subject: emacs for config.scm editing
Date: Sun, 07 Apr 2019 13:18:25 +0000

Hello! I've got my config.scm good stylized with indentations comme il-faut.

After reading actual Guix manual '14.3 The Perfect Setup' and this page https://www.gnu.org/software/guile/manual/html_node/Using-Guile-in-Emacs.html#Using-Guile-in-Emacs and also these suggestions https://www.emacswiki.org/emacs/ParEdit#toc1
and also this: https://www.gnu.org/software/emacs/manual/html_node/emacs/Choosing-Modes.html


I've installed necessary packages: emacs and emacs-paredit for scheme highlight and indentations. Also I configured to run always paredit in emacs:

$ guix package -i emacs emacs-paredit emacs-geiser

$ nano ~/.emacs
$ cat ~/.emacs
(autoload 'enable-paredit-mode "paredit" "Turn on pseudo-structural editing of Lisp code." t)
(add-hook 'emacs-lisp-mode-hook #'enable-paredit-mode)
(add-hook 'eval-_expression_-minibuffer-setup-hook #'enable-paredit-mode)
(add-hook 'ielm-mode-hook #'enable-paredit-mode)
(add-hook 'lisp-mode-hook #'enable-paredit-mode)
(add-hook 'lisp-interaction-mode-hook #'enable-paredit-mode)
(add-hook 'scheme-mode-hook #'enable-paredit-mode)

$ emacs ~/config-wpa-dhcp.scm.conf

But it not works only when file extension is .scm. For files .conf it did not highlight: http://0x0.st/zZQQ.png
For activating scheme-mode according to this manual https://www.gnu.org/software/emacs/manual/html_node/emacs/Choosing-Modes.html
need to add this string to the first line of file: ; -*- mode: Scheme;-*-
And this has gave me profit: http://0x0.st/zZQ3.png

Also, for automatically placing indentations I used M-q as Ricardo Wurmus said https://lists.gnu.org/archive/html/help-guix/2019-04/msg00040.html

In the attachment, my current config is.
My config.scm define 2 users: bob and mom, it also uses %desktop-services without NetworkManager but only wpa-supplicant and dhcp-client, also it enables touchpad tapping, and disable pcspeaker for not to beep when password is wrong in SLim, disables ideapad_laptop for prevent soft blocking of wifi card. Also it disables actions on closing notebook lid.

Attachment: config-wpa-dhcp.conf
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]