From e73e93848410c116bed137f0856b220e81e4ceb1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?tr=C3=A9meur?= Date: Fri, 24 Jan 2025 17:13:33 +0000 Subject: [PATCH 01/10] No exclamation marks in Spira --- fic-export-files/header.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fic-export-files/header.tex b/fic-export-files/header.tex index ca2c527..eb01d04 100644 --- a/fic-export-files/header.tex +++ b/fic-export-files/header.tex @@ -162,4 +162,4 @@ information, see \url{https://tre.praze.net/ffx/asal}. \noindent -{\scriptsize{\yevon Now is the time to shape your stories Your fate is in your hands!}}} \ No newline at end of file +{\scriptsize{\yevon Now is the time to shape your stories Your fate is in your hands}}} \ No newline at end of file From 0b01d4fc2596f62652928bcecfa7613d280db265 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?tr=C3=A9meur?= Date: Thu, 20 Feb 2025 19:09:41 +0000 Subject: [PATCH 02/10] byeee --- custom/dwpost.el | 145 ----------------------------------------------- 1 file changed, 145 deletions(-) delete mode 100644 custom/dwpost.el diff --git a/custom/dwpost.el b/custom/dwpost.el deleted file mode 100644 index dd44794..0000000 --- a/custom/dwpost.el +++ /dev/null @@ -1,145 +0,0 @@ -;; variables live here - -(setq dw-username "tobli") -(setq dw-pin "0397") -(setq dw-defaultlocation "🔺") -(setq dw-tagslist "~/Documents/drive/admin/emacs/tags.txt") -(setq dw-iconfile "~/Documents/drive/admin/emacs/iconchoose.el") -(setq lastfm-login t) ;; boolean -(setq log nil) -(setq logfile "~/Documents/drive/org/calendar/habit.org") -(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) - (org-export-with-section-numbers 'nil) - (org-export-time-stamp-file 'nil) - (org-export-with-toc 'nil) - (org-html-validation-link 'nil)) - (org-html-export-to-html)) - (setq oldname (concat (file-name-base) ".org")) - (setq newname (concat (file-name-base) ".html")) - (find-file-noselect newname) - (with-current-buffer newname - (goto-char (point-min)) - (setq delpoint-one (search-forward "\n")) - (delete-region (point-min) delpoint-one) - (goto-char (point-max)) - (setq delpoint-two (search-backward "")) - (delete-region delpoint-two (point-max)) - (write-file newname))) - -(defun dwdraft () - "Export HTML for DW posting and copy it to the clipboard" - (interactive) - (dwexport) - (with-current-buffer newname - (kill-ring-save (point-min) (point-max))) - (kill-buffer newname) - (with-current-buffer oldname - (delete-file newname))) - -(unless (string-equal system-type "android") - (defun dwsecurity () - "Set security level for DW post" - (setq security (completing-read "Security (public, access, private): " '("public" "access" "private"))) - (unless (equal security "") - (insert (concat "post-security: " security "\n"))))) - -(unless (string-equal system-type "android") - (defun dwmood () - "Set mood for DW post" - (setq mood (completing-read "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"))) - (unless (equal mood "") - (insert (concat "post-mood: " mood "\n"))))) - -(unless (string-equal system-type "android") - (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) - (if (not music) - (setq music "nil")) - (if (equal music "nil") - (sleep-for 0) - (insert (concat "post-music: " - (let* ((musicjunk - (format "%S" music)) - (end (- (length musicjunk) 4))) - (substring musicjunk 4 end))"\n"))))) - -(unless (string-equal system-type "android") - (defun dwicon (thefile) - "Set icon for DW post" - (setq icon "skip") - (load-file dw-iconfile) - (with-current-buffer thefile - (iconchoose)) - (if (equal icon "skip") - (sleep-for 0) - (insert (concat "post-icon: "icon "\n"))))) - -(unless (string-equal system-type "android") - (defun dwtags () - "Set tags for DW post" - (setq basetags (s-split "\n" (f-read dw-tagslist) t)) - (setq tagslist (completing-read-multiple "Tags: " basetags)) - (setq tags (s-join "," tagslist)) - (insert (concat "post-tags: org-export," tags "\n")))) - -(unless (string-equal system-type "android") - (defun dwlocation () - "Set location for DW post" - (setq location (read-string "Location: " dw-defaultlocation)) - (unless (equal location "") - (insert (concat "post-location: " location "\n"))))) - -(unless (string-equal system-type "android") - (defun dwmusic-manual () - "Set current music for DW post if lastfm.el not set up" - (setq music (read-string "Music: ")) - (unless (equal music "") - (insert (concat "post-music: " music "\n"))))) - -(unless (string-equal system-type "android") - (defun dw-posted () - "Log DW post" - (find-file-noselect logfile) - (with-current-buffer (file-name-nondirectory logfile) - (goto-char (point-min)) - (re-search-forward "RECUR dw posts") - (org-shiftright) - (sleep-for 1) - (save-buffer)))) - -(unless (string-equal system-type "android") - (defun dwpost () - "Post to DW" - (interactive) - (setq psubject (read-string "Post title (REQUIRED): ")) - (dwexport) - (compose-mail (concat dw-username "+" dw-pin "@post.dreamwidth.org") psubject) - (with-current-buffer (concat "*unsent mail to " dw-username "*") - (dwtags) - (dwsecurity) - (dwlocation) - (dwicon newname) - (cond - (lastfm-login t (dwmusic)) - ((dwmusic-manual))) - (dwmood) - (insert (concat "\n")) - (insert-file-contents newname) - (message-send-and-exit)) - (kill-buffer newname) - (kill-buffer (concat "*sent mail to " dw-username "*")) - (with-current-buffer oldname - (delete-file newname)) - (cond - (log t (dw-posted))))) From 7a7e356657b6801b3a029d31c2f715593b28c2c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?tr=C3=A9meur?= Date: Thu, 20 Feb 2025 19:46:40 +0000 Subject: [PATCH 03/10] Remove unnecessary functions --- custom/capture.el | 16 ++++++++-------- custom/dwuser.el | 23 ++++++----------------- snippets/org-mode/dwcut | 4 ---- snippets/org-mode/dwuser | 4 ---- snippets/org-mode/siteuser | 4 ---- 5 files changed, 14 insertions(+), 37 deletions(-) delete mode 100644 snippets/org-mode/dwcut delete mode 100644 snippets/org-mode/dwuser delete mode 100644 snippets/org-mode/siteuser diff --git a/custom/capture.el b/custom/capture.el index e38893e..dc08326 100644 --- a/custom/capture.el +++ b/custom/capture.el @@ -102,14 +102,14 @@ (insert "* places\n** visited")) (insert "\n** visited")))) - (defun finddw () - "Find or create heading for DW posts" + (defun findweb () + "Find or create heading for website posts" (filedate) (goto-char (point-min)) - (if (not (search-forward "* dw" nil t)) + (if (not (search-forward "* post" nil t)) (progn (goto-char (point-max)) - (insert "* dw")))) + (insert "* post")))) (defun therating () "Rate some media" @@ -195,10 +195,6 @@ (file+function "" findread) "* %^{Author} /%^{Title}/%(therating)%(theworkbook)" :jump-to-captured t) - ("d" "DW post" entry - (file+function "" finddw) - "* %^{Title}\n%?" - :jump-to-captured t) ("f" "Watched film" entry (file+function "" findwatched) "* %^{Title} (%^{Year})%(therating)" @@ -227,6 +223,10 @@ (file+function "" findreading) "* %^{Author} /%^{Title}/%(theworkbook)\n%(bookcalc)%?" :jump-to-captured t) + ("w" "Website post" entry + (file+function "" findweb) + "* %^{Title}\n%?" + :jump-to-captured t) ("1" "Completed game" entry (file+function "" findhundred) "* %^{Title} (%setconsole)" diff --git a/custom/dwuser.el b/custom/dwuser.el index 5c75e7c..19dfeb8 100644 --- a/custom/dwuser.el +++ b/custom/dwuser.el @@ -2,25 +2,14 @@ "Insert HTML link to a DW personal account" (interactive) (setq theuser (read-string "DW username: ")) - (setq ao3 (y-or-n-p "For AO3?")) - (if ao3 - (insert (concat "" theuser "")) - (insert (concat "\"[personal" theuser "")))) + (setq userdisplay (subst-char-in-string ?- ?_ theuser)) + (setq userlink (subst-char-in-string ?_ ?- theuser)) + (insert (concat "~" userdisplay ""))) (defun dwcomm () "Insert HTML link to a DW community" (interactive) (setq theuser (read-string "DW comm name: ")) - (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: ")) - (setq ao3 (y-or-n-p "For AO3?")) - (if ao3 - (insert (concat "" theuser "")) - (insert (concat "\"[archiveofourown.org" theuser "")))) + (setq userdisplay (subst-char-in-string ?- ?_ theuser)) + (setq userlink (subst-char-in-string ?_ ?- theuser)) + (insert (concat "/" userdisplay ""))) diff --git a/snippets/org-mode/dwcut b/snippets/org-mode/dwcut deleted file mode 100644 index 657299c..0000000 --- a/snippets/org-mode/dwcut +++ /dev/null @@ -1,4 +0,0 @@ -# name: dreamwidth-cut -# key: dwcut -# -- -@@html:@@$0@@html:@@ \ No newline at end of file diff --git a/snippets/org-mode/dwuser b/snippets/org-mode/dwuser deleted file mode 100644 index 8027c2f..0000000 --- a/snippets/org-mode/dwuser +++ /dev/null @@ -1,4 +0,0 @@ -# name: dreamwidth-user -# key: dwuser -# -- -@@html:@@$0 \ No newline at end of file diff --git a/snippets/org-mode/siteuser b/snippets/org-mode/siteuser deleted file mode 100644 index d63f4bf..0000000 --- a/snippets/org-mode/siteuser +++ /dev/null @@ -1,4 +0,0 @@ -# name: site-user -# key: siteuser -# -- -@@html:@@$0 \ No newline at end of file From 2511cc9936b417b2a9da5f680aecdd39e70f87ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?tr=C3=A9meur?= Date: Fri, 28 Mar 2025 20:37:35 +0000 Subject: [PATCH 04/10] Add dA emoticons --- snippets/org-mode/animesweat | 4 ++++ snippets/org-mode/aww | 4 ++++ snippets/org-mode/biggrin | 4 ++++ snippets/org-mode/blankstare | 4 ++++ snippets/org-mode/bleh | 4 ++++ snippets/org-mode/boogie | 4 ++++ snippets/org-mode/bounce | 4 ++++ snippets/org-mode/bow | 4 ++++ snippets/org-mode/bump | 4 ++++ snippets/org-mode/cd | 4 ++++ snippets/org-mode/clap | 4 ++++ snippets/org-mode/confused | 4 ++++ snippets/org-mode/cool | 4 ++++ snippets/org-mode/dance | 4 ++++ snippets/org-mode/dead | 4 ++++ snippets/org-mode/eager | 4 ++++ snippets/org-mode/eek | 4 ++++ snippets/org-mode/giggle | 4 ++++ snippets/org-mode/headbang | 4 ++++ snippets/org-mode/hmm | 4 ++++ snippets/org-mode/la | 4 ++++ snippets/org-mode/lmao | 4 ++++ snippets/org-mode/meow | 4 ++++ snippets/org-mode/ninja | 4 ++++ snippets/org-mode/nod | 4 ++++ snippets/org-mode/ohnoes | 4 ++++ snippets/org-mode/razz | 4 ++++ snippets/org-mode/rofl | 4 ++++ snippets/org-mode/sad | 4 ++++ snippets/org-mode/shrug | 4 ++++ snippets/org-mode/smile | 4 ++++ snippets/org-mode/tombstone | 4 ++++ snippets/org-mode/tongue | 4 ++++ snippets/org-mode/typing | 4 ++++ snippets/org-mode/wave | 4 ++++ snippets/org-mode/wink | 4 ++++ snippets/org-mode/winkrazz | 4 ++++ snippets/org-mode/woot | 4 ++++ snippets/org-mode/worry | 4 ++++ snippets/org-mode/worship | 4 ++++ snippets/org-mode/xd | 4 ++++ 41 files changed, 164 insertions(+) create mode 100644 snippets/org-mode/animesweat create mode 100644 snippets/org-mode/aww create mode 100644 snippets/org-mode/biggrin create mode 100644 snippets/org-mode/blankstare create mode 100644 snippets/org-mode/bleh create mode 100644 snippets/org-mode/boogie create mode 100644 snippets/org-mode/bounce create mode 100644 snippets/org-mode/bow create mode 100644 snippets/org-mode/bump create mode 100644 snippets/org-mode/cd create mode 100644 snippets/org-mode/clap create mode 100644 snippets/org-mode/confused create mode 100644 snippets/org-mode/cool create mode 100644 snippets/org-mode/dance create mode 100644 snippets/org-mode/dead create mode 100644 snippets/org-mode/eager create mode 100644 snippets/org-mode/eek create mode 100644 snippets/org-mode/giggle create mode 100644 snippets/org-mode/headbang create mode 100644 snippets/org-mode/hmm create mode 100644 snippets/org-mode/la create mode 100644 snippets/org-mode/lmao create mode 100644 snippets/org-mode/meow create mode 100644 snippets/org-mode/ninja create mode 100644 snippets/org-mode/nod create mode 100644 snippets/org-mode/ohnoes create mode 100644 snippets/org-mode/razz create mode 100644 snippets/org-mode/rofl create mode 100644 snippets/org-mode/sad create mode 100644 snippets/org-mode/shrug create mode 100644 snippets/org-mode/smile create mode 100644 snippets/org-mode/tombstone create mode 100644 snippets/org-mode/tongue create mode 100644 snippets/org-mode/typing create mode 100644 snippets/org-mode/wave create mode 100644 snippets/org-mode/wink create mode 100644 snippets/org-mode/winkrazz create mode 100644 snippets/org-mode/woot create mode 100644 snippets/org-mode/worry create mode 100644 snippets/org-mode/worship create mode 100644 snippets/org-mode/xd diff --git a/snippets/org-mode/animesweat b/snippets/org-mode/animesweat new file mode 100644 index 0000000..b846395 --- /dev/null +++ b/snippets/org-mode/animesweat @@ -0,0 +1,4 @@ +# name: animesweat +# key: :animesweat: +# -- +[[https://tre.praze.net/legend/animesweat.gif]] \ No newline at end of file diff --git a/snippets/org-mode/aww b/snippets/org-mode/aww new file mode 100644 index 0000000..a4a835e --- /dev/null +++ b/snippets/org-mode/aww @@ -0,0 +1,4 @@ +# name: aww +# key: :aww: +# -- +[[https://tre.praze.net/legend/aww.gif]] \ No newline at end of file diff --git a/snippets/org-mode/biggrin b/snippets/org-mode/biggrin new file mode 100644 index 0000000..72a0ac5 --- /dev/null +++ b/snippets/org-mode/biggrin @@ -0,0 +1,4 @@ +# name: biggrin +# key: :biggrin: +# -- +[[https://tre.praze.net/legend/biggrin.gif]] \ No newline at end of file diff --git a/snippets/org-mode/blankstare b/snippets/org-mode/blankstare new file mode 100644 index 0000000..af8884c --- /dev/null +++ b/snippets/org-mode/blankstare @@ -0,0 +1,4 @@ +# name: blankstare +# key: :blankstare: +# -- +[[https://tre.praze.net/legend/blankstare.gif]] \ No newline at end of file diff --git a/snippets/org-mode/bleh b/snippets/org-mode/bleh new file mode 100644 index 0000000..c1776d5 --- /dev/null +++ b/snippets/org-mode/bleh @@ -0,0 +1,4 @@ +# name: bleh +# key: :bleh: +# -- +[[https://tre.praze.net/legend/bleh.gif]] \ No newline at end of file diff --git a/snippets/org-mode/boogie b/snippets/org-mode/boogie new file mode 100644 index 0000000..8a588f1 --- /dev/null +++ b/snippets/org-mode/boogie @@ -0,0 +1,4 @@ +# name: boogie +# key: :boogie: +# -- +[[https://tre.praze.net/legend/boogie.gif]] \ No newline at end of file diff --git a/snippets/org-mode/bounce b/snippets/org-mode/bounce new file mode 100644 index 0000000..153bc9e --- /dev/null +++ b/snippets/org-mode/bounce @@ -0,0 +1,4 @@ +# name: bounce +# key: :bounce: +# -- +[[https://tre.praze.net/legend/bounce.gif]] \ No newline at end of file diff --git a/snippets/org-mode/bow b/snippets/org-mode/bow new file mode 100644 index 0000000..d4676bb --- /dev/null +++ b/snippets/org-mode/bow @@ -0,0 +1,4 @@ +# name: bow +# key: :bow: +# -- +[[https://tre.praze.net/legend/bow.gif]] \ No newline at end of file diff --git a/snippets/org-mode/bump b/snippets/org-mode/bump new file mode 100644 index 0000000..b5413f4 --- /dev/null +++ b/snippets/org-mode/bump @@ -0,0 +1,4 @@ +# name: bump +# key: :bump: +# -- +[[https://tre.praze.net/legend/bump.gif]] \ No newline at end of file diff --git a/snippets/org-mode/cd b/snippets/org-mode/cd new file mode 100644 index 0000000..a4f5a6a --- /dev/null +++ b/snippets/org-mode/cd @@ -0,0 +1,4 @@ +# name: cd +# key: :cd: +# -- +[[https://tre.praze.net/legend/cd.gif]] \ No newline at end of file diff --git a/snippets/org-mode/clap b/snippets/org-mode/clap new file mode 100644 index 0000000..92937d3 --- /dev/null +++ b/snippets/org-mode/clap @@ -0,0 +1,4 @@ +# name: clap +# key: :clap: +# -- +[[https://tre.praze.net/legend/clap.gif]] \ No newline at end of file diff --git a/snippets/org-mode/confused b/snippets/org-mode/confused new file mode 100644 index 0000000..4d8063b --- /dev/null +++ b/snippets/org-mode/confused @@ -0,0 +1,4 @@ +# name: confused +# key: :confused: +# -- +[[https://tre.praze.net/legend/confused.gif]] \ No newline at end of file diff --git a/snippets/org-mode/cool b/snippets/org-mode/cool new file mode 100644 index 0000000..ebad4e4 --- /dev/null +++ b/snippets/org-mode/cool @@ -0,0 +1,4 @@ +# name: cool +# key: :cool: +# -- +[[https://tre.praze.net/legend/cool.gif]] \ No newline at end of file diff --git a/snippets/org-mode/dance b/snippets/org-mode/dance new file mode 100644 index 0000000..9be82af --- /dev/null +++ b/snippets/org-mode/dance @@ -0,0 +1,4 @@ +# name: dance +# key: :dance: +# -- +[[https://tre.praze.net/legend/dance.gif]] \ No newline at end of file diff --git a/snippets/org-mode/dead b/snippets/org-mode/dead new file mode 100644 index 0000000..4bedf4b --- /dev/null +++ b/snippets/org-mode/dead @@ -0,0 +1,4 @@ +# name: dead +# key: :dead: +# -- +[[https://tre.praze.net/legend/dead.gif]] \ No newline at end of file diff --git a/snippets/org-mode/eager b/snippets/org-mode/eager new file mode 100644 index 0000000..f0f91a5 --- /dev/null +++ b/snippets/org-mode/eager @@ -0,0 +1,4 @@ +# name: eager +# key: :eager: +# -- +[[https://tre.praze.net/legend/eager.gif]] \ No newline at end of file diff --git a/snippets/org-mode/eek b/snippets/org-mode/eek new file mode 100644 index 0000000..41e3ada --- /dev/null +++ b/snippets/org-mode/eek @@ -0,0 +1,4 @@ +# name: eek +# key: :eek: +# -- +[[https://tre.praze.net/legend/eek.gif]] \ No newline at end of file diff --git a/snippets/org-mode/giggle b/snippets/org-mode/giggle new file mode 100644 index 0000000..d70abdf --- /dev/null +++ b/snippets/org-mode/giggle @@ -0,0 +1,4 @@ +# name: giggle +# key: :giggle: +# -- +[[https://tre.praze.net/legend/giggle.gif]] \ No newline at end of file diff --git a/snippets/org-mode/headbang b/snippets/org-mode/headbang new file mode 100644 index 0000000..62c7493 --- /dev/null +++ b/snippets/org-mode/headbang @@ -0,0 +1,4 @@ +# name: headbang +# key: :headbang: +# -- +[[https://tre.praze.net/legend/headbang.gif]] \ No newline at end of file diff --git a/snippets/org-mode/hmm b/snippets/org-mode/hmm new file mode 100644 index 0000000..15165b1 --- /dev/null +++ b/snippets/org-mode/hmm @@ -0,0 +1,4 @@ +# name: hmm +# key: :hmm: +# -- +[[https://tre.praze.net/legend/hmm.gif]] \ No newline at end of file diff --git a/snippets/org-mode/la b/snippets/org-mode/la new file mode 100644 index 0000000..3342279 --- /dev/null +++ b/snippets/org-mode/la @@ -0,0 +1,4 @@ +# name: la +# key: :la: +# -- +[[https://tre.praze.net/legend/la.gif]] \ No newline at end of file diff --git a/snippets/org-mode/lmao b/snippets/org-mode/lmao new file mode 100644 index 0000000..ba356d7 --- /dev/null +++ b/snippets/org-mode/lmao @@ -0,0 +1,4 @@ +# name: lmao +# key: :lmao: +# -- +[[https://tre.praze.net/legend/lmao.gif]] \ No newline at end of file diff --git a/snippets/org-mode/meow b/snippets/org-mode/meow new file mode 100644 index 0000000..f2950b8 --- /dev/null +++ b/snippets/org-mode/meow @@ -0,0 +1,4 @@ +# name: meow +# key: :meow: +# -- +[[https://tre.praze.net/legend/meow.gif]] \ No newline at end of file diff --git a/snippets/org-mode/ninja b/snippets/org-mode/ninja new file mode 100644 index 0000000..3099c3d --- /dev/null +++ b/snippets/org-mode/ninja @@ -0,0 +1,4 @@ +# name: ninja +# key: :ninja: +# -- +[[https://tre.praze.net/legend/ninja.gif]] \ No newline at end of file diff --git a/snippets/org-mode/nod b/snippets/org-mode/nod new file mode 100644 index 0000000..477ff1c --- /dev/null +++ b/snippets/org-mode/nod @@ -0,0 +1,4 @@ +# name: nod +# key: :nod: +# -- +[[https://tre.praze.net/legend/nod.gif]] \ No newline at end of file diff --git a/snippets/org-mode/ohnoes b/snippets/org-mode/ohnoes new file mode 100644 index 0000000..967399a --- /dev/null +++ b/snippets/org-mode/ohnoes @@ -0,0 +1,4 @@ +# name: ohnoes +# key: :ohnoes: +# -- +[[https://tre.praze.net/legend/ohnoes.gif]] \ No newline at end of file diff --git a/snippets/org-mode/razz b/snippets/org-mode/razz new file mode 100644 index 0000000..f9b49f2 --- /dev/null +++ b/snippets/org-mode/razz @@ -0,0 +1,4 @@ +# name: razz +# key: :razz: +# -- +[[https://tre.praze.net/legend/razz.gif]] \ No newline at end of file diff --git a/snippets/org-mode/rofl b/snippets/org-mode/rofl new file mode 100644 index 0000000..98a16ab --- /dev/null +++ b/snippets/org-mode/rofl @@ -0,0 +1,4 @@ +# name: rofl +# key: :rofl: +# -- +[[https://tre.praze.net/legend/rofl.gif]] \ No newline at end of file diff --git a/snippets/org-mode/sad b/snippets/org-mode/sad new file mode 100644 index 0000000..7e0492e --- /dev/null +++ b/snippets/org-mode/sad @@ -0,0 +1,4 @@ +# name: sad +# key: :sad: +# -- +[[https://tre.praze.net/legend/sad.gif]] \ No newline at end of file diff --git a/snippets/org-mode/shrug b/snippets/org-mode/shrug new file mode 100644 index 0000000..737806e --- /dev/null +++ b/snippets/org-mode/shrug @@ -0,0 +1,4 @@ +# name: shrug +# key: :shrug: +# -- +[[https://tre.praze.net/legend/shrug.gif]] \ No newline at end of file diff --git a/snippets/org-mode/smile b/snippets/org-mode/smile new file mode 100644 index 0000000..3869b46 --- /dev/null +++ b/snippets/org-mode/smile @@ -0,0 +1,4 @@ +# name: smile +# key: :smile: +# -- +[[https://tre.praze.net/legend/smile.gif]] \ No newline at end of file diff --git a/snippets/org-mode/tombstone b/snippets/org-mode/tombstone new file mode 100644 index 0000000..cbc6a93 --- /dev/null +++ b/snippets/org-mode/tombstone @@ -0,0 +1,4 @@ +# name: tombstone +# key: :tombstone: +# -- +[[https://tre.praze.net/legend/tombstone.gif]] \ No newline at end of file diff --git a/snippets/org-mode/tongue b/snippets/org-mode/tongue new file mode 100644 index 0000000..7e0afaa --- /dev/null +++ b/snippets/org-mode/tongue @@ -0,0 +1,4 @@ +# name: tongue +# key: :tongue: +# -- +[[https://tre.praze.net/legend/tongue.gif]] \ No newline at end of file diff --git a/snippets/org-mode/typing b/snippets/org-mode/typing new file mode 100644 index 0000000..dbe46c1 --- /dev/null +++ b/snippets/org-mode/typing @@ -0,0 +1,4 @@ +# name: typing +# key: :typing: +# -- +[[https://tre.praze.net/legend/typing.gif]] \ No newline at end of file diff --git a/snippets/org-mode/wave b/snippets/org-mode/wave new file mode 100644 index 0000000..59d15b8 --- /dev/null +++ b/snippets/org-mode/wave @@ -0,0 +1,4 @@ +# name: wave +# key: :wave: +# -- +[[https://tre.praze.net/legend/wave.gif]] \ No newline at end of file diff --git a/snippets/org-mode/wink b/snippets/org-mode/wink new file mode 100644 index 0000000..e087614 --- /dev/null +++ b/snippets/org-mode/wink @@ -0,0 +1,4 @@ +# name: wink +# key: :wink: +# -- +[[https://tre.praze.net/legend/wink.gif]] \ No newline at end of file diff --git a/snippets/org-mode/winkrazz b/snippets/org-mode/winkrazz new file mode 100644 index 0000000..80d691e --- /dev/null +++ b/snippets/org-mode/winkrazz @@ -0,0 +1,4 @@ +# name: winkrazz +# key: :winkrazz: +# -- +[[https://tre.praze.net/legend/winkrazz.gif]] \ No newline at end of file diff --git a/snippets/org-mode/woot b/snippets/org-mode/woot new file mode 100644 index 0000000..c2a7ebe --- /dev/null +++ b/snippets/org-mode/woot @@ -0,0 +1,4 @@ +# name: woot +# key: :woot: +# -- +[[https://tre.praze.net/legend/woot.gif]] \ No newline at end of file diff --git a/snippets/org-mode/worry b/snippets/org-mode/worry new file mode 100644 index 0000000..15b766c --- /dev/null +++ b/snippets/org-mode/worry @@ -0,0 +1,4 @@ +# name: worry +# key: :worry: +# -- +[[https://tre.praze.net/legend/worry.gif]] \ No newline at end of file diff --git a/snippets/org-mode/worship b/snippets/org-mode/worship new file mode 100644 index 0000000..f5d8475 --- /dev/null +++ b/snippets/org-mode/worship @@ -0,0 +1,4 @@ +# name: worship +# key: :worship: +# -- +[[https://tre.praze.net/legend/worship.gif]] \ No newline at end of file diff --git a/snippets/org-mode/xd b/snippets/org-mode/xd new file mode 100644 index 0000000..e15218e --- /dev/null +++ b/snippets/org-mode/xd @@ -0,0 +1,4 @@ +# name: xd +# key: :xd: +# -- +[[https://tre.praze.net/legend/xd.gif]] \ No newline at end of file From 2326330025528bbaa46cd8b8855c001dd680c3be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?tr=C3=A9meur?= Date: Fri, 28 Mar 2025 20:38:14 +0000 Subject: [PATCH 05/10] Change name on fic exports --- custom/fic.el | 4 ++-- fic-export-files/header.tex | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/custom/fic.el b/custom/fic.el index 523c964..8de950b 100644 --- a/custom/fic.el +++ b/custom/fic.el @@ -68,8 +68,8 @@ (goto-char (point-min)) (while (re-search-forward "\\[fn:\\([0-9]*\\):\\([^•]*\\)•\\]" nil t) (replace-match "@@html:@@@@latex:\\\\footnote{@@\\2@@html:@@@@latex:}@@")) - (let ((user-full-name "“Tré”") - (org-html-head "\n\n\n\n\n\n\n\n\n\n") + (let ((user-full-name "Mez") + (org-html-head "\n\n\n\n\n\n\n\n\n\n") (org-export-with-author t) (org-latex-default-class "memoir")) (org-html-export-to-html) diff --git a/fic-export-files/header.tex b/fic-export-files/header.tex index eb01d04..59cf351 100644 --- a/fic-export-files/header.tex +++ b/fic-export-files/header.tex @@ -117,7 +117,7 @@ \end{minipage} \hspace{0.05\textwidth} \begin{minipage}{0.6\textwidth} - {\Large ``TRÉ''} \\ + {\Large MEZ} \\ \rule{0.9\textwidth}{1pt} \par \vspace{3\baselineskip} {\noindent\Huge\bfseries A SHOT} \par From 0ae65fea85e429ef21c5beb3feadd5dcc35c296c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?tr=C3=A9meur?= Date: Fri, 28 Mar 2025 20:38:27 +0000 Subject: [PATCH 06/10] TCG functions --- custom/colors.el | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 custom/colors.el diff --git a/custom/colors.el b/custom/colors.el new file mode 100644 index 0000000..b4ac121 --- /dev/null +++ b/custom/colors.el @@ -0,0 +1,7 @@ +(defun cardimgs (start end) + "Insert HTML string for card images" + (interactive "r") + (setq original (buffer-substring (region-beginning) (region-end))) + (delete-region start end) + (setq imgs (replace-regexp-in-string ", " ".gif\">"))) From b8890b01765c384c591c4c79feba2b82c8cfd837 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?tr=C3=A9meur?= Date: Sun, 13 Apr 2025 15:30:07 +0100 Subject: [PATCH 07/10] Remove unused packages --- config.org | 119 ++++++++++++++--------------------------------------- 1 file changed, 32 insertions(+), 87 deletions(-) diff --git a/config.org b/config.org index 4d6922a..57533fd 100644 --- a/config.org +++ b/config.org @@ -18,7 +18,7 @@ (load-directory (concat (file-name-as-directory fileroot) "admin/emacs/custom/")) #+END_SRC -* =$whoami=, a big neckbeard, that’s who +* Identity Set name and location based on who I’m being right now. @@ -30,16 +30,7 @@ Set name and location based on who I’m being right now. (load-file (concat (file-name-as-directory fileroot) "admin/emacs/identity-home.el")))) #+END_SRC -* Sonic arts - -Stop Emacs making sounds. I don’t think it ever made sounds before, but everyone is very insistent about the need to stop Emacs making sounds. - -#+BEGIN_SRC emacs-lisp - (setq ring-bell-function 'ignore) - (setq visible-bell t) -#+END_SRC - -Also suppress certain warnings that would otherwise come up all the time and contribute very little to the experience. +* Suppress certain warnings #+BEGIN_SRC emacs-lisp (setq ad-redefinition-action 'accept) @@ -57,7 +48,7 @@ I don’t want finding files to be case-sensitive, same as in =zsh=: (setq read-buffer-completion-ignore-case t) #+END_SRC -Make the +window+ /frame/ look nice and clean. Scroll bars behave pointlessly on Windows anyway. Not hiding the menu bar because I’m not quite that leet yet. One day … +Remove certain graphical elements. #+BEGIN_SRC emacs-lisp (setq inhibit-startup-screen t) @@ -76,7 +67,7 @@ Make everything just a little tiny bit transparent unless I’m using the boring (add-to-list 'default-frame-alist '(alpha . 95)))) #+END_SRC -Stop creating all those =~= files everywhere. Put them somewhere that I can ignore them. +Stop creating all those =~= files everywhere. Put them somewhere I can ignore them. #+BEGIN_SRC emacs-lisp (setq backup-directory-alist '(("." . "~/.emacs.d/backups"))) @@ -129,7 +120,7 @@ And to narrow to them. (put 'narrow-to-region 'disabled nil) #+END_SRC -It’s +2022+ +2023+ nearly the second half of 2024. +It’s +2022+ +2023+ unquestionably the python3 era. #+BEGIN_SRC emacs-lisp (setq python-shell-interpreter "python3") @@ -187,7 +178,7 @@ Android has enormous issues with keybindings, so requiring =yes-or-no-p= where p * =use-package= -Set up package handling, including =use-package=. Some of the =org= tools I use are from Non-GNU ELPA, I think. Most of this is the standard =use-package= setup stuff. +Set up package handling, including =use-package= in the standard way. #+BEGIN_SRC emacs-lisp (unless (string-equal system-type "android") @@ -227,23 +218,6 @@ I use BibLaTeX for better compatibility with accented characters and generally b (setq bibtex-dialect 'biblatex))) #+END_SRC -** =calibredb= - -This may work only on Linux (it uses SQL???), but my ebooks are only on Linux so that’s ok. - -#+BEGIN_SRC emacs-lisp - (when (string-equal system-type "gnu/linux") - (use-package calibredb - :defer t - :config - (setq calibredb-root-dir "~/Documents/calibre/books") - (setq calibredb-db-dir (expand-file-name "metadata.db" calibredb-root-dir)) - (setq calibredb-library-alist '(("~/Documents/calibre/books") - ("~/Documents/calibre/ficrecs"))) - (setq calibredb-sort-by 'author) - (setq calibredb-order 'asc))) -#+END_SRC - ** =csv-mode= #+BEGIN_SRC emacs-lisp @@ -259,7 +233,7 @@ This may work only on Linux (it uses SQL???), but my ebooks are only on Linux so ** =deft= -Let me search my journal files when I’m not at work, and reading notes otherwise. Set regexp search by default. +Lets me search my journal files when I’m not at work, and reading notes otherwise. Set regexp search by default. #+BEGIN_SRC emacs-lisp (unless (string-equal system-type "android") @@ -292,7 +266,7 @@ Dims inactive buffers. Adjustments for =modus-themes= as suggested. ** =doom-modeline= -Much nicer-looking modeline, and still my favourite over newer, trendier options. Last time I tried installing this from MELPA it made Emacs crash; I don’t know if this is fixed yet. +Much nicer-looking modeline. #+BEGIN_SRC emacs-lisp (unless (string-equal system-type "android") @@ -309,7 +283,7 @@ Much nicer-looking modeline, and still my favourite over newer, trendier options ** =git-gutter= -Shows, or at least purports to show, =git diff= in the left margin if the file is being tracked by =git=. +Shows =git diff= in the left margin if the file is being tracked by =git=. #+BEGIN_SRC emacs-lisp (unless (string-equal system-type "android") @@ -375,7 +349,7 @@ Lists minor modes in a menu. ** =mu4e= -I really only use this for DW posts, but I’m constantly surprised by how well it works. This package is the reason I can’t upgrade to =emacs28=, because it doesn’t currently seem to work; also, it uses =cl=, which is deprecated, hence suppressing warnings about it above. +Does this work in emacs28??? #+BEGIN_SRC emacs-lisp (when (string-equal system-type "gnu/linux") @@ -419,52 +393,7 @@ Attempting to do TEI stuff at work but I can’t link directly to the =.rnc= fil (lambda () (local-set-key (kbd "") 'completion-at-point)))) #+END_SRC -Show path of current element (from [[https://emacs.stackexchange.com/questions/28606/how-to-show-xpath-for-current-location-in-an-xml-hierarchy-in-the-modeline][here]]). - -#+BEGIN_SRC emacs-lisp - (unless (string-equal system-type "android") - (defun nxml-where () - "Display the hierarchy of XML elements the point is on as a path." - (interactive) - (let ((path nil)) - (save-excursion - (save-restriction - (widen) - (while (and (< (point-min) (point)) ;; Doesn't error if point is at beginning of buffer - (condition-case nil - (progn - (nxml-backward-up-element) ; always returns nil - t) - (error nil))) - (setq path (cons (xmltok-start-tag-local-name) path))) - (if (called-interactively-p t) - (message "/%s" (mapconcat 'identity path "/")) - (format "/%s" (mapconcat 'identity path "/"))))))) - (defun xml-find-file-hook () - (when (derived-mode-p 'nxml-mode) - (which-function-mode t) - (setq which-func-mode t) - (add-hook 'which-func-functions 'nxml-where t t))) - (add-hook 'find-file-hook 'xml-find-file-hook t)) -#+END_SRC - -** =nov= - -For reading ebooks. Only on Linux because I (supposedly) use it with my calibre library. - -#+BEGIN_SRC emacs-lisp - (when (string-equal system-type "gnu/linux") - (use-package nov - :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)) -#+END_SRC - -** =org= my love +** =org= *** Initial settings @@ -524,7 +453,7 @@ Track when I complete todos. *** Export settings -This can set certain headlines not to be exported. I haven’t used it yet but it sounds useful. +Allow setting certain headlines not to be exported. #+BEGIN_SRC emacs-lisp (unless (string-equal system-type "android") @@ -557,7 +486,7 @@ Add a couple of classes for LaTeX export. ("\\subsubsection{%s}" . "\\subsubsection*{%s}")))) #+END_SRC -Settings for export, mostly for DW post previews but also fic?? And work I guess, I do that sometimes. +General export settings: #+BEGIN_SRC emacs-lisp (setq org-export-headline-levels 6) @@ -603,6 +532,22 @@ Export non-breaking spaces properly; from, believe it or not, [[https://orgmode. 'my-latex-filter-nobreaks)) #+END_SRC +Export external links as ~target= “_blank”~, from [[https://emacs.stackexchange.com/a/48869][here]]: + +#+BEGIN_SRC emacs-lisp + (defun my-org-export-add-target-blank-to-http-links (text backend info) + "Add target=\"_blank\" to external links." + (when (and + (org-export-derived-backend-p backend 'html) + (string-match "href=\"http[^\"]+" text) + (not (string-match "target=\"" text))) + (string-match " Date: Sun, 20 Apr 2025 11:18:34 +0100 Subject: [PATCH 08/10] Stop org-mode export adding file:// to relative links --- config.org | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/config.org b/config.org index 57533fd..35d51e6 100644 --- a/config.org +++ b/config.org @@ -548,6 +548,21 @@ Export external links as ~target= “_blank”~, from [[https://emacs.stackexcha 'my-org-export-add-target-blank-to-http-links) #+END_SRC +Get rid of =file://= using the same method. + +#+BEGIN_SRC emacs-lisp + (defun my-org-export-correct-file-links (text backend info) + "Add target=\"_blank\" to external links." + (when (and + (org-export-derived-backend-p backend 'html) + (string-match "href=\"file[^\"]+" text)) + (string-match "file://" text) + (replace-match "" nil nil text))) + + (add-to-list 'org-export-filter-link-functions + 'my-org-export-correct-file-links) +#+END_SRC + *** Packages **** =org-agenda-property= From 613efa90df404c33b7d342aa709b3734b4375505 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?tr=C3=A9meur?= Date: Sun, 20 Apr 2025 11:19:18 +0100 Subject: [PATCH 09/10] with the right docstring this time --- config.org | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.org b/config.org index 35d51e6..515bf24 100644 --- a/config.org +++ b/config.org @@ -552,7 +552,7 @@ Get rid of =file://= using the same method. #+BEGIN_SRC emacs-lisp (defun my-org-export-correct-file-links (text backend info) - "Add target=\"_blank\" to external links." + "Remove generate file:// in relative links." (when (and (org-export-derived-backend-p backend 'html) (string-match "href=\"file[^\"]+" text)) From a6e848bcf2523cc4fa319b31ec66e8f198382972 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?tr=C3=A9meur?= Date: Sun, 20 Apr 2025 11:19:45 +0100 Subject: [PATCH 10/10] =?UTF-8?q?=E2=80=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config.org | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.org b/config.org index 515bf24..1b2a55f 100644 --- a/config.org +++ b/config.org @@ -552,7 +552,7 @@ Get rid of =file://= using the same method. #+BEGIN_SRC emacs-lisp (defun my-org-export-correct-file-links (text backend info) - "Remove generate file:// in relative links." + "Remove generated file:// in relative links." (when (and (org-export-derived-backend-p backend 'html) (string-match "href=\"file[^\"]+" text))