From 38d15c98316359c7b0b190f2245a3b2e2bf62109 Mon Sep 17 00:00:00 2001 From: Ramiro Leal-Cavazos Date: Sun, 11 Apr 2021 12:31:32 -0700 Subject: fix emacs pylint error when running with tramp (#4333) * Fixed bug when accessing `tramp-file-name` localname field * Fixed emacs bug when getting localname of of remote files --- elisp/pylint.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'elisp') diff --git a/elisp/pylint.el b/elisp/pylint.el index d27a92b14..327da0fcb 100644 --- a/elisp/pylint.el +++ b/elisp/pylint.el @@ -202,8 +202,9 @@ output buffer, to go to the lines where pylint found matches. (save-some-buffers (not pylint-ask-about-save) nil) (let* ((filename (buffer-file-name)) + (localname-offset (cl-struct-slot-offset 'tramp-file-name 'localname)) (filename (or (and (tramp-tramp-file-p filename) - (aref (tramp-dissect-file-name filename) 3)) + (elt (tramp-dissect-file-name filename) localname-offset)) filename)) (filename (shell-quote-argument filename)) (pylint-command (if arg -- cgit v1.2.1