From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Using different default-directory and relative paths in VC, Was: Re: bug#21383 Date: Mon, 07 Sep 2015 18:33:56 -0400 Message-ID: References: <55E41499.5030501@yandex.ru> <55E5094A.3010108@yandex.ru> <55E59487.1050804@yandex.ru> <55E5CA42.1080005@yandex.ru> <55E5DF1A.9010902@yandex.ru> <55E6D426.10105@yandex.ru> <55E89E83.6000501@yandex.ru> <55EA5CB0.9070007@yandex.ru> <55EB50D7.2030103@yandex.ru> <55EDF9BC.3000605@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1441665267 3568 80.91.229.3 (7 Sep 2015 22:34:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 7 Sep 2015 22:34:27 +0000 (UTC) Cc: emacs-devel To: Dmitry Gutov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Sep 08 00:34:20 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZZ4zQ-0006P5-JY for ged-emacs-devel@m.gmane.org; Tue, 08 Sep 2015 00:34:16 +0200 Original-Received: from localhost ([::1]:59094 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZZ4zQ-0002Fm-F8 for ged-emacs-devel@m.gmane.org; Mon, 07 Sep 2015 18:34:16 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46352) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZZ4zA-0002EP-UR for emacs-devel@gnu.org; Mon, 07 Sep 2015 18:34:01 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZZ4z7-0006Si-PO for emacs-devel@gnu.org; Mon, 07 Sep 2015 18:34:00 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:50941) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZZ4z7-0006Sb-LW for emacs-devel@gnu.org; Mon, 07 Sep 2015 18:33:57 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0AsEwA731xV/5Wg+M5cgxCEAoVVuzcJh0sEAgKBPDkUAQEBAQEBAYEKQQWDXQEBAwFWIwULCw4mEhQYDSSINwjPIwEBAQEGAQEBAR6LOoUFB4QtBYtEnx2IXoFFI4I7gVkigngBAQE X-IPAS-Result: A0AsEwA731xV/5Wg+M5cgxCEAoVVuzcJh0sEAgKBPDkUAQEBAQEBAYEKQQWDXQEBAwFWIwULCw4mEhQYDSSINwjPIwEBAQEGAQEBAR6LOoUFB4QtBYtEnx2IXoFFI4I7gVkigngBAQE X-IronPort-AV: E=Sophos;i="5.13,465,1427774400"; d="scan'208";a="162840722" Original-Received: from 206-248-160-149.dsl.teksavvy.com (HELO ceviche.home) ([206.248.160.149]) by ironport2-out.teksavvy.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 07 Sep 2015 18:33:56 -0400 Original-Received: by ceviche.home (Postfix, from userid 20848) id 98B1C6612A; Mon, 7 Sep 2015 18:33:56 -0400 (EDT) In-Reply-To: <55EDF9BC.3000605@yandex.ru> (Dmitry Gutov's message of "Mon, 7 Sep 2015 23:55:24 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.181 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:189680 Archived-At: >>> Does vc-status get a relative file name as input? >> Currently, I don't think so. But that could be changed if needed. > Hopefully not. >>> b) how are you going to enforce it?. >> By checking all callers? > That's an odd thing to do for an API. What if diff-hl calls vc-state with an > absolute path? Will it get a slap on the wrist? Sorry, I didn't realize you were talking about vc-state. No I guess vc-state would have to keep working with absolute file names (tho it could be extended to also accept relative file names). > in question should work well enough. Although when a command is > passed a list of files, determining their common parent will require > more effort. I'd expect that the caller should be able to easily arrange for each file in the list to *already* be relative to default-directory, so there's no need to look for the common parent. Stefan