bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#58790: Eglot URI parsing bug when using clojure-lsp server


From: Michael Albinus
Subject: bug#58790: Eglot URI parsing bug when using clojure-lsp server
Date: Sat, 12 Nov 2022 18:03:04 +0100
User-agent: Gnus/5.13 (Gnus v5.13)

Eli Zaretskii <eliz@gnu.org> writes:

Hi,

>> > In reviewing the comments over and over I've made a modification to
>> > the second patch involving the warning message. Instead of using an
>> > arbitrary symbol I realized that the function `find-file-name-handler'
>> > works when a nil value for the second argument (operation).
>>
>> I've now pushed the first patch, but I held off the second patch.
>>
>> I don't see this OPERATION=nil option documented in the docstring of
>> find-file-name-handler, so I'm not sure we should rely on it.
>>
>> I think we should provide OPERATION here, because what we want to check
>> is if we, Emacs, can actually visit the file designated by the URI.  So
>> I think passing something like 'access-file' as the OPERATION argument
>> makes more sense.  But Eli probably has more knowledge here.  Maybe
>> passing nil is indeed correct.
>
> I think you are right, but Michael (CC'ed) will know for sure.

Well, using nil as operation might work in this special case, but it
disables an important feature of file name handlers: use of
inhibit-file-name-operation. That's why it shouldn't be documented as
such.

Using just an arbitrary symbol as operation looks better to me. If you
use an existing operation name, like access-file, it could conflict later
with the inhibit-file-name-operation/inhibit-file-name-handlers machinery.

This said, I don't understand why you need this check at all. But I
haven't followed the eglot discussion closely.

Best regards, Michael.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]