组织模式:使链接在列视图中可点击?
我尝试制作一些 org 文件来在 emacs 中组织我的内容,但我不太明白如何在 列视图。
目前,我的组织文件如下所示:
* Main
:PROPERTIES:
:COLUMNS: %10ITEM %20LINK
:END:
** SUB1
:PROPERTIES:
:LINK: [[foo][bar]]
:END:
** SUB2
:PROPERTIES:
:LINK: [[bar][foo]]
:END:
但是,我在列视图中得到的不是可点击的链接,而是类似的内容:
ITEM | LINK |
* Main | |
** SUB1 |[[foo][bar]] |
** SUB2 |[[bar][foo]] |
有没有办法使列视图像组织模式中的其他地方一样显示可点击的链接?
I tried to make some org file to organize my thing in emacs, but I can't quite get how to make a clickable link in column view.
Currently, my org file looks like this:
* Main
:PROPERTIES:
:COLUMNS: %10ITEM %20LINK
:END:
** SUB1
:PROPERTIES:
:LINK: [[foo][bar]]
:END:
** SUB2
:PROPERTIES:
:LINK: [[bar][foo]]
:END:
However, instead of clickable link, I got something like this in column view:
ITEM | LINK |
* Main | |
** SUB1 |[[foo][bar]] |
** SUB2 |[[bar][foo]] |
Is there any way to make column view show a clickable link like elsewhere in Org mode?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
组织模式9.6.7
搜索标签
xxx
,带有链接:Org mode 9.6.7
Searching for tags
xxx
, with links:我是否误解了您的问题,或者您的
.emacs.d
中是否有任何特殊的组织模式配置,我使用emacs -Q
打开您的组织模式文件,以及所有链接是可点击的。Did I misunderstand your problem or is there any sepecial org-mode configuration in your
.emacs.d
, I open your org-mode file withemacs -Q
, and all links are clickable.我不知道当时情况是否有所不同,但在最近的 Org 模式版本(我使用的是 9.6)中,这很容易实现。
已经有命令
org-columns-open-link
,默认情况下绑定到列视图中的Cc Co
,用于打开链接。因此,要使所有链接都可单击,只需:然而,每当单击非链接(例如更改点)时,都会显示一条用户错误消息。
为了获得更好的用户体验,我们可以自定义
org-columns-modify-value-for-display-function
,如下所示:可以通过检查
来检查该点的文本属性是否按预期设置>(get-char-property (point) 'org-columns-value)
在列视图中。I don't know whether things were different back then, but in more recent Org mode versions (I'm on 9.6) this is quite easy to achieve.
There is already the command
org-columns-open-link
, which by default is bound toC-c C-o
in column view, that does open links. Hence to make all links clickable one simply has to:This will however show a user-error message whenever clicking on a non-link (e.g. to change point).
To get a nicer user experience one can instead customize
org-columns-modify-value-for-display-function
as follows:One can check whether the text properties at point are set as expected by exaluating
(get-char-property (point) 'org-columns-value)
in column view.