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

[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: Dmitry Gutov
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: Wed, 26 Oct 2016 02:12:21 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:50.0) Gecko/20100101 Thunderbird/50.0

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, 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?





reply via email to

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