reddit / emacs
How many lines are in your .emacs file?
DiamondDemon669 · 2022-04-17 08:47
for me it is 65 (excluding commments and whitespaces).
and yet when I launch emacs everything I need just pops out ready to go.
Horrih · 2022-04-17 08:58
Getting close to 1000lines, with ~25 packages installed + as many as dependencies.
Still loads in 1sec thanks to lazy loading
Emacs is rather fast !
DiamondDemon669 · 2022-04-17 08:59
unless you are loading python or eww, yes
akirakom · 2022-04-17 10:09
I have 194 packages (including implicit dependencies) in 1919 lines (when tangled) of init.el.
osherz5 · 2022-04-17 10:54
Unfortunately it's not that fast for me as a Windows user, especially when trying to use magit :<
XCapitan_1 · 2022-04-17 11:02
My `Emacs.org` is 6779 lines (6047 without empty lines). The tangled `init.el` is 4629 (4063) lines.
And my EXWM config takes 1375 lines in a separate file, also tangled to 533 (459) lines.
So that's a lot, I guess.
PawarShubham3007 · 2022-04-17 11:18
Daam. Does your emacs also makes a coffee for you... lol
loskutak-the-ptak · 2022-04-17 11:47
2988 lines + another 1875 lines of my various packages (+ 164 external packages). Loading time is not much (maybe 3s?), followed by a minute or so of loading the desktop.el (currently 214 file buffers). I start emacs daemon maybe once a week, so these times just do not matter. :)
thisadamis · 2022-04-17 11:49
op can we see your config?
DiamondDemon669 · 2022-04-17 11:51
214? why do you need that many files opened at startup
redguardtoo · 2022-04-17 12:01
About 10000 lines, 296 packages.
akirakom · 2022-04-17 12:35
The init time is around 0.25 sec on my new i5 12400 + nVMe SSD Linux machine.
fabianmg · 2022-04-17 12:41
Agree, I use it on windows and Linux because I don't have any other choice ( work ) and on windows is slooooow loading.
XCapitan_1 · 2022-04-17 13:09
[Maybe some day](https://github.com/purplg/hass)
PawarShubham3007 · 2022-04-17 13:11
Wtf!? I was only joking, some people are serious. All hail emacs
7890yuiop · 2022-04-17 13:59
That's just how many files they had open during the previous session. A couple of hundred isn't that many. Emacs sessions might easily last for weeks or months, so these things accumulate.
oantolin · 2022-04-17 14:04
I've said it before and I'll say it again: that package should have a nice avocado logo.
DPaluche · 2022-04-17 14:36
700ish
loskutak-the-ptak · 2022-04-17 14:44
exactly. I don't need all of them opened, but they just accumulate. I almost never close them, because closing them is extra work and there is just no point in doing that in my usual emacs use.
Rotatop · 2022-04-17 14:52
Doom emacs + 600 custom lines
tazjin · 2022-04-17 15:07
/d/u/t/emacs ((43df26ea…))> tokei
===============================================================================
Language Files Lines Code Comments Blanks
===============================================================================
Emacs Lisp 10 1467 957 221 289
Markdown 1 7 0 5 2
Nix 1 177 147 19 11
===============================================================================
Total 12 1651 1104 245 302
It lives [here](https://cs.tvl.fyi/depot/-/tree/users/tazjin/emacs).
fragbot2 · 2022-04-17 15:24
167 lines with most of it setting up org/org-roam.
super-linux-nerd · 2022-04-17 15:36
About 500 lines including comments and whitespace, between `early-init.el` and `init.el`
I have 9 external packages, all except magit are pulled from ELPA.
I've been trying to replace vertico with icomplete, but it's just too good. Sane defaults and great performance especially over TRAMP.
Load time on my desktop is 300ms, on my weak laptop it's 400ms. Pretty happy camper!
bravosierrasierra · 2022-04-17 16:10
in my literate emacs config 25858 lines
ieure · 2022-04-17 16:13
My `~/.emacs.d/init.el` has five lines, excluding two blank lines and one comment.
But that just bootstraps the main config, which is split into pieces that get `require`'d. That stuff is a bit north of 3kLOC (according to sloccount). Most of that is customization, I don't use many packages. Perhaps 50-60, less if you count ones I wrote for myself.
I have been using Emacs a very long time.
karthink · 2022-04-17 16:41
$ cloc --vcs=git ~/.emacs.d
-----------------------------------------------------------------
Language files blank comment code
-----------------------------------------------------------------
Lisp 71 2382 4842 15887
-----------------------------------------------------------------
SUM: 71 2382 4842 15887
-----------------------------------------------------------------
Does not include the 178 installed packages, which are about 355,000 lines of Elisp. The configuration in this form is about ~16 years old, although I reorganized it a few years ago.
EDIT: The boot time is about 0.20-0.25 seconds, effectively instant since most features are loaded on demand. Still slower than `emacs -q` though.
takeonrules · 2022-04-17 17:07
I have a quasi-literate config:
❯ tokei
==================================================
Language Files Lines Code Comments Blanks
==================================================
Emacs Lisp 3 81 36 40 5
Org 11 6534 5401 9 1124
Ruby 1 15 13 0 2
==================================================
Total 15 6630 5450 49 1131
==================================================
xtifr · 2022-04-17 19:40
I've been using Emacs for over 20 years, and the number of non-comment, non-whitespace lines in my init file is currently...49!
Yes, it used to be *much* larger. Some of the reasons it's not any more:
* I have a separate custom.el file for settings made through the customization system, and I try to use customization as much as possible, because, well, when I started, the idea of a program--especially a free/open-source program--that you could customize *interactively* was pretty impressive. Not *having* to *manually* edit config files for at least *one program* was, frankly, awesome! (And an *easily extensible* customization system that works for plugins and add-ons is still pretty impressive.)
* All the packages I use are included as part of my operating system, so I don't need to download them separately. And, thanks to Emacs's amazing *extensible* customization system, I don't need to *configure* them in my init file either! :)
* The more I've gotten used to the way Emacs does things, the less I've needed to configure it to work like other systems I used to use. I have, over the years, probably thrown out hundreds of lines of "act like this other editor" code in my Emacs configs.
char1zard4 · 2022-04-17 20:01
Vanilla emacs, 442 with whitespace and comments, probably 400 without. Recently rewrote the whole thing using use-package and compiled the init file, startup is 0.8s on my machine (according to “emacs-init-time”)
draxil · 2022-04-17 20:35
Not many, but then it's only job is to load all the module files deeper in my .emacs.d
yep808 · 2022-04-18 01:11
Around 1000.
BunnyLushington · 2022-04-18 02:13
>(according to “emacs-init-time”)
Well hey, I learned about a new function today!
sebhoagie · 2022-04-18 04:07
Try the integrated vc-mode, even on Linux I still use it.
Unless you need to rebase or some other more advanced case, just for commits and pushing/pulling it is more than enough.
dixieStates · 2022-04-18 04:09
$ wc -l ~/.emacs
747 /home/lee/.emacs
DrReadIt · 2022-04-18 04:17
Because Windows Forks things up.
recencyeffect · 2022-04-18 09:01
On windows it seems any file access is slow - magit, dired, file autocompletion, etc. Quite unfortunate because i use it at work a lot.
recencyeffect · 2022-04-18 09:04
Took me a while to understand this, was trying to keep a "0 inbox" at first. Then realized it is pointless, especially with projectile and other plugins.
oantolin · 2022-04-18 13:50
I have 3720 lines in [my configuration](https://github.com/oantolin/emacs-config). I try to write as much of it as tiny packages that I configure with `use-package`, just like I do for external packages. (I highly recommend this form of organization) Many of these are only useful to me, but some would be very reasonable to steal, like:
- `eval-region-advice`, which advises `eval-last-sexp` and `eval-defun` to call `eval-region` instead if there is an active region (this should be built-in, if you ask me).
- `block-undo` which makes undo treat each run of a keyboard macro a single undoable operation (also should be built-in if you ask me).
- `shr-heading`, for navigation by heading in eww and elfeed-show buffers.
- `visiting-buffer`, which if you delete or rename a file with a corresponding buffer, deletes or renames the buffer too; and in the rename case for an Emacs Lisp file handles changing the file name in the header line and in the `(provide '___)` statement.
- `ffap-eshell`, which improves ffap's guessing of which directory a file found in an eshell buffer is in.
- `webjump-extras`, which configures `webjump` to include all your eww bookmarks.
Several of those are real tiny, easy to just chuck in to your config even if you prefer a monolithic `init.el` or `init.org`.
My configuration would be twice as big if I hadn't published [Embark](https://github.com/oantolin/embark) as a package, which is 4100 lines (Embark has had many cool contributions from other users, but except for minad no-one has contributed a large number of lines, so I've probably still written more than 75% of the code currently there). Embark's default configuration is, with very few exceptions, just the portion of my personal Embark configuration that deals with built-in Emacs packages. 😛
republic_of_mao · 2022-04-19 06:05
> "act like this other editor"
There are other editors?
dpassen1 · 2022-04-20 03:01
==============================================================================
Language Files Lines Code Comments Blanks
===============================================================================
Emacs Lisp 2 258 199 8 51
===============================================================================
a-c-d-w · 2022-04-22 19:02
Running this command
total=0;
rg --ignore-file=.gitignore --files | \
while read file; do
nl=$(grep -I -v '^[ ]*;' "$file" | \
grep -v '^[ ]*$'|wc -l);
total=$((total + nl));
echo "$file $nl $total";
done;
in `~/.emacs.d` gives me the following:
eshell/aliases 4 4
README.md 1 5
ponder.png 0 5
machines/windows-nt.el 11 16
machines/larry.el 8 24
machines/gnu-linux.el 1 25
machines/bob.el 26 51
early-init.el 83 134
lisp/+setup.el 147 281
lisp/+chicken.el 12 293
lisp/+expand-region.el 10 303
lisp/+circe.el 213 516
lisp/+eww.el 50 566
lisp/+shr.el 38 604
lisp/+emacs.el 252 856
lisp/+casing.el 66 922
lisp/+init.el 72 994
lisp/+minibuffer.el 7 1001
lisp/+org-drawer-list.el 31 1032
lisp/+jabber.el 176 1208
lisp/+vertico.el 14 1222
lisp/+embark.el 15 1237
lisp/+straight.el 31 1268
lisp/+elisp.el 10 1278
lisp/acdw.el 335 1613
lisp/compat.el 12 1625
lisp/+avy.el 10 1635
lisp/+org.el 444 2079
lisp/+crux.el 46 2125
lisp/system.el 121 2246
lisp/+tab-bar.el 246 2492
lisp/+bongo.el 44 2536
lisp/+consult.el 36 2572
lisp/+key.el 68 2640
lisp/+util.el 67 2707
lisp/reading.el 62 2769
lisp/+god-mode.el 10 2779
lisp/+browse-url.el 108 2887
lisp/+Info.el 8 2895
lisp/+ispell.el 70 2965
lisp/elephant.el 46 3011
lisp/+elfeed.el 145 3156
init.el 2081 5237
lisp/private.el 7 5244
lisp/+ace-window.el 23 5267
lisp/+scratch.el 19 5286
lisp/+kmacro.el 47 5333
lisp/+mwim.el 30 5363
lisp/+hideshow.el 30 5393
lisp/+finger.el 28 5421
lisp/+slack.el 15 5436
lisp/+sly.el 9 5445
lisp/+cus-edit.el 57 5502
lisp/+xkcd.el 7 5509
lisp/dawn.el 48 5557
lisp/+ecomplete.el 32 5589
lisp/+orderless.el 36 5625
lisp/+emms.el 34 5659
lisp/+apheleia.el 8 5667
lisp/+vterm.el 10 5677
lisp/+ytdious.el 11 5688
lisp/+lisp.el 163 5851
lisp/+eshell.el 96 5947
lisp/+modeline.el 345 6292
lisp/+dired.el 12 6304
lisp/+flyspell-correct.el 14 6318
lisp/+notmuch.el 45 6363
lisp/gdrive.el 62 6425
lisp/+message.el 14 6439
lisp/+link-hint.el 129 6568
lisp/compat/keymap.el 465 7033
snippets/fundamental-mode/gpl3 556 7589
snippets/emacs-lisp-mode/+feature 6 7595
lisp/+pulse.el 36 7631
lisp/+org-capture.el 126 7757
lisp/+org-attach.el 16 7773
lisp/user-save.el 77 7850
lisp/compat/tab-bar.el 2062 9912
lisp/+zzz-to-char.el 6 9918
snippets/sh-mode/getopts 10 9928
snippets/scheme-mode/chicken 8 9936
snippets/org-mode/sc 4 9940
So ... **9940** lines. Of course, this doesn't include my work-related functionality or other private stuff in my Syncthing directory...