Improve consistency in config file

master
trémeur 2 years ago
parent 651a1febca
commit 27ee85c9d8

@ -244,7 +244,7 @@ Much nicer-looking modeline, and still my favourite over newer, trendier options
** =elfeed= ** =elfeed=
Obviously I use an org file to manage my feeds. Obviously I use an =org= file to manage my feeds.
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package elfeed-org (use-package elfeed-org
@ -303,7 +303,7 @@ This apparently deletes really old entries from the database.
** =git-gutter= ** =git-gutter=
Shows, or at least purports to show, git diff in the left margin if the file is being tracked by git. Shows, or at least purports to show, =git diff= in the left margin if the file is being tracked by =git=.
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package git-gutter (use-package git-gutter
@ -319,7 +319,7 @@ Shows, or at least purports to show, git diff in the left margin if the file is
** =lastfm= ** =lastfm=
This works only for =emacs27= and above, and I dont want to use it at work, so heres a nested =unless= in case my emacs version ever gets updated there. This works only for =emacs27= and above, and I dont want to use it at work, so heres a nested =unless= in case my Emacs version ever gets updated there.
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(unless (version< emacs-version "27") (unless (version< emacs-version "27")
@ -359,7 +359,7 @@ Lists minor modes in a menu.
** =mu4e= ** =mu4e=
I really only use this for DW posts, but Im constantly surprised by how well it works. This package is the reason I cant upgrade to emacs28, because it doesnt currently seem to work; also, it uses =cl=, which is deprecated, hence suppressing warnings about it above. I really only use this for DW posts, but Im constantly surprised by how well it works. This package is the reason I cant upgrade to =emacs28=, because it doesnt currently seem to work; also, it uses =cl=, which is deprecated, hence suppressing warnings about it above.
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(when (islin) (when (islin)
@ -397,7 +397,7 @@ For reading ebooks. Only on Linux because I (supposedly) use it with my calibre
(add-hook 'nov-mode-hook 'my-nov-font-setup)) (add-hook 'nov-mode-hook 'my-nov-font-setup))
#+END_SRC #+END_SRC
** =org-mode= my love ** =org= my love
*** Initial settings *** Initial settings
@ -409,7 +409,7 @@ I want to indent under headings, I dont want pointless line breaks when text
(setq org-special-ctrl-a/e t) (setq org-special-ctrl-a/e t)
#+END_SRC #+END_SRC
Display images in org buffers. Ive increased the width to 500px because 300 was quite small. Display images in =org= buffers. Ive increased the width to 500px because 300 was quite small.
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(setq org-display-inline-images t) (setq org-display-inline-images t)
@ -431,7 +431,7 @@ Set general TODO keywords.
'((sequence "TODO" "|" "DONE" "CANCELLED"))) '((sequence "TODO" "|" "DONE" "CANCELLED")))
#+END_SRC #+END_SRC
In emacs27 and above, I can set certain headlines not to be exported. I havent used this yet but it sounds useful. In =emacs27= and above, I can set certain headlines not to be exported. I havent used this yet but it sounds useful.
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(unless (version< emacs-version "27") (unless (version< emacs-version "27")
@ -478,9 +478,9 @@ Automate a tiny part of something I was previously doing manually.
(setq org-journal-file-header 'org-journal-file-header-func))) (setq org-journal-file-header 'org-journal-file-header-func)))
#+END_SRC #+END_SRC
**** =org-modern=/=org-bullets= **** =org-modern= and =org-bullets=
Use =org-modern= on emacs27 and above (although Im still not wild about it), =org-bullets= otherwise. Use =org-modern= on =emacs27= and above (although Im still not wild about it), =org-bullets= otherwise.
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(unless (version< emacs-version "27") (unless (version< emacs-version "27")
@ -529,6 +529,8 @@ Display word counts next to org headings.
*** Agenda settings *** Agenda settings
Set the keybinding, set the week to start on Monday because Im not the University of Oxford.
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(global-set-key (kbd "C-c a") 'org-agenda) (global-set-key (kbd "C-c a") 'org-agenda)
@ -586,7 +588,7 @@ Highlights matching bracket.
(show-paren-mode +1)) (show-paren-mode +1))
#+END_SRC #+END_SRC
** =pdf-tools=/=doc-view= ** =pdf-tools= and =doc-view=
Use the superior package for viewing PDFs on the superior operating system, and use a less reliable one otherwise. Ghostscript has to be installed on Windows, but its indispensable anyway. Use the superior package for viewing PDFs on the superior operating system, and use a less reliable one otherwise. Ghostscript has to be installed on Windows, but its indispensable anyway.
@ -615,7 +617,7 @@ Adds visual indication of colours to CSS files.
** =recentf= ** =recentf=
Gives me a dialog with recently opened files. Package management/elfeed stuff has to be manually excluded for obvious reasons. Surely I dont have to call =add-to-list= separately every time, but I havent found a more sensible way of doing it. Gives me a dialog with recently opened files. Package management and elfeed stuff have to be manually excluded for obvious reasons. Surely I dont have to call =add-to-list= separately every time, but I havent found a more sensible way of doing it.
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package recentf (use-package recentf
@ -670,7 +672,7 @@ Automatically use smart quotes in text modes. (This was set up with =org-mode-ho
** =yasnippet= ** =yasnippet=
Per-mode text expansion. Per-mode text expansion. What a lifechanger.
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package yasnippet (use-package yasnippet
@ -722,7 +724,13 @@ Nice monochrome-ish light theme, reminiscent of [[https://edwardtufte.github.io/
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package tao-theme) (use-package tao-theme)
(load-theme 'tao-yang t) (load-theme 'tao-yang t)
#+END_SRC
** Settings
Set the colours.
#+BEGIN_SRC emacs-lisp
(set-cursor-color "#61805c") (set-cursor-color "#61805c")
(set-face-attribute 'region nil :background "#fcf6a7") (set-face-attribute 'region nil :background "#fcf6a7")
(set-face-background 'hl-line "#ddffd6") (set-face-background 'hl-line "#ddffd6")
@ -769,20 +777,20 @@ Firstly, tell Emacs where to look for custom functions.
(load-directory "~/.emacs.d/custom/") (load-directory "~/.emacs.d/custom/")
#+END_SRC #+END_SRC
Set the =*scratch*= buffer to org-mode. Set the =*scratch*= buffer to =org-mode=.
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(setq initial-major-mode 'org-mode) (setq initial-major-mode 'org-mode)
#+END_SRC #+END_SRC
Tell me what version of Emacs Im using. Tell me what version of Emacs Im using so I know if there are packages I cant use.
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(setq initial-scratch-message (setq initial-scratch-message
(concat "# emacs " (number-to-string emacs-major-version) " on " (symbol-name system-type) "\n\n")) (concat "# emacs " (number-to-string emacs-major-version) " on " (symbol-name system-type) "\n\n"))
#+END_SRC #+END_SRC
Finally, because org gets very confused by all these settings, give it a friendly reload. Finally, because =org= gets very confused by all these settings, give it a friendly reload.
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(org-reload) (org-reload)

Loading…
Cancel
Save