From c4614e263db67fdba8a19eb5f2fea402f260f14a Mon Sep 17 00:00:00 2001 From: Sacha Chua Date: Sun, 5 Nov 2023 08:45:55 -0500 Subject: emacsconf-pad: modify intro, add docstrings --- emacsconf-pad.el | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) (limited to 'emacsconf-pad.el') 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" "
Hello world
") @@ -245,9 +246,13 @@ ${next-talk-list}
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.
")))) (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}") "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}") ((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" -- cgit v1.2.3