[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 4eca3bd: * lisp/net/tramp-sh.el (tramp-sh-handle-insert-directory
From: |
Michael Albinus |
Subject: |
master 4eca3bd: * lisp/net/tramp-sh.el (tramp-sh-handle-insert-directory): |
Date: |
Sat, 3 Apr 2021 12:25:35 -0400 (EDT) |
branch: master
commit 4eca3bd8df9a1092d322eb6af7108a3ea27c21b1
Author: Michael Albinus <michael.albinus@gmx.de>
Commit: Michael Albinus <michael.albinus@gmx.de>
* lisp/net/tramp-sh.el (tramp-sh-handle-insert-directory):
Fix code finding //DIRED//.
---
lisp/net/tramp-sh.el | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el
index 255314a..c3e1745 100644
--- a/lisp/net/tramp-sh.el
+++ b/lisp/net/tramp-sh.el
@@ -2584,12 +2584,9 @@ The method used must be an out-of-band method."
(save-restriction
(narrow-to-region beg-marker end-marker)
;; Check for "--dired" output.
- (forward-line -2)
- (when (looking-at-p "//SUBDIRED//")
- (forward-line -1))
- (when (looking-at "//DIRED//\\s-+")
- (let ((beg (match-end 0))
- (end (point-at-eol)))
+ (when (re-search-backward "^//DIRED//\\s-+\\(.+\\)$" nil 'noerror)
+ (let ((beg (match-beginning 1))
+ (end (match-end 0)))
;; Now read the numeric positions of file names.
(goto-char beg)
(while (< (point) end)
@@ -2599,7 +2596,7 @@ The method used must be an out-of-band method."
;; End is followed by \n or by " -> ".
(put-text-property start end 'dired-filename t))))))
;; Remove trailing lines.
- (goto-char (point-at-bol))
+ (beginning-of-line)
(while (looking-at "//")
(forward-line 1)
(delete-region (match-beginning 0) (point))))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 4eca3bd: * lisp/net/tramp-sh.el (tramp-sh-handle-insert-directory):,
Michael Albinus <=