[to-rework] Extend meeting capture function

The function now also parses non-zoom meetings
master
Jacopo De Simoi 4 years ago
parent 40d3366d16
commit 35c3fa10c6
  1. 28
      global.org

@ -675,15 +675,18 @@
(buffer-substring-no-properties p q))) (buffer-substring-no-properties p q)))
(defun format-zoom-meeting () (defun format-zoom-meeting ()
(if (boundp 'zoom-link)
(concat zoom-summary (concat zoom-summary
" [[" zoom-link "][link]] (" zoom-passcode "\n :SCHEDULED: " zoom-scheduled-time)) " [[" zoom-link "][link]] (" zoom-passcode "\n SCHEDULED: " zoom-scheduled-time)
(concat zoom-summary "\n SCHEDULED: " zoom-scheduled-time)))
(defun create-item-for-meeting (msg) (defun create-item-for-meeting (msg)
"Search for messages sent by the sender of the message at point." "Search for messages sent by the sender of the message at point."
(makunbound 'zoom-link)
(makunbound 'zoom-passcode)
(save-excursion (save-excursion
(beginning-of-buffer) (beginning-of-buffer)
(when (search-forward "Join Zoom Meeting") (cond ((search-forward "Join Zoom Meeting" nil t)
(message "found zoom meeting") (message "found zoom meeting")
(right-char) (right-char)
(setq zoom-link (get-buffer-current-line)) (setq zoom-link (get-buffer-current-line))
@ -698,8 +701,23 @@
(right-word) (right-word)
(left-word) (left-word)
(setq zoom-summary (get-buffer-to-eol)) (setq zoom-summary (get-buffer-to-eol))
(org-capture nil "z")))) (org-capture nil "z"))
((search-forward "[ Accept ]")
(message "found generic meeting")
(search-forward "Summary:")
(right-word)
(right-word)
(left-word)
(setq zoom-summary (get-buffer-to-eol))
(search-forward "Location:")
(right-word)
(left-word)
(setq zoom-summary (concat zoom-summary " @" (get-buffer-to-eol)))
(search-forward "Time:")
(search-forward "<")
(left-char)
(setq zoom-scheduled-time (get-buffer-to-eol))
(org-capture nil "z")))))
;; define 'z' as the shortcut ;; define 'z' as the shortcut

Loading…
Cancel
Save