|
From: | Juri Linkov |
Subject: | bug#50572: 28.0.50; [PATCH] fix VC to find the responsible backend with the most specific path. |
Date: | Tue, 09 Nov 2021 10:09:19 +0200 |
User-agent: | Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu) |
>> I thought that we might already have a function for this. Does counting >> slashes will work with Windows path? > > Hm... Actually, I'm not sure. Perhaps doing a series of > file-name-directory/directory-file-name in a loop (to peel off the > directory components) would be the best algorithm here? And I don't > think we have a function for this -- at least I can't find anything > promising while poking around. ffap-list-env contains such comment: ;; Similar: dired-split, TeX-split-string, and RHOGEE's psg-list-env ;; in ff-paths and bib-cite. The EMPTY arg may help mimic kpathsea. And indeed dired-split is used in dired-aux.el like this: (dired-split "/" dir1) I don't know if this works on Windows.
[Prev in Thread] | Current Thread | [Next in Thread] |