Add org-format-fr, use modus-themes

master
trémeur 2 years ago
parent 64d6179e0d
commit 91158f65e1

@ -256,14 +256,21 @@ Let me search my journal files, not synced to my work computer. Set regexp searc
** =dimmer=
Dims inactive buffers.
Dims inactive buffers. Adjustments for =modus-themes= as suggested.
#+BEGIN_SRC emacs-lisp
(if (version< emacs-version "27")
(use-package dimmer
:init
(dimmer-mode t)
:config
(setq dimmer-fraction 0.4))
(use-package dimmer
:config
(setq dimmer-fraction 0.4)
(setq dimmer-adjustment-mode :foreground)
(setq dimmer-use-colorspace :rgb)
(dimmer-mode 1)))
#+END_SRC
** =doom-modeline=
@ -358,7 +365,7 @@ Save elfeed state properly when exiting Emacs.
** =git-gutter=
Shows, or at least purports to show, =git diff= in the left margin if the file is being tracked by =git=. The colours dont seem to work properly with the current theme.
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
(use-package git-gutter
@ -599,7 +606,7 @@ Automate a tiny part of something I was previously doing manually.
**** =org-modern= and =org-bullets=
Use =org-modern= on =emacs27= and above (although Im still not wild about it), =org-bullets= otherwise. [[https://github.com/minad/org-modern/issues/5#issuecomment-1318003940][Fix for issue with table widths]], which makes me slightly less not-wild.
Use =org-modern= on =emacs27= and above, =org-bullets= otherwise. [[https://github.com/minad/org-modern/issues/5#issuecomment-1318003940][Fix for issue with table widths]].
#+BEGIN_SRC emacs-lisp
(if (version< emacs-version "27")
@ -825,9 +832,7 @@ This is good for auto indentation, folding, killing elements, apparently XPath??
(setq web-mode-enable-html-entities-fontification t)
(setq web-mode-enable-current-element-highlight t)
:bind
("C-c /" . web-mode-element-close)
:custom-face
(web-mode-html-entity-face ((t (:underline t)))))
("C-c /" . web-mode-element-close))
#+END_SRC
** =yasnippet=
@ -878,21 +883,33 @@ Highlights current line.
(global-hl-line-mode 1))
#+END_SRC
*** =tao-theme=
** Theme/colours
Nice monochrome-ish light theme, reminiscent of [[https://edwardtufte.github.io/tufte-css/][Tufte CSS]].
Set a theme.
#+BEGIN_SRC emacs-lisp
(if (version< emacs-version "27")
(progn
(use-package tao-theme)
(load-theme 'tao-yang t)
(load-theme 'tao-yang t))
(progn
(use-package modus-themes
:config
(setq modus-themes-bold-constructs t)
(setq modus-themes-italic-constructs t)
(setq modus-themes-mixed-fonts t)
(setq modus-themes-org-blocks 'gray-background))
(load-theme 'modus-operandi-tinted t)))
#+END_SRC
** Colours
Set colours unless =modus-operandi= is active.
#+BEGIN_SRC emacs-lisp
(if (version< emacs-version "27")
(progn
(set-cursor-color "#61805c")
(set-face-attribute 'region nil :background "#fcf6a7")
(set-face-background 'hl-line "#ddffd6")
(set-face-background 'hl-line "#ddffd6")))
#+END_SRC
** Fonts
@ -909,7 +926,8 @@ Use Noto fonts to match my system fonts on Linux. This has to be done differentl
(custom-set-faces
'(italic ((t (:slant italic))))
'(variable-pitch ((t (:family "Noto Sans" :height 90))))
'(fixed-pitch ((t (:family "Noto Mono" :height 90))))))
'(fixed-pitch ((t (:family "Noto Mono" :height 100))))
'(modus-themes-fixed-pitch ((t (:family "Noto Mono" :height 100))))))
#+END_SRC
Use the =mixed-pitch= package to determine the font intelligently in modes that contain both text and prog elements.

@ -49,3 +49,74 @@
(goto-char (point-min))
(while (re-search-forward "=\"\\([^>]*\\)”" nil t)
(replace-match "=\"\\1\"")))
(defun org-format-fr ()
"Correct formatting in a French org file"
(interactive)
(org-format)
(goto-char (point-min))
(while (re-search-forward " …" nil t)
(replace-match ""))
(goto-char (point-min))
(while (re-search-forward "" nil t)
(replace-match "«"))
(goto-char (point-min))
(while (re-search-forward "« " nil t)
(replace-match "«"))
(goto-char (point-min))
(while (re-search-forward "«" nil t)
(replace-match "« "))
(goto-char (point-min))
(while (re-search-forward "«  " nil t)
(replace-match "« "))
(goto-char (point-min))
(while (re-search-forward "" nil t)
(replace-match "»"))
(goto-char (point-min))
(while (re-search-forward " »" nil t)
(replace-match "»"))
(goto-char (point-min))
(while (re-search-forward "»" nil t)
(replace-match " »"))
(goto-char (point-min))
(while (re-search-forward "  »" nil t)
(replace-match " »"))
(goto-char (point-min))
(while (re-search-forward " ;" nil t)
(replace-match ";"))
(goto-char (point-min))
(while (re-search-forward ";" nil t)
(replace-match " ;"))
(goto-char (point-min))
(while (re-search-forward "  ;" nil t)
(replace-match " ;"))
(goto-char (point-min))
(while (re-search-forward " :" nil t)
(replace-match ":"))
(goto-char (point-min))
(while (re-search-forward ":" nil t)
(replace-match " :"))
(goto-char (point-min))
(while (re-search-forward "  :" nil t)
(replace-match " :"))
(goto-char (point-min))
(while (re-search-forward " !" nil t)
(replace-match "!"))
(goto-char (point-min))
(while (re-search-forward "!" nil t)
(replace-match " !"))
(goto-char (point-min))
(while (re-search-forward "  !" nil t)
(replace-match " !"))
(goto-char (point-min))
(while (re-search-forward " \\?" nil t)
(replace-match "\?"))
(goto-char (point-min))
(while (re-search-forward "\\?" nil t)
(replace-match " \?"))
(goto-char (point-min))
(while (re-search-forward "  \\?" nil t)
(replace-match " \?"))
(goto-char (point-min))
(while (re-search-forward "\n- " nil t)
(replace-match "\n ")))

Loading…
Cancel
Save