org-roam中,只有同义词可以用alias表达。其他的怎么表达呢?
或许可以用这个来插入属性?
(defun org-roam-chinese-add (chinese)
"Add CHINESE to the node at point."
(interactive "sChinese: ")
(let ((node (org-roam-node-at-point 'assert)))
(save-excursion
(goto-char (org-roam-node-point node))
(org-roam-add-property chinese "Chinese"))))
之后拓展可以在 org-roam-node-insert
添加条件判断,如果存在这个属性,则提示用户选择插入合适语言.
* Luhmann notes
:PROPERTIES:
:ID: 42
:Status: 7
:Chinese: 卢曼
:Synonym: Zettelkästen
:Ambiguity: Wiki
:Antonym: "structural note" "folgezettel"
:END:
org-property-values
(car (org-property-values "Synonym"))
→ "Zettelkästen"
(car (org-property-values "Ambiguity"))
→ "Wiki"
(car (org-property-values "Antonym"))
→ "\"structural note\" \"folgezettel\""
(car (org-property-values "Chinese"))
→ "卢曼"
1 个赞