Allow no location, option for write-in music
This commit is contained in:
parent
0218f7d95c
commit
23ecdc57b1
1 changed files with 19 additions and 8 deletions
|
@ -57,8 +57,8 @@
|
||||||
(setq music (replace-regexp-in-string (regexp-quote "\" \"") " – " (format "%S" music) nil 'literal))
|
(setq music (replace-regexp-in-string (regexp-quote "\" \"") " – " (format "%S" music) nil 'literal))
|
||||||
(sleep-for 1)
|
(sleep-for 1)
|
||||||
(if (not music)
|
(if (not music)
|
||||||
(setq music "skip"))
|
(setq music "nil"))
|
||||||
(if (equal music "skip")
|
(if (equal music "nil")
|
||||||
(sleep-for 0)
|
(sleep-for 0)
|
||||||
(insert (concat "post-music: "
|
(insert (concat "post-music: "
|
||||||
(let* ((musicjunk
|
(let* ((musicjunk
|
||||||
|
@ -78,18 +78,29 @@
|
||||||
((string-match-p "\\btarkus\\b" (buffer-substring (point-min) (point-max))) (setq icon "tarkus"))))
|
((string-match-p "\\btarkus\\b" (buffer-substring (point-min) (point-max))) (setq icon "tarkus"))))
|
||||||
(if (equal icon "skip")
|
(if (equal icon "skip")
|
||||||
(sleep-for 0)
|
(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): ")
|
(interactive (list (read-string "Post title (REQUIRED): ")
|
||||||
(read-string "Tags (comma-separated): ")
|
(read-string "Tags (comma-separated): ")))
|
||||||
(read-string "Location: " "🏠")))
|
|
||||||
(dwexport)
|
(dwexport)
|
||||||
(compose-mail "tobli+0397@post.dreamwidth.org" psubject)
|
(compose-mail "tobli+0397@post.dreamwidth.org" psubject)
|
||||||
(with-current-buffer "*unsent mail to tobli*"
|
(with-current-buffer "*unsent mail to tobli*"
|
||||||
(insert (concat "post-tags: org-export, "tags "\n"))
|
(insert (concat "post-tags: org-export, " tags "\n"))
|
||||||
(insert (concat "post-location: "location "\n"))
|
|
||||||
(dwsecurity)
|
(dwsecurity)
|
||||||
|
(dwlocation)
|
||||||
(dwicon newname)
|
(dwicon newname)
|
||||||
(dwmood)
|
(dwmood)
|
||||||
(dwmusic)
|
(dwmusic)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue