From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.help Subject: Re: How to apply (multi file) patches conveniently Date: Mon, 06 Feb 2017 17:49:09 +0200 Message-ID: <83fujr7216.fsf@gnu.org> References: <87efzb5xgl.fsf@drachen> NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1486397516 5983 195.159.176.226 (6 Feb 2017 16:11:56 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 6 Feb 2017 16:11:56 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Feb 06 17:11:53 2017 Return-path: Envelope-to: geh-help-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 1caltP-0001Jc-54 for geh-help-gnu-emacs@m.gmane.org; Mon, 06 Feb 2017 17:11:51 +0100 Original-Received: from localhost ([::1]:49260 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1caltU-0004aC-OB for geh-help-gnu-emacs@m.gmane.org; Mon, 06 Feb 2017 11:11:56 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42019) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1calXZ-0003hd-8E for help-gnu-emacs@gnu.org; Mon, 06 Feb 2017 10:49:17 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1calXU-00079h-Ca for help-gnu-emacs@gnu.org; Mon, 06 Feb 2017 10:49:17 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:50611) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1calXU-00079W-9k for help-gnu-emacs@gnu.org; Mon, 06 Feb 2017 10:49:12 -0500 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4614 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1calXT-0000i1-IA for help-gnu-emacs@gnu.org; Mon, 06 Feb 2017 10:49:12 -0500 In-reply-to: <87efzb5xgl.fsf@drachen> (message from Michael Heerdegen on Mon, 06 Feb 2017 13:13:14 +0100) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:112260 Archived-At: > From: Michael Heerdegen > Date: Mon, 06 Feb 2017 13:13:14 +0100 > > I wonder how a convenient way to apply multi-file patches like they are > posted in emacs-devel or emacs-bug looks like. I just mark the entire patch in Emacs, then invoke "M-|", and type patch -d /the/root/directory/of/the/project -pN where N should be chosen by counting the slashes that you will want Patch to remove before looking for files relative to that root directory. For patches produced by "git diff" etc., N is typically 1.