有人遇到过 org mode 升级9.0之后, 使用 org protocol 的 new-style links, org-capture-template 无法获取到 link 和 description 的问题么。
("l" "Protocol Link" entry (file+headline "~/Dropbox/org/inbox.org" "Inbox")
"* [[%:link][%:description]] \nCREATED: %u" :prepend t :immediate-finish t)
org-protocol://capture?template=l&url=https%3A%2F%2Femacs-china.org%2Ft%2Forg-mode-9-0%2F1516%2F2&title=Org%20mode%209.0%20%E5%8F%91%E5%B8%83%20-%20Emacs-general%20-%20Emacs%20China&body=
结果显示出来是这个
org-capture-template 版本问题?
org-protocol 的自带的 capture protocol 不支持 new style,以下修改能解决。
diff -u --label /Users/xcy/src/org-mode/lisp/org-protocol.el --label \#\<buffer\ org-protocol.el\> /Users/xcy/src/org-mode/lisp/org-protocol.el /var/folders/7f/s191h4q97p90374yw15ssrs00000gn/T/buffer-content-gOgsmu
--- /Users/xcy/src/org-mode/lisp/org-protocol.el
+++ #<buffer org-protocol.el>
@@ -484,7 +484,7 @@
(defvar org-capture-templates)
(defun org-protocol-do-capture (info)
"Perform the actual capture based on INFO."
- (let* ((temp-parts (org-protocol-parse-parameters info))
+ (let* ((temp-parts (org-protocol-parse-parameters info :new-style))
(parts
(cond
((and (listp info) (symbolp (car info))) info)
Diff finished. Tue Aug 28 19:24:35 2018
1 个赞