From c1a32ad031d6a5fc7dc644fcfc442c3c9a6e107c Mon Sep 17 00:00:00 2001 From: Sacha Chua Date: Fri, 9 Dec 2022 22:46:25 -0500 Subject: code for adding questions to the Q&A transcript --- emacsconf.el | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'emacsconf.el') diff --git a/emacsconf.el b/emacsconf.el index 395db45..7157efd 100644 --- a/emacsconf.el +++ b/emacsconf.el @@ -311,10 +311,13 @@ (emacsconf-search-talk-info (emacsconf-complete-talk info) info)) (defun emacsconf-get-slug-from-string (search) - (if (listp search) (setq search (car search))) - (if (and search (string-match "\\(.*?\\) - " search)) - (match-string 1 search) - search)) + (when (listp search) (setq search (car search))) + (cond + ((and search (stringp search) (string-match "\\(.*?\\) - " search)) + (match-string 1 search)) + ((and (stringp search) (string-match (concat "^" emacsconf-id "-" emacsconf-year "-\\(.+?\\)--") search)) + (match-string 1 search)) + (t search))) (defun emacsconf-go-to-talk (search) (interactive (list (emacsconf-complete-talk))) @@ -1232,7 +1235,7 @@ Filter by TRACK if given. Use INFO as the list of talks." (or info (emacsconf-get-volunteer-info)))) (defun emacsconf-complete-volunteer (&optional info) - (setq info (or info (emacsconf-get-volunteer-info info))) + (setq info (or info (emacsconf-get-volunteer-info))) (let* ((choices (emacsconf-volunteer-emails-for-completion)) (choice (completing-read -- cgit v1.2.3