停止在 emacs 上运行的流浪模式 启动

发布于 2024-07-20 05:44:41 字数 409 浏览 5 评论 0原文

我正在尝试 tramp-mode,但现在我似乎无法摆脱它.. 每当我启动 emacs,它花了大约 20 秒来完成各种与流浪汉相关的初始化......

tramp: Waiting 60s for prompt from remote shell
tramp: Setting up remote shell environment

等等。

我到底如何卸下流浪汉? grep'ing 我的 ~/.emacs.d 除了插件本身之外没有发现任何东西(似乎没有在任何地方加载..)

我已经清除了最近的文件历史记录,但这使得没有不同..

I was trying out tramp-mode, but now I cannot seem to get rid of it.. Whenever I start emacs, it spends about 20 seconds going through various tramp-related initialisations..

tramp: Waiting 60s for prompt from remote shell
tramp: Setting up remote shell environment

..and so on.

How on earth do I unload tramp? grep'ing my ~/.emacs.d found nothing aside from the plugin itself (which doesn't seem to be loaded anywhere..)

I've cleared the recent-files history, but that made no difference..

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

拥抱没勇气 2024-07-27 05:44:41

啊哈,我发现了tramp正在加载的位置:

Loading /Users/dbr/.recentf...done
Loading tramp-mode..

我的~/.recentf文件历史记录中有两个文件,它们是用tramp打开的,删除它们会阻止tramp加载..

我刚刚发现emacs wiki 的这一部分解释了问题,

将 TrampMode 与centref.el一起使用时,建议关闭recentf的清理功能,该功能会尝试统计所有文件的状态,并将它们从最近访问的列表中删除(如果它们是可读的)。 TRAMP 意味着这需要最近打开一个远程站点,这将在最不合时宜的时间阻止您的 emacs 进程。

(需要“最近”) 
  (setq 最近自动清理'从不);;   在我们开始最近之前禁用! 
  (最近模式 1) 
  

Aha, I found where tramp was being loaded:

Loading /Users/dbr/.recentf...done
Loading tramp-mode..

I had a two files in my ~/.recentf file-history which were opened with tramp, removing them stops tramp from loading..

I just found this section of the emacs wiki explaining the problem,

When using TrampMode with recentf.el, it’s advisable to turn off the cleanup feature of recentf that attempts to stat all the files and remove them from the recently accessed list if they are readable. Tramp means that this requires recentf to open up a remote site which will block your emacs process at the most inopportune times.

(require 'recentf)
(setq recentf-auto-cleanup 'never) ;; disable before we start recentf!
(recentf-mode 1)
森末i 2024-07-27 05:44:41

如果您使用 ido 模式,另一种可能性是 ~/.ido.last 中的列表。 在这种情况下,补救措施就是“rm ~/.ido.last”。

Another possibility is a listing in ~/.ido.last, if you are using ido-mode. In that case, the remedy is just "rm ~/.ido.last".

兲鉂ぱ嘚淚 2024-07-27 05:44:41

在我看来,您有一个通过 Tramp 打开的文件,并且在启动时重新打开。 必须设置 emacs 才能恢复会话吗?

It sounds to me like you have a file that is opened via tramp and is being reopened at startup. Have to set emacs to restore your session?

稳稳的幸福 2024-07-27 05:44:41

来自 tramp 常见问题解答

如何禁用流浪汉?

真遗憾,你为什么到现在才读?

如果您只想将 Ange-FTP 作为默认远程文件访问包,您应该 > 应用以下代码:

 (setq trapp-default-method "ftp") 
  

卸载tramp可以通过应用Mxtramp-unload-tramp来实现。 这也重置> Ange-FTP 插件。

请注意,我还没有尝试过这个,但希望它对你有用!

From the tramp faq:

How can I disable tramp?

Shame on you, why did you read until now?

If you just want to have Ange-FTP as default remote files access package, you should > apply the following code:

     (setq tramp-default-method "ftp")

Unloading tramp can be achieved by applying M-x tramp-unload-tramp. This resets also > the Ange-FTP plugins.

Note that I haven't tried this but hope it works for you!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文