Archived
1
0
Fork 0
This repository has been archived on 2024-10-19. You can view files and clone it, but cannot push or open issues or pull requests.
emacs/emacs.md

102 lines
3 KiB
Markdown
Raw Normal View History

2022-04-22 04:25:29 +00:00
git clone https://github.com/plexus/chemacs2.git ~/.emacs.d (%appdata% on windows)
M-x describe-variable RET user-init-file RET
uncomment the package init line in the appropriate init file(s)
cat > ~/.emacs-profiles.el <<EOF
(("default" . ((user-emacs-directory . "~/.emacs.d.profiles/code")))
("code" . ((user-emacs-directory . "~/.emacs.d.profiles/code")))
("org" . ((user-emacs-directory . "~/.emacs.d.profiles/org")))
("beancount" . ((user-emacs-directory . "~/.emacs.d.profiles/accounting")))
("ledger" . ((user-emacs-directory . "~/.emacs.d.profiles/accounting")))
("accounting" . ((user-emacs-directory . "~/.emacs.d.profiles/accounting")))
)
EOF
; emacs --with-profile my-profile
; emacs --with-profile '((user-emacs-directory . "/path/to/config"))'
; add option to shortcut to runemacs.exe if needed
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
cat > ~/.emacs.d.profiles/[profile]/init.el<<EOF
;; -*- lexical-binding: t; -*-
;; TURN ON IN INIT FILE!!!!!
;; Make gc pauses faster by decreasing the threshold.
(setq gc-cons-threshold (* 2 1000 1000))
(require 'package)
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t)
;; Comment/uncomment this line to enable MELPA Stable if desired. See `package-archive-priorities`
;; and `package-pinned-packages`. Most users will not need or want to do this.
;;(add-to-list 'package-archives '("melpa-stable" . "https://stable.melpa.org/packages/") t)
(unless (package-installed-p 'use-package)
(package-refresh-contents)
(package-install 'use-package))
(require 'use-package)
EOF
cd [profile_path]
git clone https://github.com/beancount/beancount-mode.git
2022-04-22 21:03:15 +00:00
cd [profile_path]
git clone https://github.com/mnewt/dired-rainbow-listing
2022-04-22 04:25:29 +00:00
open scratch buffer. paste below into it as the contents then do `M-x ev-b RET`
``` elisp
; if get failures on pkg command, run contents of init.el from above first
; code
(defvar packages-code '(markdown-mode
rainbow-mode
rainbow-delimiters
lua-mode
dockerfile-mode
yaml-mode
go-mode
rust-mode
powershell
python-mode
json-mode)
"Code packages")
; accounting
(defvar packages-accounting '(
ledger-mode)
"Accounting packages")
(defvar packages-default '(
modus-themes
persp-mode
diminish
2022-04-22 21:03:15 +00:00
dash
s
oragami
2022-04-22 04:25:29 +00:00
ido-completing-read+
2022-04-22 21:03:15 +00:00
dired-single
all-the-icons-dired
dired-rainbow
2022-04-22 04:25:29 +00:00
helpful)
"Default packages")
(defun kmn-packages-installed-p ()
(cl-loop for p in packages-default
when (not (package-installed-p p)) do (cl-return nil)
finally (cl-return t)))
(unless (kmn-packages-installed-p)
;; check for new packages (package versions)
(message "%s" "Emacs is now refreshing its package database...")
(package-refresh-contents)
(message "%s" " done.")
;; install the missing packages
(dolist (p packages-default)
(when (not (package-installed-p p))
(package-install p))))
```