diff options
| author | Sacha Chua <sacha@sachachua.com> | 2022-12-13 01:35:21 -0500 | 
|---|---|---|
| committer | Sacha Chua <sacha@sachachua.com> | 2022-12-13 01:35:21 -0500 | 
| commit | 7ddeecf637983993eda02740660f2e389040571a (patch) | |
| tree | 77376c258d464790b5fb153db1593aba49f89c59 /emacsconf.el | |
| parent | 40c90430dbedfc3f2d2f4e5ff139ce983e5772bf (diff) | |
| download | emacsconf-el-7ddeecf637983993eda02740660f2e389040571a.tar.xz emacsconf-el-7ddeecf637983993eda02740660f2e389040571a.zip | |
more extraction
Diffstat (limited to '')
| -rw-r--r-- | emacsconf.el | 31 | 
1 files changed, 22 insertions, 9 deletions
| diff --git a/emacsconf.el b/emacsconf.el index d09167b..897bc4d 100644 --- a/emacsconf.el +++ b/emacsconf.el @@ -241,9 +241,11 @@  (defun emacsconf-edit-wiki-page (search)    (interactive (list (emacsconf-complete-talk))) -  (setq search (emacsconf-get-slug-from-string search)) -  (find-file (expand-file-name (concat search ".md") -                               (expand-file-name "talks" (expand-file-name emacsconf-year emacsconf-directory))))) +  (setq search (if (stringp search) (emacsconf-get-slug-from-string search) +								 (plist-get search :slug))) +  (find-file (expand-file-name +							(concat search ".md") +              (expand-file-name "talks" (expand-file-name emacsconf-year emacsconf-directory)))))  (defun emacsconf-find-caption-directives-from-slug (search)    (interactive (list (emacsconf-complete-talk))) @@ -321,7 +323,7 @@  (defun emacsconf-go-to-talk (search)    (interactive (list (emacsconf-complete-talk))) -  (pop-to-buffer (find-file-noselect emacsconf-org-file)) +  (find-file emacsconf-org-file)    (widen)    (cond     ((plist-get search :slug) @@ -382,7 +384,6 @@    (let ((heading (org-heading-components))          (field-props '(                                          ;; Initial creation -                       (:title "ITEM")                         (:track "TRACK")                         (:slug "SLUG")                         (:speakers "NAME")                        @@ -444,6 +445,7 @@       o       (list        :point (point) +			:title (org-entry-get (point) "ITEM")        :year emacsconf-year        :conf-year emacsconf-year        :type (if (org-entry-get (point) "SLUG") 'talk 'headline) @@ -475,10 +477,13 @@  					                                 (org-entry-get (point) "SCHEDULED"))  					                                t)))  		                emacsconf-timezone-offset)))) -     (let* ((entry-props (org-entry-properties))) -       (mapcar  -        (lambda (o) (list (car o) (assoc-default (cadr o) entry-props))) -        field-props))))) +     (mapcar  +      (lambda (prop) +				(list +				 (or (car (rassoc (list (car prop)) field-props)) +						 (intern (concat ":" (replace-regexp-in-string "_" "-" (downcase (car prop)))))) +				 (cdr prop))) +			(org-entry-properties)))))  (defvar emacsconf-abstract-heading-regexp "abstract" "Regexp matching heading for talk abstract.") @@ -1454,5 +1459,13 @@ tracks with the ID in the cdr of that list."  			(format-time-string "%-I:%M %P %Z" (plist-get talk :start-time) (plist-get talk :timezone))  			" in "  			(plist-get talk :timezone))))) + +(defun emacsconf-collect-prop (prop list) +	(mapcar (lambda (o) (plist-get o prop)) list)) + +(defun emacsconf-talk-file (talk suffix) +	(and (file-exists-p (expand-file-name (concat (plist-get o :video-slug) suffix) emacsconf-cache-dir)) +			 (expand-file-name (concat (plist-get o :video-slug) suffix) emacsconf-cache-dir))) +  (provide 'emacsconf)  ;;; emacsconf.el ends here | 
