diff --git a/README.md b/README.md index 51f51e2..a5e02ea 100644 --- a/README.md +++ b/README.md @@ -208,6 +208,7 @@ Support `org-store-link` and `org-link-open` mechanism. Currently support following applications: +- web browser support - pdf-viewer support jump to page number - js-video-player support jump to video timestamp - on theory supports all EAF applications without extra argument which has `eaf--buffer-url` diff --git a/README.zh-CN.md b/README.zh-CN.md index 5049bcb..4ea3f05 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -203,6 +203,7 @@ eaf-evil 会动态查询 eaf 应用的按键绑定, 使得 evil 在 normal 模 当前支持如下应用: +- web browser 链接支持 - pdf-viewer 跳转到记录的标记页面 - js-video-player 跳转到记录的视频时间戳 - 理论上支持所有EAF应用(只要应用有 `eaf--buffer-url` 参数值) diff --git a/eaf-org.el b/eaf-org.el index b620366..8aa199a 100644 --- a/eaf-org.el +++ b/eaf-org.el @@ -44,7 +44,10 @@ The raw link looks like this: [[eaf:::::]]" (interactive) (when (eq major-mode 'eaf-mode) (let* ((app eaf--buffer-app-name) - (url eaf--buffer-url) + ;; filter temp files which is converted to PDF + (url (if (string-prefix-p "/tmp/" eaf--buffer-url) + (warn "[EAF] don't support this application link which is converted to temporary PDF file.") + eaf--buffer-url)) (extra-args (cl-case (intern app) ('pdf-viewer (eaf-call "call_function" eaf--buffer-id "current_page")) @@ -66,10 +69,14 @@ The raw link looks like this: [[eaf:::::]]" (url (cadr list)) (extra-args (caddr list))) (cl-case app + ('browser + (eaf-open url "browser")) ('pdf-viewer (eaf-open url "pdf-viewer") (eaf-call "call_function_with_args" eaf--buffer-id "jump_to_page_with_num" (format "%s" extra-args))) + ('mindmap + (eaf-open url "mindmap")) ('js-video-player (eaf-open url "js-video-player") (eaf-call "call_function_with_args" eaf--buffer-id