[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#23436: [PATCH] Attemp to use the true name of a file to determine re
From: |
Hong Xu |
Subject: |
bug#23436: [PATCH] Attemp to use the true name of a file to determine responsible vc if the genuine name does not work. |
Date: |
Sat, 29 Oct 2016 17:42:01 -0700 |
User-agent: |
mu4e 0.9.17; emacs 25.1.50.8 |
On 2016-10-25 Tue 16:12 GMT-0700, Dmitry Gutov <dgutov@yandex.ru> wrote:
> On 25.10.2016 22:05, Hong Xu wrote:
>
>> I don't understand why find-alternate-file should be used.
>
> For no reason other than the resulting command could be useful in more
> situations than just this one.
>
>> The reason we
>> used (vc-follow-link) is to pass the correct file path to
>> vc-responsible-backend. I don't see how find-alternate-file can be used here.
>
> It would open the file (or directory) than is the true name of the
> currently visited file (or directory), and kill the previous buffer.
>
> vc-responsible-backend would be called with the true name automatically.
> This is close to what vc-follow-link does already.
>
> But if that's definitely not what you want, how about a command like this?
>
> (defun vc-refresh-as-link-target ()
> (interactive)
> (let ((buffer-file-name (file-truename buffer-file-name)))
> (vc-refresh-state)))
>
> By the way, please remind us why vc-follow-symlinks (the variable) with
> the default value `ask' is not sufficient for you?
OK, I think I have screwed it up. vc-responsible-backend looks like a function
mainly provided for elisp programming purpose, which people can make use
in their own customization. Thus, none of these functions should be
used. Instead, file-truename or file-chase-links should be used. That
is,
(vc-responsible-backend (file-chase-links file))
>
>>> OK, mention where?
>>
>> In the doc string.
>
> The docstring of what? Please be more precise, the less I have to think
> about or make choices regarding documentation, the happier I am.
>
>> Maybe we should also mention `vc-responsible-backend'
>> in the info doc "Supported Version Control Systems" in general.
>
> Care to send the proposed addition in the form of a patch?
The attachment is a draft of my proposed doc change. Feel free to adjust
the contents and the language.
Hong
vc-doc.patch
Description: Text Data
signature.asc
Description: PGP signature
- bug#23436: [PATCH] Attemp to use the true name of a file to determine responsible vc if the genuine name does not work., (continued)
- bug#23436: [PATCH] Attemp to use the true name of a file to determine responsible vc if the genuine name does not work., Dmitry Gutov, 2016/10/20
- bug#23436: [PATCH] Attemp to use the true name of a file to determine responsible vc if the genuine name does not work., Hong Xu, 2016/10/20
- bug#23436: [PATCH] Attemp to use the true name of a file to determine responsible vc if the genuine name does not work., Dmitry Gutov, 2016/10/20
- bug#23436: [PATCH] Attemp to use the true name of a file to determine responsible vc if the genuine name does not work., Hong Xu, 2016/10/20
- bug#23436: [PATCH] Attemp to use the true name of a file to determine responsible vc if the genuine name does not work., Dmitry Gutov, 2016/10/24
- bug#23436: [PATCH] Attemp to use the true name of a file to determine responsible vc if the genuine name does not work., Hong Xu, 2016/10/25
- bug#23436: [PATCH] Attemp to use the true name of a file to determine responsible vc if the genuine name does not work., Dmitry Gutov, 2016/10/25
- bug#23436: [PATCH] Attemp to use the true name of a file to determine responsible vc if the genuine name does not work.,
Hong Xu <=
- bug#23436: [PATCH] Attemp to use the true name of a file to determine responsible vc if the genuine name does not work., Eli Zaretskii, 2016/10/30
- bug#23436: [PATCH] Attemp to use the true name of a file to determine responsible vc if the genuine name does not work., Hong Xu, 2016/10/30
- bug#23436: [PATCH] Attemp to use the true name of a file to determine responsible vc if the genuine name does not work., Eli Zaretskii, 2016/10/31
- bug#23436: [PATCH] Attemp to use the true name of a file to determine responsible vc if the genuine name does not work., Hong Xu, 2016/10/31
- bug#23436: [PATCH] Attemp to use the true name of a file to determine responsible vc if the genuine name does not work., Dmitry Gutov, 2016/10/31
- bug#23436: [PATCH] Attemp to use the true name of a file to determine responsible vc if the genuine name does not work., Hong Xu, 2016/10/31