diff --git a/custom/dwpost.el b/custom/dwpost.el index d086c18..cd0a792 100644 --- a/custom/dwpost.el +++ b/custom/dwpost.el @@ -57,8 +57,8 @@ (setq music (replace-regexp-in-string (regexp-quote "\" \"") " – " (format "%S" music) nil 'literal)) (sleep-for 1) (if (not music) - (setq music "skip")) - (if (equal music "skip") + (setq music "nil")) + (if (equal music "nil") (sleep-for 0) (insert (concat "post-music: " (let* ((musicjunk @@ -78,18 +78,29 @@ ((string-match-p "\\btarkus\\b" (buffer-substring (point-min) (point-max))) (setq icon "tarkus")))) (if (equal icon "skip") (sleep-for 0) - (insert (concat "post-icon: "icon "\n")))) + (insert (concat "post-icon: "icon "\n")))) -(defun dwpost (psubject tags location) +(defun dwlocation () + (setq location (read-string "Location: " "🏠")) + (if (equal location "") + (sleep-for 0) + (insert (concat "post-location: " location "\n")))) + +(defun dwmusic-manual () + (setq music (read-string "Music: ")) + (if (equal music "") + (sleep-for 0) + (insert (concat "post-music: " music "\n")))) + +(defun dwpost (psubject tags) (interactive (list (read-string "Post title (REQUIRED): ") - (read-string "Tags (comma-separated): ") - (read-string "Location: " "🏠"))) + (read-string "Tags (comma-separated): "))) (dwexport) (compose-mail "tobli+0397@post.dreamwidth.org" psubject) (with-current-buffer "*unsent mail to tobli*" - (insert (concat "post-tags: org-export, "tags "\n")) - (insert (concat "post-location: "location "\n")) + (insert (concat "post-tags: org-export, " tags "\n")) (dwsecurity) + (dwlocation) (dwicon newname) (dwmood) (dwmusic)