reddit / emacs

[Emacs] A full fledge configuration

Likhon-BaRoy · 2022-12-08 08:33
Likhon-BaRoy · 2022-12-08 08:46
Hey Folks, currently I'm trying to reduce my Emacs start-up time. And if you know way, please tell me how can i reduce the time on Start-up? https://github.com/Likhon-baRoy/.emacs.d
nv-elisp · 2022-12-08 09:00
Profile it. See where the most time is spent. Adjust if possible. Repeat. https://www.gnu.org/software/emacs/manual/html_node/elisp/Profiling.html
poinkalum · 2022-12-08 09:03
Do you have a link to the configuration file(s) so we can take a closer look ? In general, deferring the loading of packages, defining autoloads (see `use-package`'s documentation for the keywords that define autoloads) and conditional loading (with `:after` for instance) are low hanging fruits. Reducing the number of packages used too (but who would *want* to do that ? We want all features in the kitchen sink). You can also install doom Emacs and disable all modules, just to keep the core optimization for faster startup. Personally, I have \~200 packages configured in my vanilla configuration with a total startup time less than 3s. I could probably shave off some of it, but have decided to just bear with it instead of spending hours doing it.
Likhon-BaRoy · 2022-12-08 09:25
Here is my config https://github.com/Likhon-baRoy/.emacs.d Most of my configuration depends on init.el, my-lisp(dir) and early-init.el.
wakatara · 2022-12-08 09:36
Wow... this is nice. Trolling through your init.el to cadge stuff now... =\]
poinkalum · 2022-12-08 10:17
I agree with you. For startup profiling, `use-package-report` and [https://github.com/jschaf/esup](https://github.com/jschaf/esup) can help too.
grimscythe_ · 2022-12-08 10:23
This is a nice setup. My only pet peeve is Org mode's top level heading's low contrast. Keep up the good work!
lisploli · 2022-12-08 10:48
There was a thread about [garbage](https://www.reddit.com/r/emacs/comments/yzb77m/an_easy_trick_i_found_to_improve_emacs_startup/) the other day. Its collection does seem to have an impact on the topic, but it also appeared to be a controversial matter. That thread also has a link to further optimizations done in doom. Also, use-package seems to do a good job at deferring the loading of packages if you let it do its thing. I'm using emacsclient which starts pretty much instant.
hungry_m8 · 2022-12-08 11:45
is the transparency in the 4th pic just the background or the whole frame or a background wallpaper hack? i'd like to achieve something similar
Likhon-BaRoy · 2022-12-08 11:52
it just my desktop background wallpaper, and Emacs on this photo isn’t in full screen. So you got to see the sideways too.
Likhon-BaRoy · 2022-12-08 15:09
Thanks :)
IntelligentTea281 · 2022-12-08 15:39
https://www.youtube.com/watch?v=bF84mQMmfa8
ottersinabox · 2022-12-08 16:08
Honestly, I would run it in server-client mode if I were you. I never worry about startup time because it happens only when I start the computer up.
SaltyMycologist8 · 2022-12-08 16:17
emacs 29 is bringing true transparency! something to look forward to shoryly
Midnight1938 · 2022-12-08 16:55
Could you share that black hole emacs picture from the 5th pic?
[deleted] · 2022-12-08 17:25
[deleted]
Likhon-BaRoy · 2022-12-08 17:33
sure, why not ;) here you go : https://github.com/Likhon-baRoy/.emacs.d/blob/main/etc/banners/ue-colorful.png
Likhon-BaRoy · 2022-12-08 17:35
This one is with **megamacs** theme.
hungry_m8 · 2022-12-08 17:42
is it already there? i'm thinking of updating to emacs 29
ComprehensiveAd5882 · 2022-12-08 18:27
What is that dashboard?
Likhon-BaRoy · 2022-12-08 18:38
I customize the default ***Dashboard*** So, it *appear* like this.
SaltyMycologist8 · 2022-12-08 19:02
yep! something like this works for me for toggling between 100 and 96 transparency: ;; true transparency (set-frame-parameter nil 'alpha-background 100) (add-to-list 'default-frame-alist '(alpha-background . 100)) (defun toggle-transparency () "Toggle transparency." (interactive) (let ((alpha-background (frame-parameter nil 'alpha-background))) (set-frame-parameter nil 'alpha-background (if (eql (cond ((numberp alpha-background) alpha-background) ((numberp (cdr alpha-background)) (cdr alpha-background)) ) 100) '96 '100)))) (global-set-key (kbd "C-c t r") 'toggle-transparency)
[deleted] · 2022-12-08 19:56
[deleted]
Likhon-BaRoy · 2022-12-08 20:00
[extra Themes link](https://github.com/Likhon-baRoy/.emacs.d/tree/main/etc/themes)
sunnyata · 2022-12-08 22:39
I can't understand what stops people doing this.
terminal_cope · 2022-12-09 01:22
Why not both? I always use daemon mode but often like to clean things out and restart. e.g. I move off a set of projects and have a bunch of lsp servers running, I may as well just quit and start afresh. I also fire up new instances for new purposes (all as daemons).
Acebulf · 2022-12-09 03:23
I don't care to do it, I rarely open my editor. Keep it open most of the time.
sunnyata · 2022-12-09 06:44
> clean things out and restart Is that a psychological thing? What difference does it make?
Crash_Test_Mummy · 2022-12-09 07:56
Does Emacs not just randomly crash on other people? I feel like I've tested every enabled minor mode and I'll get very inconsistent crashes. Here are some things that crash: * Selecting a region in org * Scrolling with mouse * Highlighting flyspell / fly check errors (yellow squiggles) with mouse * Resizing windows * Hitting C-s in *compilation* buffer sometimes? The list goes on. I've replicated these bugs on "emacs -q". Server mode won't fix me needing to restart emacs. Edited formatting.
sunnyata · 2022-12-09 08:52
Nope I can honestly say I don't remember the last time it crashed on me. I use it quite heavily (programming in various languages, compiling big LaTeX documents) but my setup is very stable and I don't add packages that often.
xenodium · 2022-12-09 10:12
Nice banners. Just gave one a try and posted on fediverse [https://indieweb.social/@xenodium/109483107451615546](https://indieweb.social/@xenodium/109483107451615546).
Likhon-BaRoy · 2022-12-09 10:28
Wow Cool 🗿
terminal_cope · 2022-12-09 12:07
As I said, I often have a bunch of projects with lsp servers running. I could go around killing then all, or I could just restart. My work laptop has 16Gb, and it's pretty easy to get to swapping territory.
sunnyata · 2022-12-09 12:09
Thanks, I downvoted myself because I didn't read your post properly :)
oantolin · 2022-12-09 13:14
I don't think Emacs has ever crashed for me.
itistheblurstoftimes · 2022-12-09 16:50
Only crash I've had has been self-induced
cat-head · 2022-12-10 13:20
Sometimes emacs hangs and you have to kill it. If I'm working on two different projects at the same time (some times it's more like 10), and the server hangs, then I have to kill everything which can be terrible if a long ESS process is running and I could lose weeks of work. It's really not usable for me. My current init-time is ~ 0.7 seconds. It's much better to just start a new emacs instance each time.
cat-head · 2022-12-10 13:21
It hangs on me some times yes. I have to assume people who use it in server mode do not do any sensitive work in it simultaneously.
Likhon-BaRoy · 2022-12-12 01:24
Wow that's great 😱 Can you please share your configuration 🥹
[deleted] · 2022-12-12 01:54
[removed]