After I installed Emacs 28 I became frustrated that lsp-mode and the overall machinery I used to get TypeScript IntelliSense in Emacs was too slow, so I thought I might try to upgrade to Emacs 29. Installing Emacs 29 wasn't possible as apparently it's only available as a snap. I initially found this emacs stackexchange answer and was then led to these instructions. Installing Emacs 29 was only a matter of doing:
sudo snap install emacs --classicand modifying my ~/.bashrc to place the /snap/bin directory at the front of the PATH to ensure that emacs on the shell picks Emacs 29 and not Emacs 28 (which was installed with apt)
Following the installation I just removed a number of packages that were no longer available (nor, it would seem, relevant as nothing was affected following their removal), moved the main package installation block at the head of my .emacs file and started off with a clean .emacs.d directory. Everything went surprisingly smoothly.
Following a previous disastrous attempt to install Emacs 27 in my ThinkStation desktop (running Ubuntu 20.04) I tried again the next day and succeeded to actually install Emacs 28 instead.
I followed the instructions from here (which are pretty much what I tried the previous day); only this time I thoroughly uninstalled Emacs 26 alongside a number of extra packages using the following incantation:
sudo apt remove emacs26-common emacs26 emacs-common emacs apel flim w3m-el emacs-el emacs-bin-common… as advised in a comment in the above linked instructions that reads: Dan Jones December 23, 2020 at 2:58 pm
Indeed following the above instructions sudo apt install emacs28 worked like a charm with zero complaints or warnings; not only that but my configuration files (developed and tested for Emacs 26) also worked right off the bat with zero modifications needed. This was, by a wide margin, the most uneventful Emacs upgrade ever.
For completeness purposes, this is the history (slightly edited) in the terminal from where I performed the installation:
$ sudo add-apt-repository ppa:kelleyk/emacs $ apt update $ sudo apt remove emacs26-common emacs26 emacs-common emacs apel flim w3m-el emacs-el emacs-bin-common $ sudo apt install emacs28Note finally that I did try to install the very latest Emacs 29 also but apparently it is not available in the ppa:kellyk/emacs repository. Well, no matter.
I will now try to refresh the Emacs packages and see whether I can finally succeed in installing IntelliSense for TypeScript in my Emacs 28.
Finally, unrelated to the previous package refreshing issues, I had to fix my emax script that handles multiple Emacs clients out of a single Emacs server. The fix consisted of a minor grep adjustment.
In November 2024 I spent about 5 hours trying to install Emacs 27 on Ubuntu 20.04. In the end I failed. Large part of the time spent was in trying to restore Emacs 26.3 (which is what Ubuntu 20.04 supports officially).
As part of the same travail I failed to install lsp-mode (so as to have TypeScript language server facilities and IntelliSense in Emacs); it was verified that Emacs 27.1 is required. I was following instructions from here.
Following the instructions from here I did the following:
sudo add-apt-repository ppa:kelleyk/emacs sudo apt install emacs25 $ emacs --version | head -1 GNU Emacs 24.5.1 $ emacs25 --version | head -1 GNU Emacs 25.3.2
Subsequently, I configured alternatives for emacs:
$ sudo update-alternatives --config emacs [sudo] password for mperdikeas: There are 2 choices for the alternative emacs (providing /usr/bin/emacs). Selection Path Priority Status ------------------------------------------------------------ * 0 /usr/bin/emacs24-x 27 auto mode 1 /usr/bin/emacs24-x 27 manual mode 2 /usr/bin/emacs25 27 manual mode Press <enter> to keep the current choice[*], or type selection number: 2 update-alternatives: using /usr/bin/emacs25 to provide /usr/bin/emacs (emacs) in manual mode $ $ $ emacs --version | head -1 GNU Emacs 25.3.2
I have encountered cases where an emacs installation would behave erratically with certain key-bindings not working as expected given the packages I've installed. This could be due to an Emacs upgrade and the ELPA packages requiring rebuilding.
Based on the source link above (and given that my package-user-dir variable was apparently not set), I've used the following:
M-: (byte-recompile-directory package-user-dir nil 'force)
… to rebuild the packages. When I re-launced Emacs things seemed to be working more smoothly.
If, for some weird reason the package-user-dir variable is not set (use C-h v to inspect it)
you can also provide the directory as a string literal:
M-: (byte-recompile-directory package-user-dir "/home/mperdikeas/.emacs.d/elpa" nil 'force)
BTW, M-: can be used to evaluate any expression in the minibuffer.
C-h k
C-h m
C-h f json-mode
C-SPACE
sequence key not working in emacsI was beset by this problem when I installed Emacs24 on Ubuntu 14.04.5 on the Dell Precision laptop (August '16)
Basically what happens is that the C-SPACE
combo is hijacked by the ibus
program and not recognized as a sequence in Emacs. When you ssh to the computer from another
machine that doesn't suffer from this problem the combo works as expected (this proves that the problem
is not in Emacs but rather in the desktop environment).
Follow these instructions.
Core of the solution:
In 14.04, you can edit the settings directly is If it is not installed:
dconf-editor
.sudo apt install dconf-editor
Then browse to Desktop >> ibus >> general >> hotkey. The trigger and triggers setting will still show 'control+space'. Edit these settings out, being careful to leave empty brackets [] in triggers.
M-
problem in Org-mode on tty
Basically install ccsm
(CompizConfig Settings Manager):
sudo apt-get install CompizConfig-Settings-Manager.… then run
ccsm
and select Desktop / Ubuntu Unity Plugin and disable the "Key to show the menu bar while pressed" and possibly "Key to show the HUD when tapped" too.
Basically disable everything bound to the ALT
key to be on the safe side.
(progn (add-to-list 'load-path "~/.emacs.d/web-mode/") (load "web-mode") (add-to-list 'auto-mode-alist '("\\.html\\'" . web-mode)) )It is advisable that that the el file lives in a git submodule.
describe-variable
(usually bound to C-h v)
https://launchpad.net/~cassou/+archive/emacs
(I got there from:
http://askubuntu.com/questions/149562/how-to-upgrade-to-emacs-24-1
)Be sure to also read the instructions in the link of the "Signing key". After the "sudo apt-get update" I then did a "sudo apt-get install emacs24" and had Emacs 24 installed.
================================================================
Before succeeding I tried following these instructions instead:
http://batsov.com/articles/2011/10/09/getting-started-with-emacs-24/
(which points you to: http://emacs.naquadah.org/ )
but it didn't work. The reason was that I was being silly because the link at http:emacs.naquadah.org ALSO points to Damien Cassou's page (it says: "If you are looking for the Ubuntu packages, Damien Cassou now maintains an emacs-snapshot PPA.") but I was tired and my eyes were sore and didn't notice it.