Compare commits
10 commits
d4f8229b7f
...
a6e848bcf2
Author | SHA1 | Date | |
---|---|---|---|
a6e848bcf2 | |||
613efa90df | |||
ba3fb5be9f | |||
b8890b0176 | |||
0ae65fea85 | |||
2326330025 | |||
2511cc9936 | |||
7a7e356657 | |||
0b01d4fc25 | |||
e73e938484 |
51 changed files with 236 additions and 273 deletions
134
config.org
134
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 "<tab>") '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,37 @@ 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 "<a " text)
|
||||
(replace-match "<a target=\"_blank\" " nil nil text)))
|
||||
|
||||
(add-to-list 'org-export-filter-link-functions
|
||||
'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)
|
||||
"Remove generated file:// in relative 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=
|
||||
|
@ -663,7 +623,7 @@ Use =org-modern=. [[https://github.com/minad/org-modern/issues/5#issuecomment-13
|
|||
|
||||
**** =org-noter=
|
||||
|
||||
RIP =interleave=, but this does ok as a replacement.
|
||||
Annotate PDFs (kind of) in org-mode.
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(unless (string-equal system-type "android")
|
||||
|
@ -821,7 +781,7 @@ Gives me a dialog with recently opened files. Package management stuff has to be
|
|||
|
||||
** =tex=
|
||||
|
||||
As previously described, “the big boy”. I know little about most of these settings, but I think they’re the default ones.
|
||||
Probably the default settings.
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(unless (string-equal system-type "android")
|
||||
|
@ -880,7 +840,7 @@ This is good for auto indentation, folding, killing elements, apparently XPath??
|
|||
|
||||
** =yasnippet=
|
||||
|
||||
Per-mode text expansion. What a lifechanger.
|
||||
Per-mode text expansion.
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(unless (string-equal system-type "android")
|
||||
|
|
|
@ -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)"
|
||||
|
|
7
custom/colors.el
Normal file
7
custom/colors.el
Normal file
|
@ -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\"><img src=\"https://colors-tcg.eu/cards/" original))
|
||||
(insert (concat "<img src=\"https://colors-tcg.eu/cards/" imgs ".gif\">")))
|
145
custom/dwpost.el
145
custom/dwpost.el
|
@ -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 "<body>\n"))
|
||||
(delete-region (point-min) delpoint-one)
|
||||
(goto-char (point-max))
|
||||
(setq delpoint-two (search-backward "</body>"))
|
||||
(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)))))
|
|
@ -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 "<a href=\"https://" theuser ".dreamwidth.org/profile\" rel=\"nofollow\"><img src=\"https://www.dreamwidth.org/img/silk/identity/user.png\" width=\"17\" height=\"17\" /></a><b><a href=\"https://" theuser ".dreamwidth.org\" rel=\"nofollow\">" theuser "</a></b>"))
|
||||
(insert (concat "<span style=\"white-space: nowrap;\" class=\"ljuser\"><a href=\"https://" theuser ".dreamwidth.org/profile\"><img src=\"https://www.dreamwidth.org/img/silk/identity/user.png\" alt=\"[personal profile]\" width=\"17\" height=\"17\" style=\"vertical-align: text-bottom; border: 0; padding-right: 1px;\" /></a><a href=\"https://" theuser ".dreamwidth.org/\"><b>" theuser "</b></a></span>"))))
|
||||
(setq userdisplay (subst-char-in-string ?- ?_ theuser))
|
||||
(setq userlink (subst-char-in-string ?_ ?- theuser))
|
||||
(insert (concat "<a href=\"https://" userlink ".dreamwidth.org/profile\">~</a><a href=\"https://" userlink ".dreamwidth.org\">" userdisplay "</a>")))
|
||||
|
||||
(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 "<a href=\"https://" theuser ".dreamwidth.org/profile\" rel=\"nofollow\"><img src=\"https://www.dreamwidth.org/img/silk/identity/community.png\" width=\"17\" height=\"17\" /></a><b><a href=\"https://" theuser ".dreamwidth.org\" rel=\"nofollow\">" theuser "</a></b>"))
|
||||
(insert (concat "<span style=\"white-space: nowrap;\" class=\"ljuser\"><a href=\"https://" theuser ".dreamwidth.org/profile\"><img src=\"https://www.dreamwidth.org/img/silk/identity/community.png\" alt=\"[community profile]\" width=\"17\" height=\"17\" style=\"vertical-align: text-bottom; border: 0; padding-right: 1px;\" /></a><a href=\"https://" theuser ".dreamwidth.org/\"><b>" theuser "</b></a></span>"))))
|
||||
|
||||
(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 "<a href=\"https://archiveofourown.org/users/" theuser "/profile\" rel=\"nofollow\"><img src=\"https://p.dreamwidth.org/b164c54b26e4/-/archiveofourown.org/favicon.ico\" width=\"16\" height=\"16\" /></a><b><a href=\"https://archiveofourown.org/users/" theuser "\" rel=\"nofollow\">" theuser "</a></b>"))
|
||||
(insert (concat "<span style=\"white-space: nowrap;\" class=\"ljuser\"><a href=\"https://archiveofourown.org/users/" theuser "/profile\"><img src=\"https://p.dreamwidth.org/b164c54b26e4/-/archiveofourown.org/favicon.ico\" alt=\"[archiveofourown.org profile]\" width=\"16\" height=\"16\" style=\"vertical-align: text-bottom; border: 0; padding-right: 1px;\" /></a><a href=\"https://archiveofourown.org/users/" theuser "\"><b>" theuser "</b></a></span>"))))
|
||||
(setq userdisplay (subst-char-in-string ?- ?_ theuser))
|
||||
(setq userlink (subst-char-in-string ?_ ?- theuser))
|
||||
(insert (concat "<a href=\"https://" userlink ".dreamwidth.org/profile\">/</a><a href=\"https://" userlink ".dreamwidth.org\">" userdisplay "</a>")))
|
||||
|
|
|
@ -68,8 +68,8 @@
|
|||
(goto-char (point-min))
|
||||
(while (re-search-forward "\\[fn:\\([0-9]*\\):\\([^•]*\\)•\\]" nil t)
|
||||
(replace-match "@@html:<label for=\"\\1\" class=\"margin-toggle sidenote-number\"></label><input type=\"checkbox\" id=\"\\1\" class=\"margin-toggle\"/><span class=\"sidenote\">@@@@latex:\\\\footnote{@@\\2@@html:</span>@@@@latex:}@@"))
|
||||
(let ((user-full-name "“Tré”")
|
||||
(org-html-head "<link rel=\"stylesheet\" href=\"/fic/tufte.css\"/>\n<link rel=\"stylesheet\" href=\"/home/mdd/Documents/proj/fic-archive/build/tufte.css\"/>\n<meta name=\"theme-color\" media=\"(prefers-color-scheme: light)\" content=\"#fffff8\" />\n<meta name=\"theme-color\" media=\"(prefers-color-scheme: dark)\" content=\"#151515\" />\n<meta property=\"og:title\" content=\"Tré’s fanfiction\">\n<meta property=\"og:type\" content=\"article\">\n<meta property=\"og:image\" content=\"https://tre.praze.net/ab.png\">\n<meta name=\"description\" property=\"og:description\" content=\"Fanfiction on tre.praze.net\">\n<meta property=\"og:locale\" content=\"en_GB\">\n<meta property=\"og:site_name\" content=\"tre.praze.net\">\n<meta name=\"fediverse:creator\" content=\"@tre@ple.praze.net\">")
|
||||
(let ((user-full-name "Mez")
|
||||
(org-html-head "<link rel=\"stylesheet\" href=\"/fic/tufte.css\"/>\n<link rel=\"stylesheet\" href=\"/home/mdd/Documents/proj/fic-archive/build/tufte.css\"/>\n<meta name=\"theme-color\" media=\"(prefers-color-scheme: light)\" content=\"#fffff8\" />\n<meta name=\"theme-color\" media=\"(prefers-color-scheme: dark)\" content=\"#151515\" />\n<meta property=\"og:title\" content=\"Mez’s fanfiction\">\n<meta property=\"og:type\" content=\"article\">\n<meta property=\"og:image\" content=\"https://tre.praze.net/ab.png\">\n<meta name=\"description\" property=\"og:description\" content=\"Fanfiction on tre.praze.net\">\n<meta property=\"og:locale\" content=\"en_GB\">\n<meta property=\"og:site_name\" content=\"tre.praze.net\">\n<meta name=\"fediverse:creator\" content=\"@tre@ple.praze.net\">")
|
||||
(org-export-with-author t)
|
||||
(org-latex-default-class "memoir"))
|
||||
(org-html-export-to-html)
|
||||
|
|
|
@ -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
|
||||
|
@ -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!}}}
|
||||
{\scriptsize{\yevon Now is the time to shape your stories Your fate is in your hands}}}
|
4
snippets/org-mode/animesweat
Normal file
4
snippets/org-mode/animesweat
Normal file
|
@ -0,0 +1,4 @@
|
|||
# name: animesweat
|
||||
# key: :animesweat:
|
||||
# --
|
||||
[[https://tre.praze.net/legend/animesweat.gif]]
|
4
snippets/org-mode/aww
Normal file
4
snippets/org-mode/aww
Normal file
|
@ -0,0 +1,4 @@
|
|||
# name: aww
|
||||
# key: :aww:
|
||||
# --
|
||||
[[https://tre.praze.net/legend/aww.gif]]
|
4
snippets/org-mode/biggrin
Normal file
4
snippets/org-mode/biggrin
Normal file
|
@ -0,0 +1,4 @@
|
|||
# name: biggrin
|
||||
# key: :biggrin:
|
||||
# --
|
||||
[[https://tre.praze.net/legend/biggrin.gif]]
|
4
snippets/org-mode/blankstare
Normal file
4
snippets/org-mode/blankstare
Normal file
|
@ -0,0 +1,4 @@
|
|||
# name: blankstare
|
||||
# key: :blankstare:
|
||||
# --
|
||||
[[https://tre.praze.net/legend/blankstare.gif]]
|
4
snippets/org-mode/bleh
Normal file
4
snippets/org-mode/bleh
Normal file
|
@ -0,0 +1,4 @@
|
|||
# name: bleh
|
||||
# key: :bleh:
|
||||
# --
|
||||
[[https://tre.praze.net/legend/bleh.gif]]
|
4
snippets/org-mode/boogie
Normal file
4
snippets/org-mode/boogie
Normal file
|
@ -0,0 +1,4 @@
|
|||
# name: boogie
|
||||
# key: :boogie:
|
||||
# --
|
||||
[[https://tre.praze.net/legend/boogie.gif]]
|
4
snippets/org-mode/bounce
Normal file
4
snippets/org-mode/bounce
Normal file
|
@ -0,0 +1,4 @@
|
|||
# name: bounce
|
||||
# key: :bounce:
|
||||
# --
|
||||
[[https://tre.praze.net/legend/bounce.gif]]
|
4
snippets/org-mode/bow
Normal file
4
snippets/org-mode/bow
Normal file
|
@ -0,0 +1,4 @@
|
|||
# name: bow
|
||||
# key: :bow:
|
||||
# --
|
||||
[[https://tre.praze.net/legend/bow.gif]]
|
4
snippets/org-mode/bump
Normal file
4
snippets/org-mode/bump
Normal file
|
@ -0,0 +1,4 @@
|
|||
# name: bump
|
||||
# key: :bump:
|
||||
# --
|
||||
[[https://tre.praze.net/legend/bump.gif]]
|
4
snippets/org-mode/cd
Normal file
4
snippets/org-mode/cd
Normal file
|
@ -0,0 +1,4 @@
|
|||
# name: cd
|
||||
# key: :cd:
|
||||
# --
|
||||
[[https://tre.praze.net/legend/cd.gif]]
|
4
snippets/org-mode/clap
Normal file
4
snippets/org-mode/clap
Normal file
|
@ -0,0 +1,4 @@
|
|||
# name: clap
|
||||
# key: :clap:
|
||||
# --
|
||||
[[https://tre.praze.net/legend/clap.gif]]
|
4
snippets/org-mode/confused
Normal file
4
snippets/org-mode/confused
Normal file
|
@ -0,0 +1,4 @@
|
|||
# name: confused
|
||||
# key: :confused:
|
||||
# --
|
||||
[[https://tre.praze.net/legend/confused.gif]]
|
4
snippets/org-mode/cool
Normal file
4
snippets/org-mode/cool
Normal file
|
@ -0,0 +1,4 @@
|
|||
# name: cool
|
||||
# key: :cool:
|
||||
# --
|
||||
[[https://tre.praze.net/legend/cool.gif]]
|
4
snippets/org-mode/dance
Normal file
4
snippets/org-mode/dance
Normal file
|
@ -0,0 +1,4 @@
|
|||
# name: dance
|
||||
# key: :dance:
|
||||
# --
|
||||
[[https://tre.praze.net/legend/dance.gif]]
|
4
snippets/org-mode/dead
Normal file
4
snippets/org-mode/dead
Normal file
|
@ -0,0 +1,4 @@
|
|||
# name: dead
|
||||
# key: :dead:
|
||||
# --
|
||||
[[https://tre.praze.net/legend/dead.gif]]
|
|
@ -1,4 +0,0 @@
|
|||
# name: dreamwidth-cut
|
||||
# key: dwcut
|
||||
# --
|
||||
@@html:<cut text="$1">@@$0@@html:</cut>@@
|
|
@ -1,4 +0,0 @@
|
|||
# name: dreamwidth-user
|
||||
# key: dwuser
|
||||
# --
|
||||
@@html:<user name="$1">@@$0
|
4
snippets/org-mode/eager
Normal file
4
snippets/org-mode/eager
Normal file
|
@ -0,0 +1,4 @@
|
|||
# name: eager
|
||||
# key: :eager:
|
||||
# --
|
||||
[[https://tre.praze.net/legend/eager.gif]]
|
4
snippets/org-mode/eek
Normal file
4
snippets/org-mode/eek
Normal file
|
@ -0,0 +1,4 @@
|
|||
# name: eek
|
||||
# key: :eek:
|
||||
# --
|
||||
[[https://tre.praze.net/legend/eek.gif]]
|
4
snippets/org-mode/giggle
Normal file
4
snippets/org-mode/giggle
Normal file
|
@ -0,0 +1,4 @@
|
|||
# name: giggle
|
||||
# key: :giggle:
|
||||
# --
|
||||
[[https://tre.praze.net/legend/giggle.gif]]
|
4
snippets/org-mode/headbang
Normal file
4
snippets/org-mode/headbang
Normal file
|
@ -0,0 +1,4 @@
|
|||
# name: headbang
|
||||
# key: :headbang:
|
||||
# --
|
||||
[[https://tre.praze.net/legend/headbang.gif]]
|
4
snippets/org-mode/hmm
Normal file
4
snippets/org-mode/hmm
Normal file
|
@ -0,0 +1,4 @@
|
|||
# name: hmm
|
||||
# key: :hmm:
|
||||
# --
|
||||
[[https://tre.praze.net/legend/hmm.gif]]
|
4
snippets/org-mode/la
Normal file
4
snippets/org-mode/la
Normal file
|
@ -0,0 +1,4 @@
|
|||
# name: la
|
||||
# key: :la:
|
||||
# --
|
||||
[[https://tre.praze.net/legend/la.gif]]
|
4
snippets/org-mode/lmao
Normal file
4
snippets/org-mode/lmao
Normal file
|
@ -0,0 +1,4 @@
|
|||
# name: lmao
|
||||
# key: :lmao:
|
||||
# --
|
||||
[[https://tre.praze.net/legend/lmao.gif]]
|
4
snippets/org-mode/meow
Normal file
4
snippets/org-mode/meow
Normal file
|
@ -0,0 +1,4 @@
|
|||
# name: meow
|
||||
# key: :meow:
|
||||
# --
|
||||
[[https://tre.praze.net/legend/meow.gif]]
|
4
snippets/org-mode/ninja
Normal file
4
snippets/org-mode/ninja
Normal file
|
@ -0,0 +1,4 @@
|
|||
# name: ninja
|
||||
# key: :ninja:
|
||||
# --
|
||||
[[https://tre.praze.net/legend/ninja.gif]]
|
4
snippets/org-mode/nod
Normal file
4
snippets/org-mode/nod
Normal file
|
@ -0,0 +1,4 @@
|
|||
# name: nod
|
||||
# key: :nod:
|
||||
# --
|
||||
[[https://tre.praze.net/legend/nod.gif]]
|
4
snippets/org-mode/ohnoes
Normal file
4
snippets/org-mode/ohnoes
Normal file
|
@ -0,0 +1,4 @@
|
|||
# name: ohnoes
|
||||
# key: :ohnoes:
|
||||
# --
|
||||
[[https://tre.praze.net/legend/ohnoes.gif]]
|
4
snippets/org-mode/razz
Normal file
4
snippets/org-mode/razz
Normal file
|
@ -0,0 +1,4 @@
|
|||
# name: razz
|
||||
# key: :razz:
|
||||
# --
|
||||
[[https://tre.praze.net/legend/razz.gif]]
|
4
snippets/org-mode/rofl
Normal file
4
snippets/org-mode/rofl
Normal file
|
@ -0,0 +1,4 @@
|
|||
# name: rofl
|
||||
# key: :rofl:
|
||||
# --
|
||||
[[https://tre.praze.net/legend/rofl.gif]]
|
4
snippets/org-mode/sad
Normal file
4
snippets/org-mode/sad
Normal file
|
@ -0,0 +1,4 @@
|
|||
# name: sad
|
||||
# key: :sad:
|
||||
# --
|
||||
[[https://tre.praze.net/legend/sad.gif]]
|
4
snippets/org-mode/shrug
Normal file
4
snippets/org-mode/shrug
Normal file
|
@ -0,0 +1,4 @@
|
|||
# name: shrug
|
||||
# key: :shrug:
|
||||
# --
|
||||
[[https://tre.praze.net/legend/shrug.gif]]
|
|
@ -1,4 +0,0 @@
|
|||
# name: site-user
|
||||
# key: siteuser
|
||||
# --
|
||||
@@html:<user name="$1" site="$2">@@$0
|
4
snippets/org-mode/smile
Normal file
4
snippets/org-mode/smile
Normal file
|
@ -0,0 +1,4 @@
|
|||
# name: smile
|
||||
# key: :smile:
|
||||
# --
|
||||
[[https://tre.praze.net/legend/smile.gif]]
|
4
snippets/org-mode/tombstone
Normal file
4
snippets/org-mode/tombstone
Normal file
|
@ -0,0 +1,4 @@
|
|||
# name: tombstone
|
||||
# key: :tombstone:
|
||||
# --
|
||||
[[https://tre.praze.net/legend/tombstone.gif]]
|
4
snippets/org-mode/tongue
Normal file
4
snippets/org-mode/tongue
Normal file
|
@ -0,0 +1,4 @@
|
|||
# name: tongue
|
||||
# key: :tongue:
|
||||
# --
|
||||
[[https://tre.praze.net/legend/tongue.gif]]
|
4
snippets/org-mode/typing
Normal file
4
snippets/org-mode/typing
Normal file
|
@ -0,0 +1,4 @@
|
|||
# name: typing
|
||||
# key: :typing:
|
||||
# --
|
||||
[[https://tre.praze.net/legend/typing.gif]]
|
4
snippets/org-mode/wave
Normal file
4
snippets/org-mode/wave
Normal file
|
@ -0,0 +1,4 @@
|
|||
# name: wave
|
||||
# key: :wave:
|
||||
# --
|
||||
[[https://tre.praze.net/legend/wave.gif]]
|
4
snippets/org-mode/wink
Normal file
4
snippets/org-mode/wink
Normal file
|
@ -0,0 +1,4 @@
|
|||
# name: wink
|
||||
# key: :wink:
|
||||
# --
|
||||
[[https://tre.praze.net/legend/wink.gif]]
|
4
snippets/org-mode/winkrazz
Normal file
4
snippets/org-mode/winkrazz
Normal file
|
@ -0,0 +1,4 @@
|
|||
# name: winkrazz
|
||||
# key: :winkrazz:
|
||||
# --
|
||||
[[https://tre.praze.net/legend/winkrazz.gif]]
|
4
snippets/org-mode/woot
Normal file
4
snippets/org-mode/woot
Normal file
|
@ -0,0 +1,4 @@
|
|||
# name: woot
|
||||
# key: :woot:
|
||||
# --
|
||||
[[https://tre.praze.net/legend/woot.gif]]
|
4
snippets/org-mode/worry
Normal file
4
snippets/org-mode/worry
Normal file
|
@ -0,0 +1,4 @@
|
|||
# name: worry
|
||||
# key: :worry:
|
||||
# --
|
||||
[[https://tre.praze.net/legend/worry.gif]]
|
4
snippets/org-mode/worship
Normal file
4
snippets/org-mode/worship
Normal file
|
@ -0,0 +1,4 @@
|
|||
# name: worship
|
||||
# key: :worship:
|
||||
# --
|
||||
[[https://tre.praze.net/legend/worship.gif]]
|
4
snippets/org-mode/xd
Normal file
4
snippets/org-mode/xd
Normal file
|
@ -0,0 +1,4 @@
|
|||
# name: xd
|
||||
# key: :xd:
|
||||
# --
|
||||
[[https://tre.praze.net/legend/xd.gif]]
|
Loading…
Add table
Add a link
Reference in a new issue