diff --git a/.gitignore b/.gitignore index 1fcd461..d4afd0d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,16 +1,17 @@ +\#* auto-save-list/* backups/* +bookmarks config.el elpa/* emojis/* -*recentf -url/* -bookmarks +fic-export-files/auto/* nohup.out -\#* network-security.data nov-places places +*recentf request/* tramp transient/* +url/* \ No newline at end of file diff --git a/config.org b/config.org index 71ec9ca..6887f92 100644 --- a/config.org +++ b/config.org @@ -338,6 +338,18 @@ This apparently deletes really old entries from the database. :remove 'unread)) #+END_SRC +Save elfeed state properly when exiting Emacs. + +#+BEGIN_SRC emacs-lisp + (defun save-if-elfeed () + (if (get-buffer "*elfeed-search*") + (progn + (elfeed-db-save) + (message "Elfeed DB saved")))) + + (add-hook 'kill-emacs-hook 'save-if-elfeed) +#+END_SRC + ** =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 don’t seem to work properly with the current theme. diff --git a/custom/dwpost.el b/custom/dwpost.el index 4eac5c5..5b80265 100644 --- a/custom/dwpost.el +++ b/custom/dwpost.el @@ -98,6 +98,14 @@ (sleep-for 0) (insert (concat "post-music: " music "\n")))) +(defun dw-posted () + (find-file-noselect "~/Documents/drive/org/calendar/habit.org") + (with-current-buffer "habit.org" + (goto-char (point-min)) + (re-search-forward "RECUR dw posts") + (org-shiftright) + (save-buffer))) + (defun dwpost (psubject tags) (interactive (list (read-string "Post title (REQUIRED): ") (read-string "Tags (comma-separated): "))) @@ -118,4 +126,5 @@ (kill-buffer newname) (kill-buffer (concat "*sent mail to " dw-username "*")) (with-current-buffer oldname - (delete-file newname))) + (delete-file newname)) + (dw-posted)) diff --git a/custom/fic.el b/custom/fic.el index b7bd943..3bcdda4 100644 --- a/custom/fic.el +++ b/custom/fic.el @@ -187,7 +187,10 @@ (progn (goto-char (point-min)) (while (re-search-forward "\\\\begin{document}" nil t) - (replace-match "\\begin{document}\n\\pagestyle{multititlechapters}" nil t))) + (replace-match "\\begin{document}\n\\pagestyle{multititlechapters}" nil t)) + (goto-char (point-min)) + (while (re-search-forward "\\\\end{titlingpage}" nil t) + (replace-match "\\end{titlingpage}\n\\tableofcontents\*" nil t))) (progn (goto-char (point-min)) (while (re-search-forward "\\\\begin{document}" nil t) @@ -196,7 +199,7 @@ (progn (goto-char (point-min)) (while (re-search-forward "\\\\begin{document}" nil t) - (replace-match "\\begin{document}\n\\pagestyle{multinotitlechapters}" nil t))) + (replace-match "\\begin{document}\n\\pagestyle{multinotitlechapters}\n\\tableofcontents\*" nil t))) (progn (goto-char (point-min)) (while (re-search-forward "\\\\begin{document}" nil t) @@ -216,7 +219,7 @@ (format "xelatex -interaction=batchmode %s" (shell-quote-argument (buffer-file-name)))) (shell-command - (format "xelatex -interaction=batchmode -halt-on-error %s" + (format "xelatex -interaction=batchmode %s" (shell-quote-argument (buffer-file-name)))) (kill-current-buffer)) (delete-file "FFXYevon.ttf") diff --git a/fic-export-files/auto/header.el b/fic-export-files/auto/header.el index 41d3cce..ed97aba 100644 --- a/fic-export-files/auto/header.el +++ b/fic-export-files/auto/header.el @@ -28,7 +28,8 @@ "sepffx" "currentname" "titlegen" - "titleasal") + "titleasal" + "cftchapterpresnum") (LaTeX-add-polyglossia-langs '("english" "defaultlanguage" "variant=british")) (LaTeX-add-fontspec-newfontcmds diff --git a/fic-export-files/header.tex b/fic-export-files/header.tex index b2c2253..50c4ee2 100644 --- a/fic-export-files/header.tex +++ b/fic-export-files/header.tex @@ -16,6 +16,13 @@ \usepackage{titling} +\makeatletter +\def\cftchapterpresnum #1\@cftasnum{} +\cftsetindents{chapter}{0pt}{0pt} +\makeatother +\renewcommand*{\cftchapterfont}{\normalfont} +\renewcommand*{\cftchapterpagefont}{\normalfont} + \usepackage{polyglossia} \setdefaultlanguage[variant=british]{english} @@ -24,12 +31,7 @@ \usepackage{graphicx} \PassOptionsToPackage{hyphens}{url}\usepackage[hidelinks]{hyperref} -\hypersetup{ - colorlinks, - linkcolor={red!50!black}, - citecolor={green!30!black}, - urlcolor={blue!80!black} - } + \makeatletter \DeclareMathSymbol{0}{\mathalpha}{\eu@DigitsArabic@symfont}{`0} \DeclareMathSymbol{1}{\mathalpha}{\eu@DigitsArabic@symfont}{`1}