emacs thread

Anything and everything.
Post Reply
User avatar
willow
entrant
Posts: 9
Joined: Sat Apr 27, 2024 7:45 pm
Location: connecticut
Contact:

emacs thread

Post by willow »

are any of the paraloguers emacs users? do you use org-mode? do you do anything unique with it?

if you've never really given it a good go, i really highly recommend everyone lives in it for a month to see what the fuss is about.

my history with emacs
i've had a whole journey with text editors in my life. maybe this will be better as a blog post but i'll keep it here for completness so you all know where i'm coming from.

when i started using linux in 2012, i learned how vim worked. at some point in 2017 i decided to learn how to use emacs with evil mode since apparently it was very similar. i stuck with it for about a year, taking notes in org for my college courses along the way, but my 1000+ LOC config really really slowed it down, so i moved back to neovim.

in around 2021 my friend was telling me about how he started using DOOM emacs. the selling point was that it was all pre-configured to do exactly what i wanted it to do, with evil-mode (the emacs vim emulation layer) setup to work seamlessly everywhere. when i tried it out, i found that i really liked it too!

for a few years i used it with some minimal configuration to optimize note writing and integrate better wish the other software i used. it worked pretty great to be honest. but then i tried kakoune and found that i much preferred its modal editing to vim's...

but but! then i wanted to know what the whole deal with alternative keyboard layouts was. i switched to colemak-dh and really liked it, except for the problem that hjkl-oriented editors don't really make any sense on non-qwerty boards. that's what roped me back into emacs (again)

so i started using doom emacs again without the evil-mode module enabled. it was... alright... but i really missed modal editing. luckily emacs users are as deranged as i am, and someone created meow which seemed like a perfect mesh of the editing powers of kakoune and seamless integration with emacs packages.

today
i ended up switching to the guix system as my main linux distro. with this change, i decided to scrap DOOM and implement only what i needed using guix to manage dependencies. now, my config is way smaller than it was in 2017 and way more organized thanks to use-package.

it's great. all of the documentation for my operating system is available through it as an interface. i can read man pages and the guix manual without having to open up a browser. i even downloaded an info version of SICP to read through that inside of emacs if i wanted.

i want to get way more into org-mode in general at this point. i've always struggled with finding a way to keep up with taking notes in systems like org-roam, but i think i just need to get back into the swing of it.
User avatar
watermoon
eternement hana
Posts: 69
Joined: Mon Apr 29, 2024 6:21 pm
Location: Dream Land Colony

Re: emacs thread

Post by watermoon »

emacs is… one of those things i really wanted to love, and tried to love. i love the idea of big, learn-once do-everything software (see how i took to obsidian), and i was hoping that it could be the end of my text editor discontent. and because spacemacs looked pretty, i picked it up and worked with it, learning modal editing along the way. in time i switched to doom because spacemacs' layering over emacs' native features felt like it was getting in the way, so if something wasn't working, it was hard to tell where the problem was.

it's also interesting that you mention using alternative keyboard layouts with modal editing. i picked up dvorak in my teens and stuck with it, believing that it'd make me a l33t typer and save my hands years down the line, though neither of those came to fruition. still, it's comfy.
vi commands are a bit weird under dvorak, but not unusable – the biggest change is that movement is split between your hands (down-up on the left hand, left-right on the right) instead of all fitting into the right hand. i actually really liked that, and incidentally, it was playing around with emacs meow later on that made me start thinking about, if i wanted to design my perfect emacs bindings, how i'd want it to feel…

⚠️ WARNING! ⚠️ this not just evil, but unholy. this is legally classified as obscenity and you are afforded no legal protections if possessed or used. you could probably write a callout post about me for having this in my config.

Code: Select all

