Hi Michael,

It looks like Oleh is no longer maintaining ivy-mode. I have cc’ed the current 
maintainer and opened a pull request 
(https://github.com/abo-abo/swiper/pull/3046) on their GitHub repository.

Best,
Ruiyang

> On Mar 6, 2023, at 1:31 PM, Ruiyang Wu <ywwr...@gmail.com> wrote:
> 
> Hi Michael,
> 
> Thanks for the quick reply. I can confirm the patch works for me.
> 
> Best,
> Ruiyang
> 
>> On Mar 6, 2023, at 12:27 PM, Michael Albinus <michael.albi...@gmx.de> wrote:
>> 
>> Ruiyang Wu <ywwr...@gmail.com> writes:
>> 
>>> Hi Michael,
>> 
>> Hi Ruiyang,
>> 
>>> If you are willing to test out ivy-mode, here is the recipe:
>> 
>> Yep. I've tested with Emacs 28.3 and ivy 0.13.4 + Tramp 2.6.0.2 from GNU
>> ELPA.
>> 
>>> With ivy-mode turned on, type "C-x d” (dired), then in the mini
>>> buffer, input "//ssh:” followed by “C-j” (ivy-alt-done). With Tramp
>>> 2.5.3.28.2, it will give possible completions (which is not as good as
>>> Tramp’s builtin completion). With Tramp 2.6.0.2, this gives the error
>>> “Reading directory: No such file or directory, /ssh:”.
>> 
>> Thanks for the recipe. I could reproduce the problem.
>> 
>>> The reason for the error is in the function "ivy--directory-done”.
>>> The new behavior of (file-exists-p file) returning t causes the
>>> function to enter the wrong condition clause. (ivy thinks “/ssh:” is a
>>> file and tries to open it).
>> 
>> Indeed. The following patch fixes this for me:
>> 
>> *** /home/albinus/.emacs.d/elpa/ivy-0.13.4/ivy.el~ 2021-03-23 
>> 15:42:21.107225608 +0100
>> --- /home/albinus/.emacs.d/elpa/ivy-0.13.4/ivy.el 2023-03-06 
>> 18:06:49.507257395 +0100
>> ***************
>> *** 1029,1034 ****
>> --- 1029,1036 ----
>>              (defvar tramp-completion-mode)
>>              (with-no-warnings
>>                (let* ((tramp-completion-mode t)
>> +                       (non-essential t)
>> +                       minibuffer-completing-file-name
>>                       (file (expand-file-name
>>                              (if (> ivy--length 0) (ivy-state-current 
>> ivy-last) ivy-text)
>>                              ivy--directory)))
>> 
>> I've added (non-essential t), because this setting shall be used instead
>> of (tramp-completion-mode t) in newer Tramp versions. And I've added
>> minibuffer-completing-file-name (being nil), because it changes Tramp
>> completion (when non-nil) since Tramp 2.6.0.2. That Tramp change is
>> already on GNU ELPA, and it will appear with Emacs 29.2.
>> 
>> Could you please confirm, that this works for you? I'll be in contact
>> with the ivy-mode maintainer (added to Cc) then for a final solution.
>> 
>>> Best,
>>> Ruiyang
>> 
>> Best regards, Michael.
> 

Reply via email to