[emacs-w3m:13715] Re: Problems installing emacs-w3m
Boruch Baum <[email protected]> Sun, 29 Nov 2020 19:17:55 -0500
| Newsgroups | gmane.emacs.w3m |
|---|---|
| Message-ID | <[email protected]> |
On 2020-11-27 09:31, [email protected] wrote: > I must confess I am confused by what is happening here. > ... Abundantly clear! Here's what's going on: You have three separate entities operating together. The first is an ancient and remarkable 'text-page browser' called w3m that can parse html and perform http interactions. It has nothing to do with emacs, so it should come as no surprise that it has it would have its own configuration file(s). In fact, it has a dedicated directory full of all kinds of cool configuration features (that you may find confusing or intimidating) all located under ~/.w3m/. You can find documentation about the files at the end of the w3m man page. Let's call this "NUMBER ONE" The second entity, also ancient, also remarkable, is emacs itself. Refer to the Emacs documentation for all its confusing options for defining configuration files, but the ;tldr for most people is to use either file ~/.emacs or ~/.emacs.el or ~/.emacs.d/init.el. Let's call this "NUMBER TWO". These first two entities have nothing to do with one another. The third entity is the emacs-w3m project, not quite as ancient as the first two, but quite remarkable nonetheless, which is an emacs package that uses w3m as a back-end processor (Many years later, emacs itself would decide to create its own web browser called eww, which performs all the work within emacs itself. Last I checked, eww still has a lot of catching up to do to match the emacs-w3m feature set and compute efficiency, but that's a bit off-topic). The point that's important to allay your confusion is that this third entity, emac-w3m, also looks for its own (optional) configuration file (Technically, if you know the details of how emacs loads packages, you could put all your personal configuration data for emacs-w3m in your emacs configuration file). The default value for the emacs-w3m configuration file is ~/.emacs-w3m, but the default value can be changed by setting a variable in your emacs ("NUMBER TWO") configuration file. That variable is called w3m-init-file. So, in summary: 1) w3m usually uses files in directory ~/.w3m/ 2) emacs usually uses ~/emacs... (or ~/.emacs.d/init.el) 3) emacs-w3m usually uses ~/.emacs-w3m Since emacs ("NUMBER TWO") is loaded first, if it sets variable w3m-init-file, it can change what configuration file emacs-w3m ("NUMBER THREE") will use by changing variable w3m-init-file. In case you ask yourself, "Self, why aren't these files somewhere under ~/.config like all the "normal" programs?", the answer is "old age". All three entities pre-dated the XFreedesktop standard. When the three were developed, it was accepted practice to clutter users' home directories with "invisible" configuration files (and also to clutter users' lungs with "invisible" cigarette and leaded gasoline fumes). If what you want is to keep your emacs life simple, use the default values, ie. don't set variable w3m-init-file. At whatever point you start wanting to manually customize your emacs-w3m experience, place those customizations in file ~/.emacs-w3m ("NUMBER THREE"), not in your emacs ("NUMBER TWO") configuration file. -- hkp://keys.gnupg.net CA45 09B5 5351 7C11 A9D1 7286 0036 9E45 1595 8BC0