summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSacha Chua <sacha@sachachua.com>2023-11-05 08:45:55 -0500
committerSacha Chua <sacha@sachachua.com>2023-11-05 08:45:55 -0500
commitc4614e263db67fdba8a19eb5f2fea402f260f14a (patch)
treea1f3f69337f1408e179e321427d5e36c9fcf6683
parentd668db1efdc2e871c16eca55d1d66d330966f08f (diff)
downloademacsconf-el-c4614e263db67fdba8a19eb5f2fea402f260f14a.tar.xz
emacsconf-el-c4614e263db67fdba8a19eb5f2fea402f260f14a.zip
emacsconf-pad: modify intro, add docstrings
-rw-r--r--emacsconf-pad.el21
1 files changed, 13 insertions, 8 deletions
diff --git a/emacsconf-pad.el b/emacsconf-pad.el
index e3727b2..9900ad4 100644
--- a/emacsconf-pad.el
+++ b/emacsconf-pad.el
@@ -109,15 +109,16 @@ You can find it in $ETHERPAD_PATH/APIKEY.txt"
(called-interactively-p 'any)))))
(defun emacsconf-pad-set-html (pad-id html)
+ "Set PAD-ID contents to the given HTML."
(interactive "MPad ID: \nMHTML: ")
(let ((url-request-data (concat "html=" (url-hexify-string html)))
(url-request-method "POST")
(url-request-extra-headers '(("Content-Type" . "application/x-www-form-urlencoded"))))
(emacsconf-pad-json-request (format "%sapi/1/setHTML?apikey=%s&padID=%s"
- emacsconf-pad-base
- (url-hexify-string emacsconf-pad-api-key)
- (url-hexify-string pad-id))
- (called-interactively-p 'any))))
+ emacsconf-pad-base
+ (url-hexify-string emacsconf-pad-api-key)
+ (url-hexify-string pad-id))
+ (called-interactively-p 'any))))
;; (emacsconf-pad-append-text "emacsconf-2022-journalism" "Hello again")
;; (emacsconf-pad-get-html "emacsconf-2022-journalism")
;; (emacsconf-pad-set-html "emacsconf-2022-journalism" "<div><strong>Hello</strong> world</div>")
@@ -245,9 +246,13 @@ ${next-talk-list}
<div>By contributing to this pad, you agree to make your contributions available under the above licenses. You are also promising that you are the author of your changes, or that you copied them from a work in the public domain or a work released under a free license that is compatible with the above two licenses. DO NOT SUBMIT COPYRIGHTED WORK WITHOUT PERMISSION.</div></div>"))))
(defvar emacsconf-pad-force-all nil "Set to t to clear everything.")
+
(defun emacsconf-pad-prepopulate-talk-pad (o)
- (interactive (list (let ((info (emacsconf-include-next-talks (emacsconf-get-talk-info) emacsconf-pad-number-of-next-talks)))
- (emacsconf-complete-talk-info info))))
+ "Fill in the pad for O."
+ (interactive
+ (list
+ (let ((info (emacsconf-include-next-talks (emacsconf-get-talk-info) emacsconf-pad-number-of-next-talks)))
+ (emacsconf-complete-talk-info info))))
(let ((pad-id (emacsconf-pad-id o)))
(emacsconf-pad-create-pad pad-id)
(when (or emacsconf-pad-force-all
@@ -616,7 +621,7 @@ ${bbb-checklist}</li>")
"Make an intro for TALK."
(cond
((null (plist-get talk :speakers))
- (format "Next up, we have \"%s\"." (plist-get talk :title)))
+ (format "Next, we have \"%s\"." (plist-get talk :title)))
((plist-get talk :intro-note)
(plist-get talk :intro-note))
(t
@@ -626,7 +631,7 @@ ${bbb-checklist}</li>")
((or 'nil "nil" (rx string-start "he") (rx "him")) "He")
((rx "they") "They")
(_ (or (plist-get talk :pronouns) "")))))
- (format "Next up, we have \"%s\", by %s%s.%s"
+ (format "Next, we have \"%s\", by %s%s.%s"
(plist-get talk :title)
(replace-regexp-in-string ", \\([^,]+\\)$"
", and \\1"