【发布时间】:2015-07-29 22:47:27
【问题描述】:
我希望在 Emacs 中的 Python 代码中包含指向 JIRA 票证的可点击链接。
例如,我在集成测试代码中使用了 doxygen 文档字符串,它链接了票号:
def test_user_type_isolation(self):
"""
Ensure UDT cannot be used from another keyspace
@jira_ticket CASSANDRA-9409
@since 2.2
"""
....
我希望能够单击 CASSANDRA-9409 并将其直接转到它所引用的 JIRA ticket。我找到了button-lock-mode,效果很好!但是,这个 elisp 可以在 python 模式的所有模式下工作除了:
(require 'button-lock)
(global-button-lock-mode 1)
(setq cassandra-jira-button
(button-lock-set-button "CASSANDRA-[0-9]+"
#'(lambda ()
(interactive)
(browse-url (concat "https://issues.apache.org/jira/browse/"
(thing-at-point 'symbol)))
)
:face 'link :face-policy 'prepend))
这不仅仅是我的代码,button-lock.el 中包含的示例也没有在 python 模式下工作。那么,有谁知道可能导致冲突的原因是什么?
【问题讨论】:
标签: emacs elisp python-mode