reddit / emacs
Is it possible to build emacs without gnus and other packages?
Hastrack · 2022-04-01 15:41
I don't use a lot of builtin packages and gnus is one of them because I don't even use internet with emacs, so how I should go about building it if there is a way to do so?
big_lentil · 2022-04-01 17:35
To build emacs from source you run a configuration script first and give it as args the stuff you want to include/exclude in the build. Generally the syntax is like --with-something or --without-something. So to do this (I assume) you'd have to pass --without-gnus to the config script and then run make.
fragglestickcar0 · 2022-04-01 17:40
Clone the repo from savannah, and follow the INSTALL.REPO but *before*
you run `make install`, do a `rm -rf lisp/gnus`.
This saves you 5MB of diskspace, which when you consider the cost of
storage, can be a make-or-break maneuver. More importantly, it removes
a stain from emacs that is as unusable now as it was when it first
stultified users in the early 90s. I'm only kidding in one of the
preceding sentences.
In related news, I also recommend gutting your catalytic converter.
Should give you an epsilon horsepower bump at the negligible cost of
violating emissions laws.
Lord_John_Marbury · 2022-04-01 18:00
But tell us, how do you really feel?
arthurno1 · 2022-04-01 18:09
> I don't use a lot of builtin packages and gnus is one of them
Gnus is implemented in Lisp, so it is just a Lisp library. Emacs has lots of other libraries which you probably don't use. I believe you can delete Gnus, but you don't really get anything with this, a few megabytes of hard drive space, which is nowadays really cheap. You are also running the risk of something somewhere, maybe some 3rd party package, requiring something from Gnus which will then be failing, giving you just a headache. You probably don't use rmail, games, and I don't know what else. It really is not worth spending your time to get rid of those.
When it comes to support of 3rd party libraries, you can remove that support when you configure Emacs. Run ./configure --help to see options, and configure Emacs without stuff you don't need. I used to build Emacs without Gtk and some other stuff I don't use, which game insignificantly smaller executable, but the startup time went from 0.5sec, to 0.2 sec (for vanilla Emacs with -Q option). But it was very ugly Emacs with unusable menus on my 4k screen.
7890yuiop · 2022-04-01 22:52
Gnus is elisp.
7890yuiop · 2022-04-01 22:58
You can remove anything you want before building, but there's really no reason to do so unless you desperately want to free up a tiny amount of disk space. Aside from defining a few autoloads, Emacs isn't loading anything you're not using.
justin473 · 2022-04-02 02:56
What is your concern? It takes disk space but isn’t loaded unless you use it (“Loading gnus…”).
aqezz · 2022-04-02 03:33
What a great word.
ndamee · 2022-04-02 06:12
They are loaded on demand, so if you don't use them they are not loaded.
holgerschurig · 2022-04-02 13:28
You can, but this is pointless.
If you don't (require 'gnus) and you don't use one of it's auto-loaded functions, it won't be loaded.
You can look which packages are loaded by calling `C-h v features`.
ndamee · 2022-04-02 20:22
I don't use the "vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms hebrew greek" etc. languages, yet they are apparently loaded.
holgerschurig · 2022-04-03 12:06
gnus is not for language support, but for network news and e-mail.
7890yuiop · 2022-04-03 15:11
Although there are indeed per-language features, this is a very different situations to that of Gnus. I think this question is a little bit like saying "I never use the colour yellow, so why does Emacs load support for yellow alongside all the colours I do use?"
Emacs includes some basic definitions for supporting many human languages, and these are pre-loaded in the executable.
onetom · 2022-04-04 06:18
Another benefit of removing some bigger, built-in packages, which someone does not use for sure, is to cut down on the size of the list of all commands, which are considered, when someone is using `completing-read`, started by `M-x`/`execute-extended-command`.
Depending on what extensions someone use, they *might* feel an improvement in how fast the completion candidates appear after typing.
But of course, that's just a hypothesis and requires some measurements and counting the reduction in the number of symbols. For example, there seems to be `57` symbols defined, which start with `gnus`, even if gnus is not loaded.
adouzzy · 2022-05-18 10:19
Unfortunately, removing gnus would break the makefile.
Don't ask me how I knew.