WFH tweaks, more options for fic export

This commit is contained in:
trémeur 2023-02-22 18:56:47 +00:00
parent bfd5775927
commit 99b9079131
5 changed files with 77 additions and 48 deletions

View file

@ -1,4 +1,15 @@
* Systems
* Systems and custom functions
Firstly, tell Emacs where to look for custom functions (via [[https://www.emacswiki.org/emacs/LoadingLispFiles][EmacsWiki]]).
#+BEGIN_SRC emacs-lisp
(defun load-directory (dir)
"Add all files in a directory to load-path"
(let ((load-it (lambda (f)
(load-file (concat (file-name-as-directory dir) f)))))
(mapc load-it (directory-files dir nil "\\.el$"))))
(load-directory "~/.emacs.d/custom/")
#+END_SRC
Define functions that specify what OS Im on, also whether Im at work or not. Then I can implement specific packages according to need/compatibility.
@ -27,7 +38,9 @@ Set name and location based on who Im being right now.
#+BEGIN_SRC emacs-lisp
(if (atwork)
(load-file "~/Documents/drive/admin/emacs/identity-work.el")
(load-file "~/Documents/drive/admin/emacs/identity-home.el"))
(if workhours
(load-file "~/Documents/drive/admin/emacs/identity-work.el")
(load-file "~/Documents/drive/admin/emacs/identity-home.el")))
#+END_SRC
* It's not 1986
@ -62,17 +75,6 @@ Also suppress certain warnings that would otherwise come up all the time and con
* Miscellaneous changes to make to the basic config
Firstly, tell Emacs where to look for custom functions (via [[https://www.emacswiki.org/emacs/LoadingLispFiles][EmacsWiki]]).
#+BEGIN_SRC emacs-lisp
(defun load-directory (dir)
"Add all files in a directory to load-path"
(let ((load-it (lambda (f)
(load-file (concat (file-name-as-directory dir) f)))))
(mapc load-it (directory-files dir nil "\\.el$"))))
(load-directory "~/.emacs.d/custom/")
#+END_SRC
I dont want finding files to be case-sensitive, same as in =zsh=:
#+BEGIN_SRC emacs-lisp
@ -506,7 +508,7 @@ Add a couple of classes for LaTeX export.
'("article-std"
"\\documentclass{article}
[NO-DEFAULT-PACKAGES]
\\input{$HOME/.emacs.d/header.tex} %$"
\\input{$HOME/.emacs.d/header.tex} %$\n% latexbib"
("\\section{%s}" . "\\section*{%s}")
("\\subsection{%s}" . "\\subsection*{%s}")
("\\subsubsection{%s}" . "\\subsubsection*{%s}")))
@ -536,7 +538,11 @@ Settings for export, mostly for DW post previews but also fic?? And work I guess
(progn
(setq org-export-with-author nil)
(setq org-latex-default-class "article-std"))
(setq org-latex-default-class "memoir"))
(if workhours
(progn
(setq org-export-with-author nil)
(setq org-latex-default-class "article-std"))
(setq org-latex-default-class "memoir")))
(setq org-latex-compiler "xelatex")
(setq org-html-validation-link nil)
(setq org-html-doctype "html5")
@ -655,18 +661,10 @@ Set the files to be included.
(add-to-list 'org-agenda-files "~/Documents/drive/org/calendar/acwri.org"))
(progn
(add-to-list 'org-agenda-files "~/Documents/drive/org/calendar/home.org")
(if workday
(if (< (string-to-number (format-time-string "%H")) 19)
(if (> (string-to-number (format-time-string "%H")) 7)
(progn
(add-to-list 'org-agenda-files "~/Documents/drive/org/calendar/work.org")
(add-to-list 'org-agenda-files "~/Documents/drive/org/calendar/acwri.org"))
(progn
(add-to-list 'org-agenda-files "~/Documents/drive/org/calendar/personal.org")
(add-to-list 'org-agenda-files "~/Documents/drive/org/calendar/habit.org")))
(progn
(add-to-list 'org-agenda-files "~/Documents/drive/org/calendar/personal.org")
(add-to-list 'org-agenda-files "~/Documents/drive/org/calendar/habit.org")))
(if workhours
(progn
(add-to-list 'org-agenda-files "~/Documents/drive/org/calendar/work.org")
(add-to-list 'org-agenda-files "~/Documents/drive/org/calendar/acwri.org"))
(progn
(add-to-list 'org-agenda-files "~/Documents/drive/org/calendar/personal.org")
(add-to-list 'org-agenda-files "~/Documents/drive/org/calendar/habit.org")))))