Fix completing-read, don’t use tabs, don’t lock into org-format
This commit is contained in:
parent
c61d26f465
commit
9814f3a36b
3 changed files with 14 additions and 20 deletions
|
@ -141,6 +141,12 @@ Make new directories automatically (from [[https://emacsredux.com/blog/2022/06/1
|
||||||
(add-to-list 'find-file-not-found-functions #'er-auto-create-missing-dirs)
|
(add-to-list 'find-file-not-found-functions #'er-auto-create-missing-dirs)
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
|
Indent using spaces.
|
||||||
|
|
||||||
|
#+BEGIN_SRC emacs-lisp
|
||||||
|
(setq-default indent-tabs-mode nil)
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
** OS-specific stuff
|
** OS-specific stuff
|
||||||
|
|
||||||
On Linux, I have to tell Emacs to use Chrome for web links.
|
On Linux, I have to tell Emacs to use Chrome for web links.
|
||||||
|
|
|
@ -44,30 +44,18 @@
|
||||||
(unless (string-equal system-type "android")
|
(unless (string-equal system-type "android")
|
||||||
(defun dwsecurity ()
|
(defun dwsecurity ()
|
||||||
"Set security level for DW post"
|
"Set security level for DW post"
|
||||||
(setq security (completing-read-multiple "Security (public, access, private): " '("public" "access" "private")))
|
(setq security (completing-read "Security (public, access, private): " '("public" "access" "private")))
|
||||||
(if (not security)
|
(if (equal security "")
|
||||||
(setq security "skip"))
|
|
||||||
(if (equal security "skip")
|
|
||||||
(sleep-for 0)
|
(sleep-for 0)
|
||||||
(insert (concat "post-security: "
|
(insert (concat "post-security: " security "\n")))))
|
||||||
(let* ((securityjunk
|
|
||||||
(format "%S" security))
|
|
||||||
(end (- (length securityjunk) 2)))
|
|
||||||
(substring securityjunk 2 end))"\n")))))
|
|
||||||
|
|
||||||
(unless (string-equal system-type "android")
|
(unless (string-equal system-type "android")
|
||||||
(defun dwmood ()
|
(defun dwmood ()
|
||||||
"Set mood for DW post"
|
"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")))
|
(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")))
|
||||||
(if (not mood)
|
(if (equal mood "")
|
||||||
(setq mood "skip"))
|
|
||||||
(if (equal mood "skip")
|
|
||||||
(sleep-for 0)
|
(sleep-for 0)
|
||||||
(insert (concat "post-mood: "
|
(insert (concat "post-mood: " mood "\n")))))
|
||||||
(let* ((moodjunk
|
|
||||||
(format "%S" mood))
|
|
||||||
(end (- (length moodjunk) 2)))
|
|
||||||
(substring moodjunk 2 end))"\n")))))
|
|
||||||
|
|
||||||
(unless (string-equal system-type "android")
|
(unless (string-equal system-type "android")
|
||||||
(defun dwmusic ()
|
(defun dwmusic ()
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
(defun fic-ao3 ()
|
(defun fic-ao3 ()
|
||||||
"Format fic for posting to AO3 and export it"
|
"Format fic for posting to AO3 and export it"
|
||||||
(interactive)
|
(interactive)
|
||||||
(org-format)
|
;; (org-format)
|
||||||
(save-buffer)
|
(save-buffer)
|
||||||
(goto-char (point-min))
|
(goto-char (point-min))
|
||||||
(while (re-search-forward "\\[fn:.*\\]" nil t)
|
(while (re-search-forward "\\[fn:.*\\]" nil t)
|
||||||
|
@ -63,7 +63,7 @@
|
||||||
(setq chaptertitles (y-or-n-p "Titled chapters?")))
|
(setq chaptertitles (y-or-n-p "Titled chapters?")))
|
||||||
(setq ffx (y-or-n-p "FFX fic?"))))
|
(setq ffx (y-or-n-p "FFX fic?"))))
|
||||||
(setq draftmode (y-or-n-p "Edit LaTeX file manually?"))
|
(setq draftmode (y-or-n-p "Edit LaTeX file manually?"))
|
||||||
(org-format)
|
;; (org-format)
|
||||||
(save-buffer)
|
(save-buffer)
|
||||||
(goto-char (point-min))
|
(goto-char (point-min))
|
||||||
(while (re-search-forward "\\[fn:\\([0-9]*\\):\\(.*\\)\\]" nil t)
|
(while (re-search-forward "\\[fn:\\([0-9]*\\):\\(.*\\)\\]" nil t)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue