2025-06-22-10-00

33 阅读1分钟
#+name: org-id-remap-cache
#+begin_src emacs-lisp
  (lambda (url target id-open)
    (let* ((url (string-trim-right
                 url "::[^:]*"))
           (id (string-trim-right
                target "::[^:]*")))
      ;; UI block
      (funcall browse-url url)

      ;; cache text
      (funcall
       cache-url
       id url target (buffer-string))

      ;; quit eww window
      (quit-window)

      (funcall id-open target nil)))
#+end_src