我的emacs .init文件中有以下内容:
(load "~/.emacs.d/.ercpass")
(global-set-key "\C-cef" (lambda () (interactive)
(erc :server "irc.freenode.net" :port "6667"
:nick "nick")))
我需要在"~/.emacs.d/.ercpass“中添加什么行才能自动识别我的密码?
谢谢,奥利弗
发布于 2019-12-31 08:53:11
@lawlist几年前就已经指向资源https://www.emacswiki.org/emacs/ErcNickserv#toc4,它包含了OP所需的答案。但是我用了一种不同的方式,所以我想我应该为未来的用户列出各种选择。
在所有情况下,您都需要在init文件中:
(setq erc-prompt-for-nickserv-password nil)
在你的init文件中有:
(load "~/.ercpass")
(setq erc-nickserv-passwords
`(freenode (<nick> . ,freenode-password)))
并使用以下命令创建文件~/.ercpass:
(setq freenode-password <password>)
与此非常相似的方法,将所有内容都保存在
中
(setq erc-nickserv-passwords
'(freenode (<nick> . <password>)))
使用
的替代方法
您可以将登录信息保存在~/.authinfo.gpg文件中。
使用以下命令添加一行:
machine irc.freenode.net login <nick> password <password>
这是我使用的方法,因为它可以更快地识别昵称,并且密码是受保护的。
请注意,对于这些方法中的任何一种,您可以在任意多个网络上使用任意多的昵称和密码。只需适当地添加更多行(当然,将freenode替换为您实际感兴趣的任何网络)。
https://stackoverflow.com/questions/38276992
复制相似问题