- Install the build dependencies for Emacs:
$ sudo apt build-dep emacs $ sudo apt install libtree-sitter-dev
- Download and unpack the Emacs archive:
$ wget http://mirrors.nav.ro/gnu/emacs/emacs-29.1.tar.xz $ tar xvf emacs-29.1.tar.xz
Alternatively you can download from the nearby GNU mirror https://www.gnu.org/software/emacs/download.html
- Install Emacs / Build Package
$ ./autogen.sh $ ./configure –with-native-compilation –with-mailutils –with-json –with-tree-sitter –with-pgtk CC=gcc-12
$ make -j$(nproc) $ sudo make install
- Check if Emacs is installed
$ which emacs
I had to create symlinks to /usr/local/bin/emacs. Additionally i had to install some libs manually. libwebkit2gtk-4.0-dev
https://gist.github.com/zoliky/0445b20676bfa85450d7df006066ceb7 https://github.com/hubisan/emacs-wsl?tab=readme-ov-file
https://github.com/doomemacs/doomemacs?tab=readme-ov-file#install
Place your private configuration here! Remember, you do not need to run ‘doom sync’ after modifying this file!
Some functionality uses this to identify you, e.g. GPG configuration, email clients, file templates and snippets. It is optional. (setq user-full-name “John Doe” user-mail-address “[email protected]”)
Whenever you reconfigure a package, make sure to wrap your config in an `after!’ block, otherwise Doom’s defaults may override your settings. E.g.
(after! PACKAGE (setq x y))
The exceptions to this rule:
- Setting file/directory variables (like `org-directory’)
- Setting variables which explicitly tell you to set them before their package is loaded (see ‘C-h v VARIABLE’ to look up their documentation).
- Setting doom variables (which start with ‘doom-’ or ‘+’).
Here are some additional functions/macros that will help you configure Doom.
- `load!’ for loading external *.el files relative to this one
- `use-package!’ for configuring packages
- `after!’ for running code after a package has loaded
- `add-load-path!’ for adding directories to the `load-path’, relative to this file. Emacs searches the `load-path’ when you load packages with `require’ or `use-package’.
- `map!’ for binding new keys
To get information about any of these functions/macros, move the cursor over the highlighted symbol at press ‘K’ (non-evil users must press ‘C-c c k’). This will open documentation for it, including demos of how they are used. Alternatively, use `C-h o’ to look up a symbol (functions, variables, faces, etc).
You can also try ‘gd’ (or ‘C-c c d’) to jump to their definition and see how they are implemented.
Doom exposes five (optional) variables for controlling fonts in Doom:
- `doom-font’ – the primary font to use
- `doom-variable-pitch-font’ – a non-monospace font (where applicable)
- `doom-big-font’ – used for `doom-big-font-mode’; use this for presentations or streaming.
- `doom-symbol-font’ – for symbols
- `doom-serif-font’ – for the `fixed-pitch-serif’ face
See ‘C-h v doom-font’ for documentation and more examples of what they accept. For example:
If you or Emacs can’t find your font, use ‘M-x describe-font’ to look them up, `M-x eval-region’ to execute elisp code, and ‘M-x doom/reload-font’ to refresh your font settings. If Emacs still can’t find your font, it likely wasn’t installed correctly. Font issues are rarely Doom issues!
(setq doom-font (font-spec :family "FiraCode Nerd Font" :size 18 :weight `Regular)
doom-variable-pitch-font (font-spec :family "FiraCode Nerd Font Med" :size 14))
(setq mouse-wheel-scroll-amount '(1 ((shift) . 1))) ;; one line at a time
(setq mouse-wheel-progressive-speed nil) ;; don't accelerate scrolling
(setq mouse-wheel-follow-mouse 't) ;; scroll window under mouse
(setq scroll-step 1) ;; keyboard scroll one line at a time
;; (setq use-dialog-box nil)) ;; Disable dialog boxes since they weren't working in Mac OSX
;; # Window frame startup size
(setq initial-frame-alist '((top . 1) (right . 1) (width . 114) (height . 46)))
;; # Frame Transparency
;; (set-frame-parameter nil 'alpha-background 70)
(add-to-list 'default-frame-alist '(alpha-background . 85))
(map! :ne "M-/" #'comment-or-uncomment-region)
(setq which-key-idle-delay 0.1)
There are two ways to load a theme. Both assume the theme is installed and available. You can either set `doom-theme’ or manually load a theme with the `load-theme’ function. This is the default:
display-line-numbers-type determines the style of line numbers in effect. If set to `nil’, line numbers are disabled. For relative line numbers, set this to `relative’.
(setq doom-theme 'doom-old-hope)
(setq display-line-numbers-type 'relative)
(defun my-weebery-is-always-greater ()
(let* ((banner '("░▒█▀▀▄░█▀▀▄░▒█▀▀▀█░▒█░▒█░▒█▀▀▄░▒█▀▀▀█░█▀▀▄░▒█▀▀▄░▒█▀▀▄"
"░▒█░▒█▒█▄▄█░░▀▀▀▄▄░▒█▀▀█░▒█▀▀▄░▒█░░▒█▒█▄▄█░▒█▄▄▀░▒█░▒█"
"░▒█▄▄█▒█░▒█░▒█▄▄▄█░▒█░▒█░▒█▄▄█░▒█▄▄▄█▒█░▒█░▒█░▒█░▒█▄▄█"))
(longest-line (apply #'max (mapcar #'length banner))))
(put-text-property
(point)
(dolist (line banner (point))
(insert (+doom-dashboard--center
+doom-dashboard--width
(concat line (make-string (max 0 (- longest-line (length line))) 32)))
"\n"))
'face 'doom-dashboard-banner)))
(setq +doom-dashboard-ascii-banner-fn #'my-weebery-is-always-greater)
If you use `org’ and don’t want your org files in the default location below, change `org-directory’. It must be set before org loads!
(setq default-directory "/mnt/d/notebooks/DemacsNotes/")
(setq org-directory "/mnt/d/notebooks/DemacsNotes/org")
(setq org-roam-directory "/mnt/d/notebooks/DemacsNotes/roam/")
;; (setq emacsql-sqlite-executable "/usr/bin/sqlite3")
(use-package! org-super-agenda
:after org-agenda
:init
(setq org-super-agenda-groups '((:name "Today"
:time-grid t
:scheduled today)
(:name "Due today"
:deadline today)
(:name "Important"
:priority "A")
(:name "Overdue"
:deadline past)
(:name "Due soon"
:deadline future)
(:name "Big Outcomes"
:tag "bo")))
:config
(org-super-agenda-mode))
this runs msedge on windows to open web links. adjust the path in “” to your preferred Browser
(setq browse-url-browser-function 'browse-url-generic browse-url-generic-program "/mnt/c/Program Files (x86)/Microsoft/Edge/Application/msedge.exe")