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.