;;;;;;;;
;; navigation with [euht] and its consequences
(map! :nvm "t"   #'evil-forward-char
      :nvm "e"   #'evil-next-visual-line
      :nvm "u"   #'evil-previous-visual-line
      :n   "U"   #'evil-undo
      :n   "R"   #'evil-redo     ; at this point am i just making my ideal vim?
      :nvm "L"   #'evil-end-of-line
      :nvm "l"   #'evil-end-of-visual-line
      :nvm "J"   #'evil-beginning-of-line
      :nvm "j"   #'evil-first-non-blank-of-visual-line
      :nvm "E"   #'evil-forward-word-end        ; changed from WORD-end
      :n   "k"   nil    ; TODO
      :n   "q"   nil    ; i'm too clumsy for macros
      :i   "C-y" #'yank
      :n   "C-r" #'evil-replace-state)
;; convenient-ish insert escape
(setq! evil-escape-mode t
       evil-escape-delay 0.10
       evil-escape-key-sequence "a-"
       evil-escape-unordered-key-sequence t)
(or in other words, left middle and index fingers move the cursor down and up, right index and middle fingers move the cursor left and right)
still, this feels right to me, and i've since replicated it within vim and obsidian and ranger and everywhere i have the chance. and can something really be wrong if it feels so right?

org-mode always seemed useful though i never found a good way to incorporate it into my workflow. i took to org-roam a lot more though, and it was what convinced me to take the next step in overhauling my personal notebook. i ended up bouncing off it a year or so later once i tried obsidian, though there are still some features (like being able to treat a heading like a unique note with its own tags) that i wish obsidian could somehow have.

and then, once i wiped and reinstalled everything late last year, i never got around to setting up emacs for it again. it could be because i didn't want to put the time into installing or updating doom, or also because i don't program much at all these days, and most of what i do is just editing individual scripts. i downloaded nvim and installed lunarvim over it to see how that works as a substitute, though i don't really like it all that much… so maybe i should go back to doom…
Image
User avatar
willow
entrant
Posts: 9
Joined: Sat Apr 27, 2024 7:45 pm
Location: connecticut
Contact:

Re: emacs thread

Post by willow »

whoa that's a wild thing to do with vi.

i'd never really considered changing the stock vi keybindings because it seemed like way too much stuff revolves around them being the stock ones. does it work well? or do you end up having to rebind the whole world?

now that i think about it, i never really even tried myself. i just kind of assumed it wouldn't work very well at all.

re: org-roam, i read the other threads about your note taking knowledge base stuff and frankly i'm jealous that you found anything that works well for you haha. i don't think it's really worth getting hung up too much on the tools. i just figure that if i'm going to be living in emacs for everything else anyway i may as well merge a note taking system into it.
User avatar
watermoon
eternement hana
Posts: 69
Joined: Mon Apr 29, 2024 6:21 pm
Location: Dream Land Colony

Re: emacs thread

Post by watermoon »

i guess a barebones vimrc with just the motion keys rebound clocks in at 9 lines? and then my full doom bindings config file is a fair bit longer because i wanted to implement them for all the modes i cared about, as best as i could. i never got all the bugs worked out there, though.
and aside from those, i guess everything else feels intuitive enough to not bother changing. the insertion commands (a, o, i) are right on the home row in the left hand, c and r are right next to each other on the right hand, and b and w are pretty close to each other on one hand too. there are a few features that i had to sacrifice this way, and i chose to sacrifice a couple more to have j and l be beginning / end of line instead of 0 and $, but it really doesn't feel all that alien at all.
(then again, i first learned vi while using dvorak, so i have zero frame for reference for how qwerty vi ought to feel. but looking at cheatsheets, i can't help but feel like that's the alien and arbitrary one at this point)

and yeah, i'm a believer that the most important notetaking tool is the one you'll actually use, which oftentimes is the one that provides the least friction between having the thought and writing the note down. and if you're already using emacs for everything else then using it to write your notes just makes perfect sense. it'll be a few hundred notes before you get to the point where you'll need to start caring a little about organization, and a few thousand notes before you'll need to start caring a lot.

also this thread inspired me to reinstall doom and god i forgot how much i missed this…
Image
User avatar
watermoon
eternement hana
Posts: 69
Joined: Mon Apr 29, 2024 6:21 pm
Location: Dream Land Colony

Re: emacs thread

Post by watermoon »

i think i have a problem. genuinely, seriously.
or maybe i just can't help myself from trying things, just to see what would happen – or if anything would happen.

anyway greetings from emacs-w3m
Attachments
Screenshot_20240824_225013.png
Screenshot_20240824_225013.png (1.02 MiB) Viewed 80 times
Image
User avatar
sinku
assailant
Posts: 71
Joined: Mon Apr 29, 2024 6:42 pm
Location: MIT dataphone PBX
Contact:

Re: emacs thread

Post by sinku »

I have a history with emacs that led me to explore the content it was shipped with which eventually ended with loading my entire custom config into the custom.el gui. That was the last big thing i ever did with it. I really love its menus and customization gui too, and im curious what keeps people away from using it. Is it a sense of control? Or assuredness of nothing being set that you didnt set yourself? Or enjoyment of housekeeping a digital object?
are the party rockers in the room with us right now?
User avatar
willow
entrant
Posts: 9
Joined: Sat Apr 27, 2024 7:45 pm
Location: connecticut
Contact:

Re: emacs thread

Post by willow »

sinku wrote: Wed Aug 28, 2024 2:32 pm ...and im curious what keeps people away from using it
it's a few things. when you write everything in your init.el it's more easily portable to other systems. you don't need to manually reinstall every external package if you manage it all in a bunch of (use-package) blocks. and if you're using use-package, it also provides a really easy way to edit all of the custom variables at the same time as reducing load time by lazy loading everything as needed.

it's also an organizational thing. if you're using customize and you want to touch your init.el to add some extra elisp or define functions that you can't do with customize, your config becomes split into a text-editable file and a file that emacs will modify as it sees fit. it can get a little annoying to try and remember which system you used for what.

there's also a ton of stuff you can do in the init.el that you can't do in customize in general. below is a code block that initializes the elpaca package manager on non-guix system

Code: Select all

(unless guix-p
  (progn
    (load (concat user-emacs-directory "site-lisp/elpaca-bootstrap.el"))
    (when (eq system-type 'windows-nt)
      (elpaca-no-symlink-mode))
    (setq use-package-always-ensure t)
    (elpaca elpaca-use-package
            (elpaca-use-package-mode))))
to be honest, i haven't really ever tried customize out too much but i don't know how i could accomplish something like this in it. i can't imagine it's possible or as easy as writing it in the init file.
User avatar
sinku
assailant
Posts: 71
Joined: Mon Apr 29, 2024 6:42 pm
Location: MIT dataphone PBX
Contact:

Re: emacs thread

Post by sinku »

willow wrote: Wed Aug 28, 2024 11:34 pm when you write everything in your init.el it's more easily portable to other systems. you don't need to manually reinstall every external package if you manage it all in a bunch of (use-package) blocks.
because my main concern when using emacs wasnt reproducibility across systems, or specializing emacs setups to different machines, im not in a place to talk about ways of doing it. however custom.el does a bit for you regarding this. for clarity: my last init.el was:

Code: Select all

(add-to-list 'load-path "~/.emacs.d/elisp/")
(setq custom-file "~/.emacs.d/custom.el")
(load custom-file)

(require 'sink-bd)
(require 'skel-closet)
(require 'mouse3)
(require 'visual-replace)
(add-hook 'org-mode-hook 'org-superstar-mode)
(require 'buffer-menu)
It loaded some of my own code packages I couldn't pull from M/ELPA which lived in elisp/, and did a little bit of customization i couldn't do in custom.el. everything else lived in custom. custom actually keeps a copy of package-selected-packages which package.el maintains. so when you move to a new system either you would call package-install-selected-packages and everything would be reinstalled. I'm tempted to try it to see if its smooth or not.

I sidestepped the problem of not knowing what was managed by which system by keeping an implicit seperation of powers i suppose, where init.el was for stuff i installed by hand or wrote myself, or couldn't directly manipulate in custom, and custom was for packages. sink-bd.el had a lot of customization in it that i simply couldn't migrate to customize. so i pulled it all out of init and made a mode.

to me, in my experience, keeping a stacked init.el was definitely more granular, which felt more organized and controlled; for many, that is exactly what they need. but i think i found myself feeling like it was illusory. i think im the paradoxical emacs minimalist that likes a tiny little init and a bunch of my own code and utilizing everything emacs already has unless it really, seriously, doesnt do what i need it to. for example if I were going back to emacs now, I might not use mouse3 because it has better mouse menu stuff now, afaik. I'd just keep a mode of my own mouse menu customization shit loaded as a hook that i presumably can't do in customize. unless, i can do it there, in which case I will.
are the party rockers in the room with us right now?
Post Reply