Closed ianyepan closed 4 years ago
I read this before somewhere but to be sure I had a look at some files in the emacs 27 cloned git repo and that is what I found:
Emacs 27 is compiled with native JSON by default. For that reason there is actually only a --without-json
flag. You can verify this by running (inside the git repo):
./autogen.sh
./configure --help | grep json
# Output:
--without-json don't compile with native JSON support
It is also mentioned in the configure.ac file:
dnl _ON results in a '--without' option in the --help output, so
dnl the help text should refer to "don't compile", etc.
...
OPTION_DEFAULT_ON([json], [don't compile with native JSON support])
If you still feel like uninstalling you need to download the git repository git clone -b emacs-27 --depth 1 git://git.sv.gnu.org/emacs.git
and then:
# not sure if this is needed, but can't harm
./autogen.sh
./configure
make
# and then to uninstall
sudo make uninstall
@hubisan Thanks for getting back, I see your point. However, I do believe that I don't have native JSON support -- because when I run M-: (functionp 'json-serialize)
it returns nil
.
I'll try to reinstall it and see how it turns out.
I just successfully reinstalled Emacs27 by passing in the --with-json
flag after ./configure
in the .sh
file.
(funtionp 'json-serialize)
now return t
, indicating that I now have native JSON support.
Reference: https://emacs-lsp.github.io/lsp-mode/page/performance/
@ianpan870102 Cool, that it works now.
I just noticed that I forgot to add libjansson-dev
as dependency in the shell file. That might be the reason that your Emacs was not built with native JSON support.
@hubisan so with libjansson-dev as a dependency, one doesn't have to include the --with-json flag, yes?
@ianpan870102 yeah. (functionp 'json-serialize)
returns t
without having used the --with-json
flag.
Just installed the newer Emacs 27.0.91 without the JSON flag and having libjansson-dev installed. (functionp 'json-serialize)
returns t
. So the flag is not needed.
As titled. I wish to reinstall my Emacs since the first time I forgot to pass the
--with-json
flag to./configure
. The current Emacs I'm using is installed with youremacs-27.sh
. What is the best way to safely uninstall it so I can run the script to reinstall it again? Thanks in advance