From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs 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 Message-ID: References: <1462311145-5959-1-git-send-email-hong@topbug.net> <85f11f8a-1799-befd-3e5b-f7d7a6eac660@topbug.net> <072a649f-d11a-7c82-b3ae-32d9a92c8f8b@topbug.net> <5d653522-49bd-8b48-e3d6-0c09d1c65fae@yandex.ru> <377f4ee1-54a9-b10c-dc18-3acea6492bec@yandex.ru> <1ad97145-d21e-5d64-8b6c-4b4b2bc2ab49@yandex.ru> <87zilss0z6.fsf@topbug.net> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1477437197 11872 195.159.176.226 (25 Oct 2016 23:13:17 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 25 Oct 2016 23:13:17 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:50.0) Gecko/20100101 Thunderbird/50.0 Cc: 23436@debbugs.gnu.org To: Hong Xu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Oct 26 01:13:13 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bzAu6-0002LH-Qm for geb-bug-gnu-emacs@m.gmane.org; Wed, 26 Oct 2016 01:13:11 +0200 Original-Received: from localhost ([::1]:58649 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bzAu8-0007uT-Vd for geb-bug-gnu-emacs@m.gmane.org; Tue, 25 Oct 2016 19:13:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46372) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bzAu2-0007uA-Cw for bug-gnu-emacs@gnu.org; Tue, 25 Oct 2016 19:13:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bzAtz-0001Jb-5U for bug-gnu-emacs@gnu.org; Tue, 25 Oct 2016 19:13:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:41441) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1bzAtz-0001J5-0b for bug-gnu-emacs@gnu.org; Tue, 25 Oct 2016 19:13:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bzAty-0004TH-7w for bug-gnu-emacs@gnu.org; Tue, 25 Oct 2016 19:13:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 25 Oct 2016 23:13:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 23436 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 23436-submit@debbugs.gnu.org id=B23436.147743715117151 (code B ref 23436); Tue, 25 Oct 2016 23:13:02 +0000 Original-Received: (at 23436) by debbugs.gnu.org; 25 Oct 2016 23:12:31 +0000 Original-Received: from localhost ([127.0.0.1]:56840 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bzAtS-0004SZ-Qi for submit@debbugs.gnu.org; Tue, 25 Oct 2016 19:12:30 -0400 Original-Received: from mail-wm0-f44.google.com ([74.125.82.44]:38895) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bzAtR-0004SM-A3 for 23436@debbugs.gnu.org; Tue, 25 Oct 2016 19:12:29 -0400 Original-Received: by mail-wm0-f44.google.com with SMTP id d128so54751085wmf.1 for <23436@debbugs.gnu.org>; Tue, 25 Oct 2016 16:12:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=r0nBgM+5ZPU5kj6IYHHkkTgHWfuCQrCJ1FZrY6R9Maw=; b=0pwVQlBea9nBJdq+9TL/yTdcJdkBGAuzmAUjpMyimKi67bsOZ+kZZYM6ZlOcQw2doy 0EuVxOR6b1ybUS3YGUVb/mcRPQs4jN0BGmGFzKRMCq90euwTp9uhceTsTfgVsaYshEO8 4KoI8tFxukkZ0215OeOZNboi/XnifMyBAPchovZVDefyl1akoojR4OT/1Wk1pA6iHtGP ta3RpK35XLQN5aXW9fwehm0s5YCVrcuSfPp3DKMl0qQxyE3k+UN+jZ5jODJK4idWfDPv 4yIsfjmuiXO+WGJ2e77scxEO9PULW/XZgowasDtY+UbpvIJvfsY40r119krk0XLgrRWM IK/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:subject:to:references:cc:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=r0nBgM+5ZPU5kj6IYHHkkTgHWfuCQrCJ1FZrY6R9Maw=; b=I+VuskU6ykoCxfyzz7YCDByHWBeTF7HDxyztirIUbPGOsjP/UjOxwVvmwCBC7tGyxg AHzM5nFqTJfrGGmBv6Jeu6j6eR4vk9rgarGIUZXpvwmZ6p30maQXCHI3dsD0qi3nIimz 3djcnMVDOLH025Tj64Uycl35Pby0mUR3y1cBnDrC+q8xQDwev+0WCDpfqwBKuZ8X/RMQ awEBYEffgb0lAl/SRyffqqig8jw4zlbrogoWvL/8+j5tcDzAE24BMBowz7mDODKd7tF1 LnOO3hnYGNsouIFHuVBEW3+3mBu9Udi0vrP3IJIzkXUSPTfanEh3J7JvOWb8DsXGx+7O rw3Q== X-Gm-Message-State: ABUngvfXWUNyA/K6c2mDz9EN6d3Y/0Hs5ksAn5ZXePyJq7OAFVHvWcX9Y47CQFqIIY2wbA== X-Received: by 10.194.102.100 with SMTP id fn4mr4222915wjb.199.1477437143392; Tue, 25 Oct 2016 16:12:23 -0700 (PDT) Original-Received: from [192.168.1.3] ([185.105.173.41]) by smtp.googlemail.com with ESMTPSA id x127sm6087182wmd.21.2016.10.25.16.12.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 25 Oct 2016 16:12:22 -0700 (PDT) In-Reply-To: <87zilss0z6.fsf@topbug.net> Content-Language: en-US X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:125022 Archived-At: 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?