all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "(" <paren@disroot.org>
To: "Gottfried" <gottfried@posteo.de>, <help-guix@gnu.org>
Subject: Re: Guix SD and Emacs
Date: Wed, 23 Nov 2022 17:30:07 +0000	[thread overview]
Message-ID: <COJUQMFXUR79.EIUDL1W8UZR5@guix-framework> (raw)
In-Reply-To: <4e129781-8e73-09ff-f77f-0b151ecdc4fe@posteo.de>

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	other threads:[~2022-11-23 17:32 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-23 17:16 Guix SD and Emacs Gottfried
2022-11-23 17:30 ` ( [this message]
2022-11-23 20:25   ` Wolf
2022-11-23 21:47     ` Felix Lechner via
2022-11-23 22:29     ` (
2022-11-24  4:20     ` Akib Azmain Turja
2022-11-24  4:16 ` Akib Azmain Turja
2022-11-24 14:29   ` Gottfried
2022-11-24 14:33     ` (
2022-11-25  7:45     ` Akib Azmain Turja
2022-11-25 19:12       ` Gottfried
2022-11-30 21:46         ` Mekeor Melire

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

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

  git send-email \
    --in-reply-to=COJUQMFXUR79.EIUDL1W8UZR5@guix-framework \
    --to=paren@disroot.org \
    --cc=gottfried@posteo.de \
    --cc=help-guix@gnu.org \
    /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 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.