From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Arseny Sher Newsgroups: gmane.emacs.bugs Subject: bug#26028: 26.0.50; epatch for multifile patches Date: Thu, 09 Mar 2017 14:44:11 +0300 Message-ID: <87shmmvfn8.fsf@yandex.ru> References: <87varjfzhr.fsf@yandex.ru> <838tofh93b.fsf@gnu.org> <87y3wfv3iy.fsf@yandex.ru> <87d1drfcqp.fsf@calancha-pc> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1489059917 4458 195.159.176.226 (9 Mar 2017 11:45:17 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 9 Mar 2017 11:45:17 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) Cc: Michael Heerdegen , 26028@debbugs.gnu.org To: Tino Calancha Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Mar 09 12:45:11 2017 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 1clwVL-0000Yi-0Y for geb-bug-gnu-emacs@m.gmane.org; Thu, 09 Mar 2017 12:45:11 +0100 Original-Received: from localhost ([::1]:33447 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1clwVQ-0005Hq-W4 for geb-bug-gnu-emacs@m.gmane.org; Thu, 09 Mar 2017 06:45:17 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36986) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1clwVG-0005EW-TE for bug-gnu-emacs@gnu.org; Thu, 09 Mar 2017 06:45:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1clwVD-0000KD-ON for bug-gnu-emacs@gnu.org; Thu, 09 Mar 2017 06:45:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:48999) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1clwVD-0000K5-L0 for bug-gnu-emacs@gnu.org; Thu, 09 Mar 2017 06:45:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1clwVD-0001yL-6l for bug-gnu-emacs@gnu.org; Thu, 09 Mar 2017 06:45:03 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Arseny Sher Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 09 Mar 2017 11:45:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 26028 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 26028-submit@debbugs.gnu.org id=B26028.14890598657519 (code B ref 26028); Thu, 09 Mar 2017 11:45:02 +0000 Original-Received: (at 26028) by debbugs.gnu.org; 9 Mar 2017 11:44:25 +0000 Original-Received: from localhost ([127.0.0.1]:47198 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1clwUb-0001xD-EB for submit@debbugs.gnu.org; Thu, 09 Mar 2017 06:44:25 -0500 Original-Received: from forward1m.cmail.yandex.net ([5.255.216.2]:47474) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1clwUZ-0001wz-NH for 26028@debbugs.gnu.org; Thu, 09 Mar 2017 06:44:24 -0500 Original-Received: from smtp1m.mail.yandex.net (smtp1m.mail.yandex.net [IPv6:2a02:6b8:0:2519::121]) by forward1m.cmail.yandex.net (Yandex) with ESMTP id E3BAA20D26; Thu, 9 Mar 2017 14:44:16 +0300 (MSK) Original-Received: from smtp1m.mail.yandex.net (localhost.localdomain [127.0.0.1]) by smtp1m.mail.yandex.net (Yandex) with ESMTP id 9E88D63C0E9F; Thu, 9 Mar 2017 14:44:12 +0300 (MSK) Original-Received: by smtp1m.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id sbLWuDSpMU-iBYqOpR3; Thu, 09 Mar 2017 14:44:11 +0300 (using TLSv1.2 with cipher AES128-SHA256 (128/128 bits)) (Client certificate not present) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1489059851; bh=rLTDGiizMyUtFMRkNpdIBLll5NiFPJzgFV6lhB3V+E4=; h=From:To:Cc:Subject:References:Date:In-Reply-To:Message-ID; b=esXEzg20dcnZIc0llkDzIpc+MRaae7cZsNDjLMng+ICtLqfOtvZyMJj6tfmkZNjIr uaysIs5SFaxf7xpX0OZPtR8ZaYfpihD/sAee3eW+c6EED6OqBQvyCKFESJZE8C3UHE kE1ImMFQCekhY0KCCfSQGqwE6mz5fk6vczIQJt40= Authentication-Results: smtp1m.mail.yandex.net; dkim=pass header.i=@yandex.ru X-Yandex-Suid-Status: 1 0,1 0,1 0,1 0 In-Reply-To: <87d1drfcqp.fsf@calancha-pc> (Tino Calancha's message of "Thu, 09 Mar 2017 10:41:18 +0900") 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:130369 Archived-At: Tino Calancha writes: >> How should I apply tmp.patch to proj? > Ediff uses the `default-directory' for the patch buffer as a hint. > When i apply patches generated with VCS i _always_ set the > `default-directory' of the patch buffer equal as the root directory of > the project. That makes multi patches work OK. > This is how i would do in your exmple: > M-: (dired "/tmp/proj") RET > C-x b *p* RET ; Now copy the patch here in your favourite way. > C-x 4 r /tmp/tmp.patch RET > C-x h M-w C-x o C-y > M-x epatch RET y *p* RET /tmp/proj/src RET Honestly, I didn't understand your answer. 1) I don't see any effects of changing the default directory. I set default directory of buffer with patch to ~/tmp/proj as you say, then run epatch, firstly point it to this buffer, then specify ~/tmp/proj (because this is project root, and I want to patch the whole project!) as target directory and it fails again, exactly as before. 2) Interpreting your instructions literally, I should specify ~/tmp/proj/src as target directory to ediff (answer to its last question). Well, then it works, but this is precisely the behaviour which doesn't make any sense to me: ediff just ignores the path to file ('src' directory here). And it happens totally independent of default directory value, I tried with different ones. I suppose that the whole point of applying multifile patch is to allow ediff deduce which files (with full paths) it needs to patch automatically, without manually specifying dirs like 'src'. Imagine we have also hello.h file under proj/include; then, if I tell ediff to use ~/tmp/proj/src dir as target directory as you say, it will successfully patch hello.c, but it will fail again attempting to patch hello.h, because there is no such file proj/src/hello.h. So, it is hard for me to suggest better epatch behaviour because I actually don't comprehend its current one. I don't know why other people don't encounter these problems. Probably they just apply patches via git and only then look at the diff via ediff, and I should go the same way...