From abc80e43ae47a7332e32222d3473bcd2d807d6b6 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 2 Sep 2019 13:14:52 -0400 Subject: [PATCH] tools/magit: disable magit-todos over TRAMP --- modules/tools/magit/config.el | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/modules/tools/magit/config.el b/modules/tools/magit/config.el index 28d7bd0b6..b494448ff 100644 --- a/modules/tools/magit/config.el +++ b/modules/tools/magit/config.el @@ -103,6 +103,12 @@ ensure it is built when we actually use Forge." :config (setq magit-todos-keyword-suffix "\\(?:([^)]+)\\)?:?") ; make colon optional (define-key magit-todos-section-map "j" nil) + ;; magit-todos fails to list TODOs over TRAMP (and instead, tries to list all + ;; TODOs in your HOME), so we disable it on remotes. + (defadvice! +magit--disable-todos-over-tramp-a (orig-fn) + :around #'magit-todos--insert-todos + (unless (file-remote-p default-directory) + (funcall orig-fn))) ;; Warns that jT isn't bound. Well, yeah, you don't need to tell me, that was ;; on purpose ya goose. (advice-add #'magit-todos-mode :around #'doom-shut-up-a)