diff --git a/agenda.el b/agenda.el index 5cb9977..5346d53 100644 --- a/agenda.el +++ b/agenda.el @@ -1,5 +1,6 @@ +(load-file "~/.emacs.d/agenda-common.el") (load-file "~/.emacs.d/custom/workday.el") -(if (isworkday) +(if workday (if (< (string-to-number (format-time-string "%H")) 19) (if (> (string-to-number (format-time-string "%H")) 7) (setq org-agenda-files (list "~/Documents/drive/org/calendar/admin.org" "~/Documents/drive/org/calendar/home.org" "~/Documents/drive/org/calendar/music.org" "~/Documents/drive/org/calendar/work.org")) @@ -7,5 +8,3 @@ (setq org-agenda-files (list "~/Documents/drive/org/calendar/admin.org" "~/Documents/drive/org/calendar/home.org" "~/Documents/drive/org/calendar/music.org" "~/Documents/drive/org/calendar/personal.org"))) (setq org-agenda-files (list "~/Documents/drive/org/calendar/admin.org" "~/Documents/drive/org/calendar/home.org" "~/Documents/drive/org/calendar/music.org" "~/Documents/drive/org/calendar/personal.org"))) (setq org-agenda-prefix-format '((agenda . "%?-12t%s"))) -;; (setq org-deadline-warning-days 0) -(load-file "~/.emacs.d/agenda-common.el") diff --git a/config.org b/config.org index fb46c45..e1740f6 100644 --- a/config.org +++ b/config.org @@ -1,15 +1,3 @@ -* =$whoami=, a big neckbeard, that’s who - -Set basic information, false-online-pseudonym-of-a-name, approximate location. - -#+BEGIN_SRC emacs-lisp - (setq user-mail-address "eheu48@gmail.com") - (setq user-full-name "Trémeur Karahés") - (setq calendar-latitude 54.59) - (setq calendar-longitude -5.88) - (setq calendar-location-name "Belfast") -#+END_SRC - * Systems Define functions that specify what OS I’m on, also whether I’m at work or not. Then I can implement specific packages according to need/compatibility. @@ -23,7 +11,7 @@ Define functions that specify what OS I’m on, also whether I’m at work or no "Return true if on windows" (string-equal system-type "windows-nt")) - (defun ismac () + (defun ismac () ;; unkikely now, but might as well keep this "Return true if on macos" (string-equal system-type "darwin")) @@ -32,6 +20,16 @@ Define functions that specify what OS I’m on, also whether I’m at work or no (string-equal user-login-name "3055822")) #+END_SRC +* =$whoami=, a big neckbeard, that’s who + +Set name and location based on who I’m 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")) +#+END_SRC + * It's not 1986 Set everything to UTF-8. I use accented characters regularly. @@ -40,8 +38,9 @@ Set everything to UTF-8. I use accented characters regularly. (prefer-coding-system 'utf-8) (set-default-coding-systems 'utf-8) (set-language-environment 'utf-8) - (unless (iswin) (set-selection-coding-system 'utf-8)) - (when (iswin) (set-selection-coding-system 'utf-16-le)) + (if (iswin) + (set-selection-coding-system 'utf-16-le) + (set-selection-coding-system 'utf-8)) #+END_SRC * Sonic arts @@ -63,10 +62,11 @@ 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. +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$")))) @@ -87,6 +87,7 @@ Make the +window+ /frame/ look nice and clean. Scroll bars behave pointlessly on (setq inhibit-startup-screen t) (tool-bar-mode -1) (scroll-bar-mode -1) + (tooltip-mode -1) #+END_SRC Make everything just a little tiny bit transparent unless I’m using the boring Windows desktop. @@ -154,6 +155,7 @@ Make new directories automatically (from [[https://emacsredux.com/blog/2022/06/1 #+BEGIN_SRC emacs-lisp (defun er-auto-create-missing-dirs () + "Make new directories automatically" (let ((target-dir (file-name-directory buffer-file-name))) (unless (file-exists-p target-dir) (make-directory target-dir t)))) @@ -168,8 +170,7 @@ On Linux, I have to tell Emacs to use Chrome for web links. #+BEGIN_SRC emacs-lisp (when (islin) (setq browse-url-browser-function 'browse-url-generic - browse-url-generic-program "google-chrome" - )) + browse-url-generic-program "google-chrome")) #+END_SRC Honestly I don’t know if I’ll ever use macOS again, but in case I do, I need the meta key to work. @@ -296,6 +297,7 @@ Standard =elfeed= settings: #+BEGIN_SRC emacs-lisp (defun elfeed-load-db-and-open () + "Load and open the elfeed DB" (interactive) (elfeed-db-load) (elfeed) @@ -311,13 +313,15 @@ Standard =elfeed= settings: '(define-key elfeed-search-mode-map (kbd "m") 'elfeed-toggle-star)) (defun elfeed-save-db-and-bury () + "Save and close the elfeed DB" (interactive) (elfeed-db-save) (quit-window)) (use-package elfeed - :bind (:map elfeed-search-mode-map - ("q" . elfeed-save-db-and-bury)) + :bind + (:map elfeed-search-mode-map + ("q" . elfeed-save-db-and-bury)) :custom (elfeed-sort-order 'ascending) (elfeed-db-directory "~/Documents/drive/org/elfeed")) @@ -327,6 +331,7 @@ I am a huge supporter of big-endian date formats. #+BEGIN_SRC emacs-lisp (defun elfeed-search-format-date (date) + "Set elfeed to display big-endian dates" (format-time-string "%Y-%m-%d %H:%M" (seconds-to-time date))) #+END_SRC @@ -342,6 +347,7 @@ Save elfeed state properly when exiting Emacs. #+BEGIN_SRC emacs-lisp (defun save-if-elfeed () + "Save the elfeed DB if elfeed is running" (if (get-buffer "*elfeed-search*") (progn (elfeed-db-save) @@ -373,7 +379,7 @@ This works only for =emacs27= and above, and I don’t want to use it at work, s #+BEGIN_SRC emacs-lisp (unless (version< emacs-version "27") (unless (atwork) - (use-package lastfm))) + (use-package lastfm))) #+END_SRC ** =markdown-mode= @@ -385,8 +391,8 @@ I kind of hate markdown but I still have to use it sometimes. :mode (("README\\.md\\'" . gfm-mode) ("\\.md\\'" . markdown-mode) ("\\.markdown\\'" . markdown-mode)) - :init - (add-hook 'markdown-mode-hook 'auto-fill-mode) + :hook + (markdown-mode . auto-fill-mode) :config (setq markdown-asymmetric-header t) :custom @@ -439,6 +445,7 @@ For reading ebooks. Only on Linux because I (supposedly) use it with my calibre :init (add-to-list 'auto-mode-alist '("\\.epub\\'" . nov-mode))) (defun my-nov-font-setup () + "Set the font for nov-mode" (face-remap-add-relative 'variable-pitch :family "Liberation Serif" :height 2.0)) (add-hook 'nov-mode-hook 'my-nov-font-setup)) @@ -532,11 +539,13 @@ Export non-breaking spaces properly; from, believe it or not, [[https://orgmode. #+BEGIN_SRC emacs-lisp (unless (version< emacs-version "27") (defun my-html-filter-nobreaks (text backend info) + "Keep non-breaking spaces in HTML org export" (when (org-export-derived-backend-p backend 'html) (replace-regexp-in-string " " " " text))) (add-to-list 'org-export-filter-plain-text-functions 'my-html-filter-nobreaks) (defun my-latex-filter-nobreaks (text backend info) + "Keep non-breaking spaces in LaTeX org export" (when (org-export-derived-backend-p backend 'latex) (replace-regexp-in-string " " "~" text))) (add-to-list 'org-export-filter-plain-text-functions @@ -560,9 +569,11 @@ Automate a tiny part of something I was previously doing manually. #+BEGIN_SRC emacs-lisp (unless (atwork) (defun org-journal-file-header-func (time) + "Set the header for org-journal files" (concat "<" (format-time-string "%Y-%m-%d %a") ">\n\n")) (use-package org-journal - :bind ("C-c j" . org-journal-new-entry) + :bind + ("C-c j" . org-journal-new-entry) :config (setq org-journal-dir "~/Documents/drive/org/journal") (setq org-journal-file-format "%Y/%m/%Y-%m-%d.org") @@ -577,19 +588,20 @@ Automate a tiny part of something I was previously doing manually. Use =org-modern= on =emacs27= and above (although I’m 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. #+BEGIN_SRC emacs-lisp - (unless (version< emacs-version "27") - (use-package org-modern - :hook - (org-mode . org-modern-mode)) - (set-face-attribute 'org-table nil :inherit 'fixed-pitch) - (custom-set-variables '(org-modern-table nil))) - - (if (version< emacs-version "27") + (if (version< emacs-version "27") + (progn (use-package org-bullets :custom (org-bullets-bullet-list '("✸")) (org-ellipsis " ⤵") - :hook (org-mode . org-bullets-mode))) + :hook + (org-mode . org-bullets-mode))) + (progn + (use-package org-modern + :hook + (org-mode . org-modern-mode)) + (set-face-attribute 'org-table nil :inherit 'fixed-pitch) + (custom-set-variables '(org-modern-table nil)))) #+END_SRC **** =org-noter= @@ -610,7 +622,8 @@ Display the file outline in a sidebar. #+BEGIN_SRC emacs-lisp (unless (version< emacs-version "27") (use-package org-sidebar - :bind ("C-c C-x s" . org-sidebar-tree))) + :bind + ("C-c C-x s" . org-sidebar-tree))) #+END_SRC **** =org-wc= @@ -620,7 +633,8 @@ Display word counts next to org headings. #+BEGIN_SRC emacs-lisp (unless (version< emacs-version "27") (use-package org-wc - :bind ("C-c C-x w" . org-wc-display))) + :bind + ("C-c C-x w" . org-wc-display))) #+END_SRC *** Agenda settings @@ -645,7 +659,7 @@ 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 (isworkday) + (if workday (if (< (string-to-number (format-time-string "%H")) 19) (if (> (string-to-number (format-time-string "%H")) 7) (progn @@ -679,8 +693,8 @@ Add period information to the agenda header (this has a very weird output, compl #+BEGIN_SRC emacs-lisp (setq org-agenda-custom-commands '(("a" "Slightly modified agenda view" - ((agenda "" - ((org-agenda-overriding-header (periodise)))))))) + ((agenda "" + ((org-agenda-overriding-header (periodise)))))))) #+END_SRC Use a horizontal line to divide each day from the next. @@ -713,16 +727,16 @@ Highlights matching bracket. 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 it’s indispensable anyway. #+BEGIN_SRC emacs-lisp - (unless (iswin) (use-package pdf-tools - :config - (pdf-tools-install) - (define-key pdf-view-mode-map (kbd "C-s") 'isearch-forward) - (add-hook 'pdf-view-mode-hook (lambda () (cua-mode 0))) - (setq pdf-view-resize-factor 1.1))) - - (when (iswin) (use-package doc-view + (if (iswin) + (use-package doc-view :config - (setq doc-view-ghostscript-program "gswin32c"))) + (setq doc-view-ghostscript-program "gswin32c")) + (use-package pdf-tools + :config + (pdf-tools-install) + (define-key pdf-view-mode-map (kbd "C-s") 'isearch-forward) + (add-hook 'pdf-view-mode-hook (lambda () (cua-mode 0))) + (setq pdf-view-resize-factor 1.1))) #+END_SRC ** =rainbow-mode= @@ -745,7 +759,8 @@ Gives me a dialog with recently opened files. Package management and =elfeed= st (recentf-mode 1) (setq recentf-max-menu-items 20) (setq recentf-max-saved-items 20) - (global-set-key "\C-x\ \C-r" 'recentf-open-files) + (global-set-key (kbd "C-x C-r") 'recentf-open-files) + ;; (global-set-key "\C-x\ \C-r" 'recentf-open-files) (add-to-list 'recentf-exclude (expand-file-name "~/.emacs.d/elpa/*")) (add-to-list 'recentf-exclude @@ -765,7 +780,7 @@ As previously described, “the big boy”. I know little about most of these se :init (add-hook 'LaTeX-mode-hook 'turn-on-auto-fill) (add-hook 'TeX-after-compilation-finished-functions - #'TeX-revert-document-buffer) + #'TeX-revert-document-buffer) :config (setq TeX-auto-save t) (setq TeX-parse-self t) @@ -784,10 +799,11 @@ Automatically use smart quotes. (Can’t be set to =text-mode-hook=, unfortunate (use-package typo :custom (typo-global-mode 1) - :init - (add-hook 'org-mode-hook 'typo-mode) - (add-hook 'markdown-mode-hook 'typo-mode)) + :hook + (org-mode . typo-mode) + (markdown-mode . typo-mode)) (defun unsmart-hook () + "Turn off smart quotes for source blocks within org mode" (add-hook 'typo-disable-electricity-functions 'org-in-src-block-p nil :local)) (add-hook 'org-mode-hook 'unsmart-hook) #+END_SRC @@ -867,9 +883,7 @@ Use Noto fonts to match my system fonts on Linux. This has to be done differentl '(default ((t (:family "Noto Mono" :foundry "outline" :slant normal :weight normal :height 98 :width normal)))) '(italic ((t (:slant italic)))) '(variable-pitch ((t (:family "Noto Sans" :height 90)))) - '(fixed-pitch ((t (:family "Noto Mono" :height 90)))))) - - (unless (iswin) + '(fixed-pitch ((t (:family "Noto Mono" :height 90))))) (custom-set-faces '(italic ((t (:slant italic)))) '(variable-pitch ((t (:family "Noto Sans" :height 90)))) diff --git a/custom/dwpost.el b/custom/dwpost.el index 5b80265..5aa9c8c 100644 --- a/custom/dwpost.el +++ b/custom/dwpost.el @@ -3,13 +3,14 @@ (setq dw-username "tobli") (setq dw-pin "0397") (setq dw-defaultlocation "🔺") -(setq dw-iconfile "~/Documents/drive/org/iconchoose.el") +(setq dw-iconfile "~/Documents/drive/admin/emacs/iconchoose.el") (setq lastfm-login t) ;; boolean (setq lastfm-user "litrovers") ;;;;;;;;;;;;;;;;;;;;;; (defun dwexport () + "Export HTML for DW posting" (let ((org-export-with-author 'nil) (org-export-with-creator 'nil) (org-export-with-date 'nil) @@ -31,6 +32,7 @@ (write-file newname))) (defun dwdraft () + "Export HTML for DW posting and copy it to the clipboard" (interactive) (dwexport) (with-current-buffer newname @@ -40,6 +42,7 @@ (delete-file newname))) (defun dwsecurity () + "Set security level for DW post" (setq security (completing-read-multiple "Security (public, access, private): " '("public" "access" "private"))) (if (not security) (setq security "skip")) @@ -52,6 +55,7 @@ (substring securityjunk 2 end))"\n")))) (defun dwmood () + "Set mood for DW post" (setq mood (completing-read-multiple "Mood: " '("accomplished" "aggravated" "amused" "angry" "annoyed" "anxious" "apathetic" "artistic" "awake" "bitchy" "blah" "blank" "bored" "bouncy" "busy" "calm" "cheerful" "chipper" "cold" "complacent" "confused" "contemplative" "content" "cranky" "crappy" "crazy" "creative" "crushed" "curious" "cynical" "depressed" "determined" "devious" "dirty" "disappointed" "discontent" "distressed" "ditzy" "dorky" "drained" "drunk" "ecstatic" "embarrassed" "energetic" "enraged" "enthralled" "envious" "exanimate" "excited" "exhausted" "flirty" "frustrated" "full" "geeky" "giddy" "giggly" "gloomy" "good" "grateful" "groggy" "grumpy" "guilty" "happy" "high" "hopeful" "horny" "hot" "hungry" "hyper" "impressed" "indescribable" "indifferent" "infuriated" "intimidated" "irate" "irritated" "jealous" "jubilant" "lazy" "lethargic" "listless" "lonely" "loved" "melancholy" "mellow" "mischievous" "moody" "morose" "naughty" "nauseated" "nerdy" "nervous" "nostalgic" "numb" "okay" "optimistic" "peaceful" "pensive" "pessimistic" "pissed off" "pleased" "predatory" "productive" "quixotic" "recumbent" "refreshed" "rejected" "rejuvenated" "relaxed" "relieved" "restless" "rushed" "sad" "satisfied" "scared" "shocked" "sick" "silly" "sleepy" "sore" "stressed" "surprised" "sympathetic" "thankful" "thirsty" "thoughtful" "tired" "touched" "uncomfortable" "weird" "working" "worried"))) (if (not mood) (setq mood "skip")) @@ -64,6 +68,7 @@ (substring moodjunk 2 end))"\n")))) (defun dwmusic () + "Set current music for DW post" (setq music (lastfm-user-get-recent-tracks :user lastfm-user :from 1 :to 1)) (setq music (replace-regexp-in-string (regexp-quote "\" \"") " – " (format "%S" music) nil 'literal)) (sleep-for 1) @@ -78,6 +83,7 @@ (substring musicjunk 4 end))"\n")))) (defun dwicon (thefile) + "Set icon for DW post" (setq icon "skip") (load-file dw-iconfile) (with-current-buffer thefile @@ -87,26 +93,31 @@ (insert (concat "post-icon: "icon "\n")))) (defun dwlocation () + "Set location for DW post" (setq location (read-string "Location: " dw-defaultlocation)) (if (equal location "") (sleep-for 0) (insert (concat "post-location: " location "\n")))) (defun dwmusic-manual () + "Set current music for DW post if lastfm.el not set up" (setq music (read-string "Music: ")) (if (equal music "") (sleep-for 0) (insert (concat "post-music: " music "\n")))) (defun dw-posted () + "Log DW post" (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) + (sleep-for 1) (save-buffer))) (defun dwpost (psubject tags) + "Post to DW" (interactive (list (read-string "Post title (REQUIRED): ") (read-string "Tags (comma-separated): "))) (dwexport) diff --git a/custom/dwuser.el b/custom/dwuser.el index 52eb490..5c75e7c 100644 --- a/custom/dwuser.el +++ b/custom/dwuser.el @@ -1,29 +1,26 @@ (defun dwuser () + "Insert HTML link to a DW personal account" (interactive) (setq theuser (read-string "DW username: ")) - (insert (concat "\"[personal" theuser ""))) + (setq ao3 (y-or-n-p "For AO3?")) + (if ao3 + (insert (concat "" theuser "")) + (insert (concat "\"[personal" theuser "")))) (defun dwcomm () + "Insert HTML link to a DW community" (interactive) (setq theuser (read-string "DW comm name: ")) - (insert (concat "\"[community" theuser ""))) + (setq ao3 (y-or-n-p "For AO3?")) + (if ao3 + (insert (concat "" theuser "")) + (insert (concat "\"[community" theuser "")))) (defun ao3user () + "Insert HTML link to an AO3 user" (interactive) (setq theuser (read-string "AO3 username: ")) - (insert (concat "\"[archiveofourown.org" theuser ""))) - -(defun ao3safe-dwuser () - (interactive) - (setq theuser (read-string "DW username: ")) - (insert (concat "" theuser ""))) - -(defun ao3safe-dwcomm () - (interactive) - (setq theuser (read-string "DW comm name: ")) - (insert (concat "" theuser ""))) - -(defun ao3safe-ao3user () - (interactive) - (setq theuser (read-string "AO3 username: ")) - (insert (concat "" theuser ""))) + (setq ao3 (y-or-n-p "For AO3?")) + (if ao3 + (insert (concat "" theuser "")) + (insert (concat "\"[archiveofourown.org" theuser "")))) diff --git a/custom/fic.el b/custom/fic.el index 4b028c9..dc37a18 100644 --- a/custom/fic.el +++ b/custom/fic.el @@ -1,4 +1,5 @@ (defun fic-ao3 () + "Format fic for posting to AO3 and export it" (interactive) (org-format) (save-buffer) @@ -44,6 +45,7 @@ (delete-file newname))) (defun fic-export () + "Export fic to HTML, EPUB, PDF" (interactive) (shell-command "cp ~/.emacs.d/fic-export-files/FFXYevon.ttf .") (setq asal (y-or-n-p "ASAL?")) diff --git a/custom/html-colour.el b/custom/html-colour.el index 0dea1bd..f4f756f 100644 --- a/custom/html-colour.el +++ b/custom/html-colour.el @@ -1,4 +1,5 @@ (defun red () + "Set exported HTML file to red" (interactive) (setq oldname (concat (file-name-base) ".org")) (setq newname (concat (file-name-base) ".html")) @@ -9,6 +10,7 @@ (write-file newname))) (defun blue () + "Set exported HTML file to blue" (interactive) (setq oldname (concat (file-name-base) ".org")) (setq newname (concat (file-name-base) ".html")) @@ -19,6 +21,7 @@ (write-file newname))) (defun green () + "Set exported HTML file to green" (interactive) (setq oldname (concat (file-name-base) ".org")) (setq newname (concat (file-name-base) ".html")) diff --git a/custom/org-format.el b/custom/org-format.el index 0249bdd..a31e2f8 100644 --- a/custom/org-format.el +++ b/custom/org-format.el @@ -1,4 +1,5 @@ (defun org-format () + "Correct formatting in an org file" (interactive) (goto-char (point-min)) (while (re-search-forward " -" nil t) diff --git a/custom/periodise.el b/custom/periodise.el index 6a8eaff..1b80f56 100644 --- a/custom/periodise.el +++ b/custom/periodise.el @@ -1,5 +1,6 @@ (defun periodise () - (setq periodfile "~/Documents/drive/org/period.org") + "Return day of menstrual cycle" + (setq periodfile "~/Documents/drive/admin/emacs/period.org") (find-file-noselect periodfile) (setq thebuffer (file-name-nondirectory periodfile)) (with-current-buffer thebuffer @@ -17,8 +18,9 @@ (insert (concat "Day " (format "%S" days)))) (defun menstruate () + "Mark beginning of menstrual cycle" (interactive) - (setq periodfile "~/Documents/drive/org/period.org") + (setq periodfile "~/Documents/drive/admin/emacs/period.org") (find-file-noselect periodfile) (setq thebuffer (file-name-nondirectory periodfile)) (with-current-buffer thebuffer diff --git a/custom/al-bhed.el b/custom/text-transpose.el similarity index 100% rename from custom/al-bhed.el rename to custom/text-transpose.el diff --git a/custom/workday.el b/custom/workday.el index 5d9b5d2..a352996 100644 --- a/custom/workday.el +++ b/custom/workday.el @@ -1,4 +1,4 @@ -(setq daysoff '("2022-12-23" "2022-12-24" "2022-12-25" "2022-12-26" "2022-12-27" "2022-12-28" "2022-12-29" "2022-12-30" "2022-12-31" "2023-01-01" "2023-01-02" "2023-01-03" "2023-03-17" "2023-04-07" "2023-04-14" "2023-05-01" "2023-05-08" "2023-07-12" "2023-07-13" "2023-12-22" "2023-12-23" "2023-12-24" "2023-12-25" "2023-12-26" "2023-12-27" "2023-12-28" "2023-12-29" "2023-12-30" "2023-12-31" "2023-01-01" "2023-01-02" "2024-03-18" "2024-03-29" "2024-03-30" "2024-03-31" "2024-04-01" "2024-04-02" "2024-04-03" "2024-04-04" "2024-04-05" "2024-05-06" "2024-07-12" "2024-07-15" "2024-12-23" "2024-12-24" "2024-12-25" "2024-12-26" "2024-12-27" "2024-12-28" "2024-12-29" "2024-12-30" "2024-12-31" "2025-01-01")) ;; to update in 2025 +(load-file "~/Documents/drive/admin/emacs/daysoff.el") (if (equal (format-time-string "%a") "Sat") (setq workday nil) (if (equal (format-time-string "%a") "Sun") @@ -6,7 +6,3 @@ (if (member (format-time-string "%Y-%m-%d") daysoff) (setq workday nil) (setq workday t)))) - -(defun isworkday () - (eq workday t)) - diff --git a/snippets/org-mode/ficcntw b/snippets/fundamental-mode/ficcntw similarity index 100% rename from snippets/org-mode/ficcntw rename to snippets/fundamental-mode/ficcntw diff --git a/snippets/org-mode/fice b/snippets/fundamental-mode/fice similarity index 100% rename from snippets/org-mode/fice rename to snippets/fundamental-mode/fice diff --git a/snippets/org-mode/ficfemslash b/snippets/fundamental-mode/ficfemslash similarity index 100% rename from snippets/org-mode/ficfemslash rename to snippets/fundamental-mode/ficfemslash diff --git a/snippets/org-mode/ficg b/snippets/fundamental-mode/ficg similarity index 100% rename from snippets/org-mode/ficg rename to snippets/fundamental-mode/ficg diff --git a/snippets/org-mode/ficgen b/snippets/fundamental-mode/ficgen similarity index 100% rename from snippets/org-mode/ficgen rename to snippets/fundamental-mode/ficgen diff --git a/snippets/org-mode/fichet b/snippets/fundamental-mode/fichet similarity index 100% rename from snippets/org-mode/fichet rename to snippets/fundamental-mode/fichet diff --git a/snippets/org-mode/ficm b/snippets/fundamental-mode/ficm similarity index 100% rename from snippets/org-mode/ficm rename to snippets/fundamental-mode/ficm diff --git a/snippets/org-mode/ficmulti b/snippets/fundamental-mode/ficmulti similarity index 100% rename from snippets/org-mode/ficmulti rename to snippets/fundamental-mode/ficmulti diff --git a/snippets/org-mode/ficother b/snippets/fundamental-mode/ficother similarity index 100% rename from snippets/org-mode/ficother rename to snippets/fundamental-mode/ficother diff --git a/snippets/org-mode/ficslash b/snippets/fundamental-mode/ficslash similarity index 100% rename from snippets/org-mode/ficslash rename to snippets/fundamental-mode/ficslash diff --git a/snippets/org-mode/fict b/snippets/fundamental-mode/fict similarity index 100% rename from snippets/org-mode/fict rename to snippets/fundamental-mode/fict diff --git a/snippets/org-mode/ficwarnings b/snippets/fundamental-mode/ficwarnings similarity index 100% rename from snippets/org-mode/ficwarnings rename to snippets/fundamental-mode/ficwarnings diff --git a/snippets/org-mode/git b/snippets/fundamental-mode/git similarity index 100% rename from snippets/org-mode/git rename to snippets/fundamental-mode/git diff --git a/snippets/text-mode/time b/snippets/fundamental-mode/time similarity index 100% rename from snippets/text-mode/time rename to snippets/fundamental-mode/time diff --git a/snippets/html-mode/ficlink b/snippets/html-mode/ficlink new file mode 100644 index 0000000..78f50b3 --- /dev/null +++ b/snippets/html-mode/ficlink @@ -0,0 +1,4 @@ +# name: fanfiction-link +# key: ficlink +# -- +$2$0 $3 \ No newline at end of file diff --git a/snippets/html-mode/sumdet b/snippets/html-mode/sumdet new file mode 100644 index 0000000..bc96bc6 --- /dev/null +++ b/snippets/html-mode/sumdet @@ -0,0 +1,10 @@ +# name: summary-details +# key: sumdet +# -- +
$1 + +$2 + +
+ +$0 \ No newline at end of file diff --git a/snippets/latex-mode/latexbib b/snippets/latex-mode/latexbib index a412fba..e35e5c1 100644 --- a/snippets/latex-mode/latexbib +++ b/snippets/latex-mode/latexbib @@ -78,7 +78,7 @@ urlseen={Accessed}, } \bibliography{`(with-temp-buffer - (insert-file-contents "~/Documents/drive/org/bibpath") + (insert-file-contents "~/Documents/drive/admin/emacs/bibpath") (buffer-string))`} $0 \ No newline at end of file diff --git a/snippets/org-mode/ao3user b/snippets/org-mode/ao3user deleted file mode 100644 index 3fdfd81..0000000 --- a/snippets/org-mode/ao3user +++ /dev/null @@ -1,4 +0,0 @@ -# name: ao3-user -# key: ao3user -# -- -@@html:@@$0 \ No newline at end of file diff --git a/snippets/org-mode/hhead b/snippets/org-mode/hhead deleted file mode 100644 index 31c300d..0000000 --- a/snippets/org-mode/hhead +++ /dev/null @@ -1,10 +0,0 @@ -# name: html-head -# key: hhead -# -- -#+HTML_HEAD: -#+HTML_HEAD_EXTRA: -#+INFOJS_OPT: view:showall toc:nil ltoc:nil -#+OPTIONS: num:nil -#+TITLE: $1 - -$0 \ No newline at end of file diff --git a/snippets/org-mode/siteuser b/snippets/org-mode/siteuser new file mode 100644 index 0000000..d63f4bf --- /dev/null +++ b/snippets/org-mode/siteuser @@ -0,0 +1,4 @@ +# name: site-user +# key: siteuser +# -- +@@html:@@$0 \ No newline at end of file