rajivr has joined #nixos-emacs
bqv has quit [Ping timeout: 260 seconds]
bqv has joined #nixos-emacs
cole-h has joined #nixos-emacs
cole-h has quit [Quit: Goodbye]
<bqv> rajivr: I have a function to do it
<joesventek> bqv, I'm currently in the process of migrating my emacs configuration to nix and have similar files to yours where I put elisp in nix files. How do you edit the elisp in your startup-pre, package-init, ... attributes?
<joesventek> Do you have any convenience functions to edit those in separate elisp buffers?
<joesventek> I imagine something like org-mode does for babel src blocks
<bqv> joesventek: my which attributes now?
<bqv> Everything emacs I have is in ./emacs
<bqv> Except the init.el prelude
<bqv> Yeah, that's the only part that isn't in ./emacs
<bqv> The rest, my actual config, is those files in ./emacs
<joesventek> OK. But how do you edit that when you need to make changes?
<bqv> In emacs you mean?
<joesventek> Yep
<bqv> I use poly-mode
<bqv> ./emacs/poly-mode.nix
<joesventek> Never heard of that. I will have a look.
<joesventek> Thank you
<bqv> Np
<rajivr> bqv: Thanks for the pointer. :-)
<NobbZ[m]> joesventek: I played with polymode, though it wasn't perfect as there wasn't anything in nix syntax I could have used to properly distinguish between embedded languages.
<rajivr> joesventek: Take a look at separedit. That is what I am using. https://github.com/bqv/nixrc/blob/live/users/editors/emacs/init.nix#L21
<antifuchs> you might be able to use the `;;; -*- mode-name -*-` header that emacs supports as a language indicator...
<rajivr> Sorry, pasted the wrong link. https://github.com/twlz0ne/separedit.el
<joesventek> antifuchs, that was my idea as well. You can't mix different embedded languages in a single nix file then though. But I guess that would not be too bad.
<antifuchs> oh, I meant in the snippets!
<antifuchs> like, `foo = '' ;; -*- emacs-lisp -*- [...]`
<joesventek> Oh. I'm not sure that would work? (I have no idea how polymode works)
<joesventek> rajivr, I'll have a look at separedit as well. Thanks.
<antifuchs> (would need custom regexes, for sure, but I think this would be an easy way to get multiple languages recognized. separedit is quite good though, I use it heavily for editing rust documentation in a second buffer (:
<adisbladis> bqv: I'm kind of considering stealing that function and always include it in closures produced by emacsWithPackagesFromUsePackage closures
<adisbladis> Gah, redundant "closures"
<adisbladis> But you get it :)
<adisbladis> Maybe it would be better to spawn a new emacs in batch mode and copy load paths from that one?
<NobbZ[m]> Yes, I actually used a comment introducing the language, though that made those comments spread through all my config places, which I didn't like.
neeasade has joined #nixos-emacs
cole-h has joined #nixos-emacs
rajivr has quit [Quit: Connection closed for inactivity]
<bqv> Heh
neeasade has quit [Remote host closed the connection]
cole-h has quit [Quit: Goodbye]
neeasade has joined #nixos-emacs