This is a great question!
I've found the directions online to install it by hand unclear and, frankly, a bit of a pain (at least on Debian).
Emacs on Debian doesn't come with the Emacs Lisp Reference Manual by default. It's kind of silly, but Debian stores it in the non-free repos. Unfortunately, a regular apt-get install doesn't Just Work™...
After crawling the configure script, I think I have found your missing packet:
libmagickwand-dev. On my machine, after installing this packet, ./configure finally says:
Does Emacs use imagemagick? yes
NB1: as with other features (eg libxml2-dev for eww), I do not get the purpose of --with-feature:
If the libraries and ...
To avoid having to track down the packages that are required to build Emacs, use apt-get to install them for you.
apt-get build-dep emacs
Actually this may not be enough, as this just installs the libraries the Debian maintainer has chosen to link Emacs against. I think you need:
apt-get install libm17n-dev libmagickcore-dev
However after this I still ...
The Debian package emacs is a metapackage. These are empty packages that only describe dependencies. As such, they don't actually contain any programs, just links to other packages to install. Further, removing a metapackage does not result in its dependencies being removed.
This feature allows package managers to use transitional metapackages to more-or-...
Your init file needs to load the code that defines elpy-mode before it does the code that uses elpy-mode (i.e., before the (if (require 'flycheck)...)).
You need to add (require 'elpy) before that if code (assuming that the library that defines elpy-mode is elpy.el.
1. Download https://www.gnu.org/software/emacs/manual/info/elisp.info.gz to your /usr/share/info directory.
2. From a terminal run update-info-dir command.
3. From emacs C-h i m Elisp (capital E).
There are no general guidelines (other than "do things in the right order" which is not helpful), but there is one thing that you probably should NOT do in the initialization file and that is to open the specific file that you will be working on: the (find-file ".../notes.org") should not be there. Instead, you should open the file interactively with C-x C-f,...
The big questions is: Why?
Your init file is a software program, written in Emacs Lisp (elisp). As with any software, the order of instructions is important (at least in general).
Which also means...
What's the right order of the settings on init file?
...that there's no specific answer to this question. The "right order" of instructions in your init ...
I figured out why .bashrc solution didn't work. I had to actually export the variables:
export EDITOR="emacsclient -nw"
I use -nw both for $EDITOR & $VISUAL since I don't want to involve my emacs frame as much as possible.
Adding keys requires modifications in both Emacs and TTY domains. This required coordination allows arbitrary strings for key codes but it is better to use key codes that might be recognized by other programs and not just Emacs. Key code strings from xterm stand the best chance of being more widely recognized. In Debian and Ubuntu with Emacs 24.5, the file /...
You do not need to use a full Emacs email client like Gnus or mu4e (although I recommend it); message-mode should be sufficient to compose and send email, and to encrypt or sign outgoing messages. I have not used smtpmail before. My setup relies on an external smtp client (msmtp), but this should not be necessary.
To compose emails, use message-mail. To ...
As the existing answer leaves out how to compile with m17n support, I add this to answer that. In my system m17n is not used and otf is also not used. To build with m17n support, install libraries needed for m17n and also for otf. Then Emacs will be compiled with both of them.
I don't know why compiling with m17n requires otf but this works :)