I know there are some other questions like this on the site, but none of them seem to work.
I am trying to enable relative line numbers with a package, and when I do
M-x eval-buffer, the mode is enabled, but when I just launch emacs it does not get enabled. I checked and made sure that the location of init.el is the one that emacs is using, and I know that it is at least partially working because I can install packages in it and use them through M-x.
Here is my init.el
(require 'package) (let* ((no-ssl (and (memq system-type '(windows-nt ms-dos)) (not (gnutls-available-p)))) (proto (if no-ssl "http" "https"))) (when no-ssl (warn "\ Your version of Emacs does not support SSL connections, which is unsafe because it allows man-in-the-middle attacks. There are two things you can do about this warning: 1. Install an Emacs version that does support SSL and be safe. 2. Remove this warning from your init file so you won't see it again.")) ;; Comment/uncomment these two lines to enable/disable MELPA and MELPA Stable as desired (add-to-list 'package-archives (cons "melpa" (concat proto "://melpa.org/packages/")) t) (add-to-list 'package-archives '("melpa-stable" . "https://stable.melpa.org/packages/")) ;;(add-to-list 'package-archives (cons "melpa-stable" (concat proto "://stable.melpa.org/packages/")) t) (when (< emacs-major-version 24) (add-to-list 'package-archives (cons "gnu" (concat proto "://elpa.gnu.org/packages/"))))) (package-initialize) (custom-set-variables '(package-selected-packages (quote (linum-relative markdown-mode)))) (setq linum-relative-backend 'display-line-numbers-mode) (linum-relative-mode)
(linum-relative-mode) doesn't work when launching emacs.
To recreate, set the file above as your init.el / .emacs file and launch emacs. Notice that there are no relative line numbers. Now run
M-x eval-buffer and see that it adds the buffer just fine. My question is why launching emacs is not evaluating the .emacs file as it should?