help-guix
[Top][All Lists]
Advanced

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

Re: Guix SD and Emacs


From: (
Subject: Re: Guix SD and Emacs
Date: Wed, 23 Nov 2022 17:30:07 +0000

Heya,

On Wed Nov 23, 2022 at 5:16 PM GMT, Gottfried wrote:
> I have got a hidden directory (or should I say "folder"?) in my user 
> directory: .emacs.d
> and a hidden file: .emacs
>
> David Wilson proposed:
> ~/.config/emacs/init.el - Follows Linux desktop environment guidelines 
> (recommended on Linux!)
> This means to create a directory "emacs" in /.config directory

~/.config/emacs/init.el is best, but *if you have a .emacs.d or a .emacs,
it will not be read*, so you need to do this:

  mv .emacs ~/.config/emacs/init.el
  mv .emacs.d/* ~/.config/emacs

(careful your .emacs isn't overwritten with .emacs.d/init.el when using
these commands)

> If I have questions about emacs where can I ask?
> Guix help is for Guix, but where can I ask for emacs questions?
>
> There won't be probably not many, but when I have time, I am working on 
> setting up my emacs and am starting to use it more often.

All the GNU mailing lists can be found here:

[list of GNU lists] <https://lists.gnu.org/archive/html>

It shows that a help-gnu-emacs mailing list exists:

[help-gnu-emacs archives] <https://lists.gnu.org/archive/html/help-gnu-emacs>
[help-gnu-emacs subscribe page] 
<https://lists.gnu.org/mailman/listinfo/help-gnu-emacs>

> in my created init.el file which I put into the directory /.emacs.de
>
> for learning I added:
>
> ;; Display line numbers in every buffer
> (global-display-line-numbers-mode 1)
>
> When I press C+M x with the cursor between these lines there appear the 
> line numbers immediately.
>
> When I close emacs and open it again the lines don't appear.
> This means that my init.el file is not read.
> How can I configure this, so that everything I put into my init.el file 
> will be recognised, when starting emacs?

Probably because you already have a .emacs. Emacs prioritises reading the
.emacs file over .emacs.d/init.el, and .emacs.d/init.el over
.config/emacs/init.el. If you want to use .emacs.d/init.el, you need to
make sure there's no .emacs.

> I choose the "misteriose-theme.el (on the startup screen: "customize 
> startup")
> it created a "misterios-theme.el" file in my /.emacs.d directory.
> I thought it should go to the init.el file, which I have created later.
> Can I copy the content of this file into the init.el file?

You don't want to do that. It's an autogenerated file, and you should
keep those in separate files, in my opinion, so that you don't
accidentally modify things that should not be modified :)

That's why I use this code to redirect all custom customisations into
~/.config/emacs/custom.el:

  (setq custom-file
        (concat (or (getenv "XDG_CONFIG_HOME")
                    (concat (getenv "HOME") "/.config"))
                "/emacs/custom.el"))
  (load custom-file)

> (custom-set-variables
>   ;; custom-set-variables was added by Custom.
>   ;; If you edit it by hand, you could mess it up, so be careful.
>   ;; Your init file should contain only one such instance.
>   ;; If there is more than one, they won't work right.
>   '(ansi-color-faces-vector
>     [default default default italic underline success warning error])
>   '(ansi-color-names-vector
>     ["#2e3436" "#a40000" "#4e9a06" "#c4a000" "#204a87" "#5c3566" 
> "#729fcf" "#eeeeec"])
>   '(custom-enabled-themes '(tsdh-dark whiteboard))
>   '(font-use-system-font t))
> (custom-set-faces
>   ;; custom-set-faces was added by Custom.
>   ;; If you edit it by hand, you could mess it up, so be careful.
>   ;; Your init file should contain only one such instance.
>   ;; If there is more than one, they won't work right.
>   '(default ((t (:family "DejaVu Sans Mono" :foundry "PfEd" :slant 
> normal :weight normal :height 120 :width normal)))))
>
> Probably it was created, when I choose the new theme.

Yes, it was. If you decide to do the custom-file redirection above,
you should move this code into ~/.config/emacs/custom.el.

  -- (



reply via email to

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