diff options
| author | Michael Albinus | 2023-02-10 17:48:44 +0100 |
|---|---|---|
| committer | Michael Albinus | 2023-02-10 17:48:44 +0100 |
| commit | ea29622e928f50522e424ee59b0f24bbb5a42eca (patch) | |
| tree | a77189ee0405190966c123a990de96306773923a /test | |
| parent | ab7c2f809219b0c29e7ee2b5ac66f18b0e657080 (diff) | |
| download | emacs-ea29622e928f50522e424ee59b0f24bbb5a42eca.tar.gz emacs-ea29622e928f50522e424ee59b0f24bbb5a42eca.zip | |
Fix Tramp file name completion
* lisp/net/tramp.el (tramp-completion-handle-expand-file-name):
Reimplement. It must also work for the non-Tramp case.
* test/lisp/net/tramp-tests.el
(tramp-test26-interactive-file-name-completion): Fix test.
Diffstat (limited to 'test')
| -rw-r--r-- | test/lisp/net/tramp-tests.el | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el index eea59843d47..a9f22369231 100644 --- a/test/lisp/net/tramp-tests.el +++ b/test/lisp/net/tramp-tests.el | |||
| @@ -4695,7 +4695,7 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'." | |||
| 4695 | tramp-prefix-format | 4695 | tramp-prefix-format |
| 4696 | (substring-no-properties method 0 2)) | 4696 | (substring-no-properties method 0 2)) |
| 4697 | unread-command-events | 4697 | unread-command-events |
| 4698 | (mapcar #'identity (concat test "\t\n")) | 4698 | (mapcar #'identity (concat test "\t\t\n")) |
| 4699 | completions nil | 4699 | completions nil |
| 4700 | result (read-file-name "Prompt: ")) | 4700 | result (read-file-name "Prompt: ")) |
| 4701 | (if (not (get-buffer "*Completions*")) | 4701 | (if (not (get-buffer "*Completions*")) |
| @@ -4708,6 +4708,12 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'." | |||
| 4708 | (concat tramp-prefix-format method-string) | 4708 | (concat tramp-prefix-format method-string) |
| 4709 | result))) | 4709 | result))) |
| 4710 | (with-current-buffer "*Completions*" | 4710 | (with-current-buffer "*Completions*" |
| 4711 | ;; We must remove leading `default-directory'. | ||
| 4712 | (goto-char (point-min)) | ||
| 4713 | (let ((inhibit-read-only t)) | ||
| 4714 | (while (re-search-forward "//" nil 'noerror) | ||
| 4715 | (delete-region (line-beginning-position) (point)))) | ||
| 4716 | (goto-char (point-min)) | ||
| 4711 | (re-search-forward | 4717 | (re-search-forward |
| 4712 | (rx bol (1+ nonl) "possible completions:" eol)) | 4718 | (rx bol (1+ nonl) "possible completions:" eol)) |
| 4713 | (forward-line 1) | 4719 | (forward-line 1) |
| @@ -4729,7 +4735,7 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'." | |||
| 4729 | tramp-prefix-format method-string | 4735 | tramp-prefix-format method-string |
| 4730 | (substring-no-properties host 0 2)) | 4736 | (substring-no-properties host 0 2)) |
| 4731 | unread-command-events | 4737 | unread-command-events |
| 4732 | (mapcar #'identity (concat test "\t\n")) | 4738 | (mapcar #'identity (concat test "\t\t\n")) |
| 4733 | completions nil | 4739 | completions nil |
| 4734 | result (read-file-name "Prompt: ")) | 4740 | result (read-file-name "Prompt: ")) |
| 4735 | (if (not (get-buffer "*Completions*")) | 4741 | (if (not (get-buffer "*Completions*")) |
| @@ -4744,6 +4750,12 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'." | |||
| 4744 | ipv6-prefix host ipv6-postfix tramp-postfix-host-format) | 4750 | ipv6-prefix host ipv6-postfix tramp-postfix-host-format) |
| 4745 | result))) | 4751 | result))) |
| 4746 | (with-current-buffer "*Completions*" | 4752 | (with-current-buffer "*Completions*" |
| 4753 | ;; We must remove leading `default-directory'. | ||
| 4754 | (goto-char (point-min)) | ||
| 4755 | (let ((inhibit-read-only t)) | ||
| 4756 | (while (re-search-forward "//" nil 'noerror) | ||
| 4757 | (delete-region (line-beginning-position) (point)))) | ||
| 4758 | (goto-char (point-min)) | ||
| 4747 | (re-search-forward | 4759 | (re-search-forward |
| 4748 | (rx bol (1+ nonl) "possible completions:" eol)) | 4760 | (rx bol (1+ nonl) "possible completions:" eol)) |
| 4749 | (forward-line 1) | 4761 | (forward-line 1) |