My Linux distribution ships out Emacs version 28.2, with a particular build configuration, and I currently use that.
However, it was not compiled with xwidget
support, and so I want to build 28.2 from source.
I've already done this for Emacs 27.2, and I can alternatively run emacs
, which is the system installation of version 28.2, or emacs-27.2
, which is the version I built from source. (I mostly run the latter with the -Q
option, to test out issues with packages.)
If I build 28.2 from source with the xwidget
flag, will I be able to keep and use the distro-shipped build as well? I.e. the new build is identified via emacs-28.2
rather than just emacs
.
And if I can get two separate instances of 28.2 on my system, will they not recognize the other's byte-compiled packages (see this question), the same way different versions (e.g. 27.2 and 28.2) have incompatible byte-compilations?
/usr/bin
and there will be both anemacs-28.2
and a symlink to it under the nameemacs
. When you build it yourself and domake install
, you will get the same thing but in/usr/local/bin
by default. So if you do nothing else, bothemacs
andemacs-28.2
will get you whichever version is found first in your PATH. I would recommend that you disambiguate it by renaming your executable (and the symlink) in/usr/local/bin
to something more distinctive. N.B. Different distros can and do things differently so YMMV. – NickD Jul 02 '23 at 21:03xwidget
support will not affect how the byte compiler works, so byte-compiled packages will work the same way with both versions. – NickD Jul 02 '23 at 21:05/usr/bin
; there's nothing of the formemacs*
in/usr/local/bin
. Is there any way to rename the executable binary to something likeemacs-28.2-xwidgets
(or any other name) when building it? I guess I can use the prefix option and do--prefix=$HOME/emacs-xwidgets/
, rename the resulting binary, and put a link to it in my PATH. – nonreligious Jul 03 '23 at 16:38prefix=/usr/local
, so you (or somebody...) must have done something (perhaps./configure --prefix=/usr
?) to change that. For the renaming, you can modify the Makefile but it can be easily done by a three-line script after installation:mv /usr/local/bin/emacs-28.2 /usr/local/bin/emacs-28.2-xwidgets; ln -s /usr/local/bin/emacs-28.2-xwidgets /usr/local/bin/emacs-xwidgets; rm /usr/local/bin/emacs
. – NickD Jul 03 '23 at 17:32/usr/lib/emacs/27.2
, which already had a directory for 28.2 -- there's no such Emacs directory on my system in/usr/local/lib
. – nonreligious Jul 03 '23 at 18:42/usr/local/lib/emacs/28.2
for the library files, right? Renaming or moving the directory wouldn't help. I guess that way it doesn't conflict with my existing install. – nonreligious Jul 03 '23 at 18:42