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

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

bug#58835: 28.1; try-complete-file-name-partially modifies text before p


From: Stefan Kangas
Subject: bug#58835: 28.1; try-complete-file-name-partially modifies text before point
Date: Sat, 2 Sep 2023 09:43:09 -0700

Eli Zaretskii <eliz@gnu.org> writes:

> tags 58835 notabug wontfix
> thanks
>
>> When hippie-expand uses try-complete-file-name-partially on a partial
>> path which uses platform standard directory separators, then directory
>> separators are replaced with posix directory separators throughout the
>> entire path.
>>
>> Functions that "expand" or "complete" should not change text before
>> point.
>
> In general, yes.  But I see no reason to expect that with 110%
> certainty in all cases, especially on MS-Windows.
>
>> For example, when expanding
>>     c:\Documents
>> it becomes
>>     c:/Documents and settings/
>>
>> Expected behaviour: Nothing changed before point, expand to:
>>     c:\Documents and settings/
>
> This is a non-starter, sorry.  Emacs converts backslashes in Windows
> file names to forward slashes at the first opportunity, and it does
> that for very good reasons: to allow comparison of file names as
> (almost) simple strings, and to avoid causing problems in code that
> may not expect backslashes in file names.  This is why Emacs does this
> conversion in expand-file-name, which is generally called before a
> file name is passed to some C library function.  It does that also
> when you call the completion commands -- again, to simplify textual
> comparison of completion candidates.

I'm therefore closing this bug report.





reply via email to

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