From a77a1947c96c0e2926b67dd924a894094ab5c501 Mon Sep 17 00:00:00 2001 From: "PETER Marius (SAFRAN PASSENGER SOLUTIONS)" Date: Fri, 14 Aug 2020 16:49:05 -0700 Subject: Disable ~mixed-pitch~, update light theme, update to Emacs 27.1 --- blendoit/blendoit-init.org | 106 +++++++++++++++----------------- blendoit/blendoit-init.pdf | Bin 219030 -> 219320 bytes blendoit/themes/blendoit-light-theme.el | 66 ++++++++++++-------- 3 files changed, 87 insertions(+), 85 deletions(-) (limited to 'blendoit') diff --git a/blendoit/blendoit-init.org b/blendoit/blendoit-init.org index 926cb79..f8b8144 100644 --- a/blendoit/blendoit-init.org +++ b/blendoit/blendoit-init.org @@ -28,18 +28,13 @@ this is the endgame of \textit{literate programming}. # (org-babel-load-file "~/.emacs.d/blendoit/test.org") # #+END_SRC -* Document structure -:PROPERTIES: -:UNNUMBERED: t -:END: +# * Blending Linux and Windows -** Blending Linux and Windows - -- The GNU Emacs cabal is attempting to create a complete OS out of a text - editor. -- Microsoft has a notorious /embrace, extend, extinguish/ approach when it - comes to rival technologies. -- Both are simultaneously possible. +# - The GNU Emacs cabal is attempting to create a complete OS out of a text +# editor. +# - Microsoft has a notorious /embrace, extend, extinguish/ approach when it +# comes to rival technologies. +# - Both are simultaneously possible. * TODO First-time setup @@ -160,7 +155,7 @@ to this file. In this subsection, we tell Emacs about relevant paths to resources. -On my Windows machine, I add the path to Portable Git.[fn::Download from +On my MS Windows machine, I add the path to Portable Git.[fn::Download from https://git-scm.com/download/win] #+BEGIN_SRC emacs-lisp @@ -336,7 +331,7 @@ them corrupts tables. #+NAME: org-basic #+BEGIN_SRC emacs-lisp -;; (setq org-hide-emphasis-markers t) + (setq org-hide-emphasis-markers t) (setq org-startup-indented t) #+END_SRC @@ -345,34 +340,6 @@ Get (input and output are identical), as opposed to What You See Is What You Mean (the input contains instructions that can modify the output).] behavior normally found in Word: -#+NAME: org-list-bullets -#+BEGIN_SRC emacs-lisp - (font-lock-add-keywords - 'org-mode - '(("^ *\\([-]\\) " - (0 (prog1 () (compose-region (match-beginning 1) (match-end 1) "•")))))) -#+END_SRC - -- Look at -- This beautifully indented - - List... - - Of lists! -- (Rendered with pretty bullets in Emacs) - -*** ~org-bullets~ - -No need for ~org-bullets~. MS Windows garbles the 3^{rd} level bullet. - -The following prettifies Org mode heading bullets: - -# #+NAME: org-heading-bullets -# #+BEGIN_SRC emacs-lisp -# (use-package org-bullets -# :hook -# (org-mode . org-bullets-mode) -# ) -# #+END_SRC - *** Invisible edits #+BEGIN_SRC emacs-lisp @@ -383,7 +350,7 @@ The following prettifies Org mode heading bullets: The agenda displays a chronological list of headings across all agenda files for which the heading or body contain a matching =org-time-stamp=.[fn::An -~org-time-stamp~ can be inserted with ~C-c .~ (period)] +=org-time-stamp= can be inserted with ~C-c .~ (period)] #+BEGIN_SRC emacs-lisp (global-set-key (kbd "C-c a") 'org-agenda-list) @@ -477,9 +444,7 @@ LaTeX \rightarrow PDF. "Org export to PDF and open. This basically reimplements `C-c C-e l o'." (interactive) - (org-latex-export-to-pdf) - (org-open-file - (concat (substring buffer-file-truename 0 -3) "pdf"))) + (org-open-file (org-latex-export-to-pdf))) (global-set-key (kbd "C-c e") 'blendoit-org-quick-export) #+END_SRC @@ -515,23 +480,27 @@ LaTeX \rightarrow PDF. ** ibuffer-sidebar #+BEGIN_SRC emacs-lisp -(use-package ibuffer-sidebar) -(ibuffer-sidebar-show-sidebar) + ;; (use-package ibuffer-sidebar) + ;; (ibuffer-sidebar-show-sidebar) -; :bind ("mouse-1" . ibuffer-mouse-visit-buffer) -; :bind ("mouse-3" . ibuffer-mouse-toggle-mark)) + ; :bind ("mouse-1" . ibuffer-mouse-visit-buffer) + ; :bind ("mouse-3" . ibuffer-mouse-toggle-mark)) -; (add-hook 'ibuffer-sidebar-mode-hook -; (lambda () -; (local-unset-key (quote mouse-1)) -; (local-unset-key (quote mouse-2)) -; (local-set-key (quote mouse-1) (quote ibuffer-mouse-visit-buffer)) -; (local-set-key (quote mouse-2) (quote ibuffer-mouse-toggle-mark)))) + ; (add-hook 'ibuffer-sidebar-mode-hook + ; (lambda () + ; (local-unset-key (quote mouse-1)) + ; (local-unset-key (quote mouse-2)) + ; (local-set-key (quote mouse-1) (quote ibuffer-mouse-visit-buffer)) + ; (local-set-key (quote mouse-2) (quote ibuffer-mouse-toggle-mark)))) #+END_SRC ** TODO Sidebar Get inspiration from ~ibuffer-sidebar~ and create a better sidebar. +#+BEGIN_SRC emacs-lisp +;; (load-file) +#+END_SRC + ** ~which-key~ #+BEGIN_SRC emacs-lisp @@ -687,10 +656,15 @@ cursor is a more MS Word-like bar. Fixed-pitch and variable-pitch faces will be used intelligently in all hooked modes. +~mixed-pitch~ is good at automatically determining which faces should be +monospaced and proportional; I prefer to define each face in my custom theme. + #+BEGIN_SRC emacs-lisp - (use-package mixed-pitch - :hook ((org-mode . mixed-pitch-mode) - (Info-mode . mixed-pitch-mode))) + ;; (use-package mixed-pitch + ;; :hook ((org-mode . mixed-pitch-mode) + ;; (Info-mode . mixed-pitch-mode))) + +(add-hook 'text-mode-hook 'variable-pitch-mode) #+END_SRC ** Initial frame @@ -713,6 +687,22 @@ My custom themes. (load-theme 'blendoit-light) #+END_SRC +*** ~blendoit-light~ + +A highly legible and unambiguous theme. + +The default face is a black foreground on a white background, this matches with +MS Word. + +- Red :: TODO; cursor; negative; danger +- Green :: DONE; positive +- Blue :: document structure +- Purple :: ~org-mode~ elements + +*** ~blendoit-dark~ + + + * Editing preferences These customizations enhance editor usability. diff --git a/blendoit/blendoit-init.pdf b/blendoit/blendoit-init.pdf index 99ca243..9699eae 100644 Binary files a/blendoit/blendoit-init.pdf and b/blendoit/blendoit-init.pdf differ diff --git a/blendoit/themes/blendoit-light-theme.el b/blendoit/themes/blendoit-light-theme.el index 6f1d59b..40ee7af 100644 --- a/blendoit/themes/blendoit-light-theme.el +++ b/blendoit/themes/blendoit-light-theme.el @@ -1,18 +1,18 @@ (deftheme blendoit-light - "Created 2020-08-12.") + "Created 2020-08-14.") (custom-theme-set-faces 'blendoit-light '(variable-pitch ((t (:family "Liberation Sans")))) '(escape-glyph ((((background dark)) (:foreground "cyan")) (((type pc)) (:foreground "magenta")) (t (:foreground "brown")))) '(homoglyph ((((background dark)) (:foreground "cyan")) (((type pc)) (:foreground "magenta")) (t (:foreground "brown")))) - '(minibuffer-prompt ((((background dark)) (:foreground "cyan")) (((type pc)) (:foreground "magenta")) (t (:foreground "medium blue")))) - '(highlight ((t (:underline nil :foreground "#ffffff" :background "#454545")))) + '(minibuffer-prompt ((t (:foreground "purple" :family "Hermit")))) + '(highlight ((t (:background "light sky blue" :foreground "white")))) '(region ((t (:background "light gray")))) '(shadow ((t (:foreground "dark slate gray")))) '(secondary-selection ((((class color) (min-colors 88) (background light)) (:background "yellow1")) (((class color) (min-colors 88) (background dark)) (:background "SkyBlue4")) (((class color) (min-colors 16) (background light)) (:background "yellow")) (((class color) (min-colors 16) (background dark)) (:background "SkyBlue4")) (((class color) (min-colors 8)) (:foreground "black" :background "cyan")) (t (:inverse-video t)))) '(trailing-whitespace ((((class color) (background light)) (:background "red1")) (((class color) (background dark)) (:background "red1")) (t (:inverse-video t)))) - '(font-lock-builtin-face ((((class grayscale) (background light)) (:weight bold :foreground "LightGray")) (((class grayscale) (background dark)) (:weight bold :foreground "DimGray")) (((class color) (min-colors 88) (background light)) (:foreground "dark slate blue")) (((class color) (min-colors 88) (background dark)) (:foreground "LightSteelBlue")) (((class color) (min-colors 16) (background light)) (:foreground "Orchid")) (((class color) (min-colors 16) (background dark)) (:foreground "LightSteelBlue")) (((class color) (min-colors 8)) (:weight bold :foreground "blue")) (t (:weight bold)))) + '(font-lock-builtin-face ((t (:foreground "dark slate blue")))) '(font-lock-comment-delimiter-face ((t (:foreground "dim gray" :inherit font-lock-comment-face)))) '(font-lock-comment-face ((t (:slant italic :foreground "slate gray" :inherit variable-pitch)))) '(font-lock-constant-face ((t (:foreground "dark cyan")))) @@ -26,46 +26,58 @@ '(font-lock-type-face ((t (:foreground "ForestGreen")))) '(font-lock-variable-name-face ((t (:foreground "sienna")))) '(font-lock-warning-face ((t (:inherit (error))))) - '(link-visited ((t (:foreground "magenta4" :inherit (link))))) '(fringe ((t (:background "grey95")))) '(header-line ((t (:box nil :foreground "grey20" :background "grey90" :inherit (mode-line))))) '(tooltip ((t (:foreground "black" :background "lightyellow" :inherit (variable-pitch))))) '(mode-line ((t (:box (:line-width -1 :color nil :style released-button) :foreground "black" :background "grey75")))) '(mode-line-buffer-id ((t (:weight bold)))) '(mode-line-emphasis ((t (:weight bold)))) - '(mode-line-highlight ((((class color) (min-colors 88)) (:box (:line-width 2 :color "grey40" :style released-button))) (t (:inherit (highlight))))) + '(mode-line-highlight ((t (:box (:line-width 2 :color "grey40" :style released-button))))) '(mode-line-inactive ((t (:weight light :box (:line-width -1 :color "grey75" :style nil) :foreground "grey20" :background "grey90" :inherit (mode-line))))) - '(isearch ((((class color) (min-colors 88) (background light)) (:foreground "lightskyblue1" :background "magenta3")) (((class color) (min-colors 88) (background dark)) (:foreground "brown4" :background "palevioletred2")) (((class color) (min-colors 16)) (:foreground "cyan1" :background "magenta4")) (((class color) (min-colors 8)) (:foreground "cyan1" :background "magenta4")) (t (:inverse-video t)))) - '(isearch-fail ((((class color) (min-colors 88) (background light)) (:background "RosyBrown1")) (((class color) (min-colors 88) (background dark)) (:background "red4")) (((class color) (min-colors 16)) (:background "red")) (((class color) (min-colors 8)) (:background "red")) (((class color grayscale)) (:foreground "grey")) (t (:inverse-video t)))) - '(lazy-highlight ((t (:background "paleturquoise")))) - '(match ((((class color) (min-colors 88) (background light)) (:background "yellow1")) (((class color) (min-colors 88) (background dark)) (:background "RoyalBlue3")) (((class color) (min-colors 8) (background light)) (:foreground "black" :background "yellow")) (((class color) (min-colors 8) (background dark)) (:foreground "white" :background "blue")) (((type tty) (class mono)) (:inverse-video t)) (t (:background "gray")))) + '(isearch ((t (:background "DodgerBlue1" :foreground "white")))) + '(isearch-fail ((t (:background "RosyBrown1")))) + '(lazy-highlight ((t (:foreground "DodgerBlue1" :box 2)))) + '(match ((t (:background "yellow1")))) '(next-error ((t (:inherit region)))) '(query-replace ((t (:inherit (isearch))))) '(org-formula ((t (:inherit org-table)))) - '(org-meta-line ((t (:foreground "DodgerBlue3" :family "Hermit")))) + '(org-meta-line ((t (:foreground "blue violet" :family "Hermit")))) '(org-document-title ((t (:width normal :height 2.0 :weight bold :slant normal :underline nil :inherit default)))) - '(org-level-1 ((t (:weight bold :height 1.6 :inherit fixed-pitch)))) - '(org-level-2 ((t (:weight bold :height 1.4 :inherit fixed-pitch)))) - '(org-level-3 ((t (:height 1.2 :weight bold :inherit fixed-pitch)))) - '(org-level-4 ((t (:height 1.1 :weight bold :inherit fixed-pitch)))) - '(org-date ((t (:inherit link :foreground "DodgerBlue3" :slant italic :family "Liberation Serif")))) '(org-footnote ((t (:foreground "DodgerBlue3" :inherit link)))) - '(org-tag ((t (:inherit link :weight bold :foreground "DodgerBlue3")))) - '(link ((t (:foreground "blue" :underline t)))) + '(org-tag ((t (:foreground "Purple" :weight bold :family "Hermit")))) '(org-document-info-keyword ((t (:inherit org-meta-line)))) - '(dashboard-heading ((t (:inherit font-lock-keyword-face)))) - '(org-todo ((t (:foreground "Red1" :box 2 :weight bold)))) - '(org-done ((t (:foreground "ForestGreen" :box 2 :weight bold)))) '(org-code ((t (:background "light grey" :foreground "black")))) - '(org-checkbox-statistics-todo ((t (:inherit org-todo :box nil)))) - '(org-checkbox-statistics-done ((t (:inherit org-done :box nil)))) + '(org-checkbox-statistics-todo ((t (:inherit org-meta-line :foreground "Red")))) + '(org-checkbox-statistics-done ((t (:inherit org-meta-line :foreground "ForestGreen")))) '(org-verbatim ((t (:inherit shadow)))) - '(font-lock-doc-face ((t (:inherit font-lock-string-face)))) + '(font-lock-doc-face ((t (:Family "Liberation Sans" :inherit font-lock-string-face)))) '(cursor ((t (:background "red")))) - '(org-document-info ((t (:weight bold :inherit variable-pitch)))) + '(org-document-info ((t (:inherit variable-pitch)))) '(fixed-pitch ((t (:family "Hack")))) - '(org-table ((t (:box (:line-width 1 :color "light slate gray") :foreground "dark slate gray" :inherit fixed-pitch)))) + '(org-table ((t (:inherit fixed-pitch :foreground "dark slate gray" :box (:line-width 1 :color "light slate gray"))))) '(org-block ((t (:family "Hermit")))) - '(default ((t (:background "white" :foreground "black" :height 120 :family "Hermit"))))) + '(org-special-keyword ((t (:inherit org-meta-line)))) + '(org-level-1 ((t (:height 1.6 :weight bold :inherit org-document-info :foreground "DodgerBlue4")))) + '(org-level-2 ((t (:height 1.4 :inherit org-document-info :weight bold :foreground "DodgerBlue3")))) + '(org-level-3 ((t (:foreground "DodgerBlue2" :height 1.2 :weight bold :inherit org-document-info)))) + '(org-level-4 ((t (:height 1.1 :inherit org-document-info :weight bold :foreground "DodgerBlue1")))) + '(org-level-5 ((t (:inherit org-document-info :weight bold :height 1.0 :foreground "DodgerBlue1")))) + '(org-level-6 ((t (:inherit org-level-5)))) + '(org-level-7 ((t (:inherit org-level-5)))) + '(org-level-8 ((t (:inherit org-level-5)))) + '(org-checkbox ((t (:box nil :weight bold)))) + '(org-todo ((t (:foreground "Red" :box 2 :weight bold)))) + '(org-done ((t (:foreground "ForestGreen" :box 2 :weight bold)))) + '(org-date ((t (:inherit org-tag :weight bold)))) + '(swiper-match-face-1 ((t (:inherit lazy-highlight)))) + '(swiper-match-face-2 ((t (:inherit (isearch))))) + '(swiper-match-face-4 ((t (:inherit isearch)))) + '(swiper-match-face-3 ((t (:inherit isearch)))) + '(ivy-minibuffer-match-face-1 ((t (:inherit lazy-highlight)))) + '(ivy-minibuffer-match-face-2 ((t (:inherit isearch)))) + '(ivy-minibuffer-match-face-3 ((t (:inherit lazy-highlight)))) + '(ivy-minibuffer-match-face-4 ((t (:inherit isearch)))) + '(ivy-minibuffer-match-highlight ((t (:inherit (highlight))))) + '(default ((t (:background "white" :foreground "black" :height 120 :family "Hack"))))) (provide-theme 'blendoit-light) -- cgit v1.2.3