From caa43468ad52694c51b1b33f02327e88b07ed81d Mon Sep 17 00:00:00 2001 From: Ihor Radchenko Date: Thu, 6 Jun 2024 17:48:22 +0200 Subject: [PATCH] index.org (Project heartbeat): Add Sacha Chua's weekly news --- index.org | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/index.org b/index.org index 007f731..ae7b38a 100644 --- a/index.org +++ b/index.org @@ -55,8 +55,31 @@ #+end_export * Project heartbeat + #+include: "https://tracker.orgmode.org/news.org" :lines "1-6" #+include: "https://tracker.orgmode.org/requests.org" :lines "1-6" + +#+begin_src emacs-lisp :exports results :results raw value + (let* ((org-text-buffer + (url-retrieve-synchronously + "https://raw.githubusercontent.com/sachac/emacs-news/master/most-recent.org")) + (org-data + (with-current-buffer org-text-buffer + ;; https://sachachua.com/blog/2024/05/emacs-url-retrieve-synchronously-and-set-buffer-multibyte/ + (set-buffer-multibyte t) + (org-mode) + (org-element-parse-buffer)))) + (org-element-map org-data '(item) + (lambda (item) + (when-let ((contents (org-element-contents item)) + (paragraph (car contents)) + (paragraph-text (car (org-element-contents paragraph)))) + (when (and (stringp paragraph-text) + (string-equal-ignore-case paragraph-text "Org Mode:\n")) + (org-element-interpret-data (cdr contents))))) + nil 'first-match)) +#+end_src + * Highlights :PROPERTIES: :HTML_CONTAINER_CLASS: columns no-heading -- 2.45.2