GNU bug report logs -
#37464
26.3; Icomplete and TRAMP create unnecessary buffer
Previous Next
Reported by: Andrii Kolomoiets <andreyk.mad <at> gmail.com>
Date: Thu, 19 Sep 2019 20:39:02 UTC
Severity: normal
Tags: notabug
Found in version 26.3
Done: Michael Albinus <michael.albinus <at> gmx.de>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 37464 in the body.
You can then email your comments to 37464 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#37464
; Package
emacs
.
(Thu, 19 Sep 2019 20:39:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Andrii Kolomoiets <andreyk.mad <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Thu, 19 Sep 2019 20:39:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
1. emacs -Q
2. M-x icomplete-mode
3. C-x C-f
4. /q::
instead of "q" allowed method can be specified e.g. "sudo" or "ssh"
5. C-g
6. C-x C-b
Notice new buffer "*tramp/q..." created although command was cancelled.
In GNU Emacs 26.3 (build 1, x86_64-apple-darwin18.2.0, NS appkit-1671.20 Version 10.14.3 (Build 18D109))
of 2019-09-02 built on builder10-14.porkrind.org
Reply sent
to
Michael Albinus <michael.albinus <at> gmx.de>
:
You have taken responsibility.
(Sat, 21 Sep 2019 09:18:01 GMT)
Full text and
rfc822 format available.
Notification sent
to
Andrii Kolomoiets <andreyk.mad <at> gmail.com>
:
bug acknowledged by developer.
(Sat, 21 Sep 2019 09:18:02 GMT)
Full text and
rfc822 format available.
Message #10 received at 37464-done <at> debbugs.gnu.org (full text, mbox):
Andrii Kolomoiets <andreyk.mad <at> gmail.com> writes:
Hi Andrii,
> 1. emacs -Q
> 2. M-x icomplete-mode
> 3. C-x C-f
> 4. /q::
> instead of "q" allowed method can be specified e.g. "sudo" or "ssh"
> 5. C-g
> 6. C-x C-b
>
> Notice new buffer "*tramp/q..." created although command was cancelled.
Thanks for the report, I can confirm the behaviour. However, this is not
a bug. Try the following command instead:
emacs -Q --eval '(setq tramp-verbose 6)'
This enables traces up to level 6, which are the commands send to a
remote host. You will see also the buffer *debug tramp/ssh...*. No trace
there with level 6, but entries like
11:09:33.148026 tramp-file-name-handler (5) # Non-essential received in operation (file-name-all-completions /ssh::)
This tells us, that Tramp hasn't tried any remote connection, because it
is still in user name / host name completion. And that's what counts.
I'm marking this as not-a-bug, and close it. Feel free to ask if you
need further information.
Best regards, Michael.
Added tag(s) notabug.
Request was from
Michael Albinus <michael.albinus <at> gmx.de>
to
control <at> debbugs.gnu.org
.
(Sat, 21 Sep 2019 09:22:01 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#37464
; Package
emacs
.
(Mon, 23 Sep 2019 07:00:01 GMT)
Full text and
rfc822 format available.
Message #15 received at 37464-done <at> debbugs.gnu.org (full text, mbox):
Hi Michael,
> On Sep 21, 2019, at 12:17, Michael Albinus <michael.albinus <at> gmx.de> wrote:
>
>> 1. emacs -Q
>> 2. M-x icomplete-mode
>> 3. C-x C-f
>> 4. /q::
>> instead of "q" allowed method can be specified e.g. "sudo" or "ssh"
>> 5. C-g
>> 6. C-x C-b
>>
>> Notice new buffer "*tramp/q..." created although command was cancelled.
>
> Thanks for the report, I can confirm the behaviour. However, this is not
> a bug. Try the following command instead:
>
> emacs -Q --eval '(setq tramp-verbose 6)'
>
> This enables traces up to level 6, which are the commands send to a
> remote host. You will see also the buffer *debug tramp/ssh...*. No trace
> there with level 6, but entries like
>
> 11:09:33.148026 tramp-file-name-handler (5) # Non-essential received in operation (file-name-all-completions /ssh::)
>
> This tells us, that Tramp hasn't tried any remote connection, because it
> is still in user name / host name completion. And that's what counts.
>
> I'm marking this as not-a-bug, and close it. Feel free to ask if you
> need further information.
>
> Best regards, Michael.
But why this doesn't happen when icomplete-mode is disabled?
C-x C-f /q:: <TAB> says "Method 'q' is not known" and there are
no `*tramp/q...` buffer.
Let me explain how i faced this behaviour. I have some commands that do
`(abbreviate-file-name default-directory)`. After misspelled `sudo` as
TRAMP method in `find-file` prompt like `/suod::/etc/hosts` and
cancelling command with `C-g` the buffer `*tramp/suod...` was created.
And `(abbreviate-file-name default-directory)` in that buffer leads to
"Method 'suod' is not known" error.
I thought that buffer `*tramp/suod...` was created mistakenly.
If this is expected behaviour do i need to wrap `abbreviate-file-name`
with `condition-case` or something?
Actually there are more command that won't work from the
`*tramp/suod...` buffer: vc-dir, find-file, dired.
All of them leads to "Method 'soud' is not known" error.
Thanks!
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#37464
; Package
emacs
.
(Mon, 23 Sep 2019 10:54:02 GMT)
Full text and
rfc822 format available.
Message #18 received at 37464-done <at> debbugs.gnu.org (full text, mbox):
Andrii Kolomoiets <andreyk.mad <at> gmail.com> writes:
> Hi Michael,
Hi Andrii,
> But why this doesn't happen when icomplete-mode is disabled?
> C-x C-f /q:: <TAB> says "Method 'q' is not known" and there are
> no `*tramp/q...` buffer.
You activate icomplete-mode for a reason. Icomplete calls (file-exists-p
"/ssh:hostname:"), after you have typed "/ssh::" (given that "hostname" is
the name of your host). Without icomplete-mode, this doesn't happen.
> Let me explain how i faced this behaviour. I have some commands that do
> `(abbreviate-file-name default-directory)`. After misspelled `sudo` as
> TRAMP method in `find-file` prompt like `/suod::/etc/hosts` and
> cancelling command with `C-g` the buffer `*tramp/suod...` was created.
> And `(abbreviate-file-name default-directory)` in that buffer leads to
> "Method 'suod' is not known" error.
Yes. But why do you call it in this buffer?
> I thought that buffer `*tramp/suod...` was created mistakenly.
> If this is expected behaviour do i need to wrap `abbreviate-file-name`
> with `condition-case` or something?
(ignore-errors (abbreviate-file-name default-directory)) would do.
> Actually there are more command that won't work from the
> `*tramp/suod...` buffer: vc-dir, find-file, dired.
> All of them leads to "Method 'soud' is not known" error.
Yes, but only if you take the buffer with the damaged
default-directory. I would try to ban such a buffer in my code.
> Thanks!
Best regards, Michael.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#37464
; Package
emacs
.
(Mon, 23 Sep 2019 11:47:03 GMT)
Full text and
rfc822 format available.
Message #21 received at 37464-done <at> debbugs.gnu.org (full text, mbox):
> Hi Andrii,
Hi Michael,
>> But why this doesn't happen when icomplete-mode is disabled?
>> C-x C-f /q:: <TAB> says "Method 'q' is not known" and there are
>> no `*tramp/q...` buffer.
>
> You activate icomplete-mode for a reason. Icomplete calls (file-exists-p
> "/ssh:hostname:"), after you have typed "/ssh::" (given that "hostname" is
> the name of your host). Without icomplete-mode, this doesn't happen.
>
>> Let me explain how i faced this behaviour. I have some commands that do
>> `(abbreviate-file-name default-directory)`. After misspelled `sudo` as
>> TRAMP method in `find-file` prompt like `/suod::/etc/hosts` and
>> cancelling command with `C-g` the buffer `*tramp/suod...` was created.
>> And `(abbreviate-file-name default-directory)` in that buffer leads to
>> "Method 'suod' is not known" error.
>
> Yes. But why do you call it in this buffer?
I use buffers in Ibuffer grouped by project or default-directory.
Group name is abbreviated default directory of the buffer if there are no project.
Also I have a command to switch to buffer which is belong to current project.
It call file-in-directory-p on every buffer's default-directory in order to determine
that the buffer belongs to project.
>> I thought that buffer `*tramp/suod...` was created mistakenly.
>> If this is expected behaviour do i need to wrap `abbreviate-file-name`
>> with `condition-case` or something?
>
> (ignore-errors (abbreviate-file-name default-directory)) would do.
Got it.
>> Actually there are more command that won't work from the
>> `*tramp/suod...` buffer: vc-dir, find-file, dired.
>> All of them leads to "Method 'soud' is not known" error.
>
> Yes, but only if you take the buffer with the damaged
> default-directory. I would try to ban such a buffer in my code.
>
> Best regards, Michael.
Thanks again, Michael.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Tue, 22 Oct 2019 11:24:09 GMT)
Full text and
rfc822 format available.
This bug report was last modified 4 years and 179 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.