From 9814f3a36b13660102821c22e0ce7d32bfdd3d2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?tr=C3=A9meur?= Date: Tue, 9 May 2023 00:30:01 +0100 Subject: [PATCH] =?UTF-8?q?Fix=20completing-read,=20don=E2=80=99t=20use=20?= =?UTF-8?q?tabs,=20don=E2=80=99t=20lock=20into=20org-format?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config.org | 6 ++++++ custom/dwpost.el | 24 ++++++------------------ custom/fic.el | 4 ++-- 3 files changed, 14 insertions(+), 20 deletions(-) diff --git a/config.org b/config.org index 3bcd3ef..ff4d1b0 100644 --- a/config.org +++ b/config.org @@ -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) #+END_SRC +Indent using spaces. + +#+BEGIN_SRC emacs-lisp + (setq-default indent-tabs-mode nil) +#+END_SRC + ** OS-specific stuff On Linux, I have to tell Emacs to use Chrome for web links. diff --git a/custom/dwpost.el b/custom/dwpost.el index 15f0786..ec37cd5 100644 --- a/custom/dwpost.el +++ b/custom/dwpost.el @@ -44,30 +44,18 @@ (unless (string-equal system-type "android") (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")) - (if (equal security "skip") + (setq security (completing-read "Security (public, access, private): " '("public" "access" "private"))) + (if (equal security "") (sleep-for 0) - (insert (concat "post-security: " - (let* ((securityjunk - (format "%S" security)) - (end (- (length securityjunk) 2))) - (substring securityjunk 2 end))"\n"))))) + (insert (concat "post-security: " security "\n"))))) (unless (string-equal system-type "android") (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")) - (if (equal mood "skip") + (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 (equal mood "") (sleep-for 0) - (insert (concat "post-mood: " - (let* ((moodjunk - (format "%S" mood)) - (end (- (length moodjunk) 2))) - (substring moodjunk 2 end))"\n"))))) + (insert (concat "post-mood: " mood "\n"))))) (unless (string-equal system-type "android") (defun dwmusic () diff --git a/custom/fic.el b/custom/fic.el index 5290f6c..4c52321 100644 --- a/custom/fic.el +++ b/custom/fic.el @@ -1,7 +1,7 @@ (defun fic-ao3 () "Format fic for posting to AO3 and export it" (interactive) - (org-format) + ;; (org-format) (save-buffer) (goto-char (point-min)) (while (re-search-forward "\\[fn:.*\\]" nil t) @@ -63,7 +63,7 @@ (setq chaptertitles (y-or-n-p "Titled chapters?"))) (setq ffx (y-or-n-p "FFX fic?")))) (setq draftmode (y-or-n-p "Edit LaTeX file manually?")) - (org-format) + ;; (org-format) (save-buffer) (goto-char (point-min)) (while (re-search-forward "\\[fn:\\([0-9]*\\):\\(.*\\)\\]" nil t)