From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: James Thomas Newsgroups: gmane.emacs.help Subject: Re: Reviewing git patches with the source file without applying the patch Date: Fri, 08 Dec 2023 19:16:22 +0530 Message-ID: <87lea4remp.fsf@gmx.net> References: <17963.5169146181$1701752424@news.gmane.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1919"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: help-gnu-emacs@gnu.org To: husain@alshehhi.io Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Fri Dec 08 14:47:19 2023 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rBbCJ-0000HV-6z for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 08 Dec 2023 14:47:19 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rBbBk-00044a-5s; Fri, 08 Dec 2023 08:46:44 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rBbBg-00041c-Ia for help-gnu-emacs@gnu.org; Fri, 08 Dec 2023 08:46:40 -0500 Original-Received: from mout.gmx.net ([212.227.15.18]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rBbBY-0005Jw-NW for help-gnu-emacs@gnu.org; Fri, 08 Dec 2023 08:46:40 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=s31663417; t=1702043186; x=1702647986; i=jimjoe@gmx.net; bh=DXy3wgsG1T6+Q0tb2o1f8LycaAsZQxpRyHqEeotqwQs=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References: Date; b=Xj2V9t7t8wg3yxmhGDakPCWI/MR6pnht/M243mgI5kh5jnp7G/vpDq04UWO5vsqp GfXyebsQXpaJMllnvn7qAw7TMWz8ij352e18QFQQGUTERkumT6NaLFUHcK38V+9vU v9UqVn1/pk4m5xskvvpOg9hGi2SRMiXbcjTpry4AH5ndPiC4L5VQ08wEBm3tawaE2 5wpNMGdSAnANAPEse3fwm/65SfNMEpL9uHpAueRvknPnmnMxdRLEyxu8v5ps8bJCn tMW54LSQyn0mmU2WQvDwvhCy1qQ7obULFFti7UIZtG1flHHuVobdVzsi6cKzyv4jH vGhXi3W2LQLjOisC+w== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Original-Received: from user-Inspiron-15-5518 ([117.212.163.130]) by mail.gmx.net (mrgmx005 [212.227.17.184]) with ESMTPSA (Nemesis) id 1Mkpav-1red8Y33BH-00mL2P; Fri, 08 Dec 2023 14:46:26 +0100 In-Reply-To: <17963.5169146181$1701752424@news.gmane.org> (husain@alshehhi.io's message of "Mon, 04 Dec 2023 22:59:13 -0600") X-Provags-ID: V03:K1:vmeI96xUAFRZxL2NHrUIFR3dpA3NcnHzhEEldG6FHHSsAy5svj9 UgbnPf/SlKSc25alLHjLPzMlSAozPwAADqxtDaQ93mKtduBxMZEBaRDJ/gFatVXbbHNsOK7 lzCf5iie3EfACLwn1aSTMptB59nLl1+AnSnPcDcsLBRVMXVaZ5h/h51wMfUC03VIsaAY13m utqdEppCluCdi+qKvkWfg== UI-OutboundReport: notjunk:1;M01:P0:r2jzoREzlqg=;Pco/XaV4/wM38hdGXT2lhxPn2TO IMwVGMUyKi4uWwaGtV0NO2rXYXqwt/AyOzylQm7JI32P5peRIMhrSuS15gGtcnhvXzsPuihIc cgblIMt2RRXGs50SxlC4011j8Ddo9U3oWhuTM7eDiG5gL2POm+9mog3w6EkGd2O4U6BRaLRpY oYX9ANXxUYPfqJFY63E1ew+MbYw2sNVomTYLHnKnJtw2+318j/c+y8mnfcpS6AzWaU2O079pg mxr8dSHQ5cw+LITgn7Jzocpx8/hYvLF0nUmxwflSmndCuSCfVoPXk2Tr8/Yhnv+bQ3QJ3EWmr /n94Ij12wJzAvarH/NUuP2DoEULoF7bwLt8Hngsx0l/lV7zd32xURfURKimDWwUscYVL5+Pdz C5P+Qz8qdRd8flXzuTDwMTgtSAmmjbdzKP41RzbaxHHKtf8vbARQ0UcRI6Pi3W+m7iHOtauEg 2cnRALSghNGd749dBKspZo5S6c2v7v5NAXKlAJVqRZP3+JA9IYsQKBF+2Jkqf0HeBWyN4mAzM y4GNOL58hdjrk8ZmwqM1EmSrnyZL5Ftr0FQvttpfKs1C/hHprjz22zENJ9Xv+KhMQ3amzBizF nSVGcFiufS5nSo9NvBmbE7nW9/KRYimsswZurv31lZLNmmwnTpXrn2b3F7SLBzLeTZ4yet+Fc 0NyZrAlFgKeLoTjX5fM9293hSxf9IfHurPcz6t1Fv9sq/MQ3oKcrXXQ5gwXLrxgrhqlJCA6LJ 5vdMBZp0gBYfMR9cXwyLNYkLF7SRG3EduBiNtUKfSiBM4MSIvUBa1JaxkntC0kVgGoZy2o0D Received-SPF: pass client-ip=212.227.15.18; envelope-from=jimjoe@gmx.net; helo=mout.gmx.net X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 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-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:145630 Archived-At: husain@alshehhi.io wrote: > Hello, > > I often receive patches (files generated by 'git format-path' > command). I review these files in diff-mode. This is in most cases is > enough. But sometimes, I want to see the source code before and after > the change so that I can see the full context. I am not sure how to do > this in emacs. > > diff-mode provides C-c C-c (which is diff-goto-source). This is great > improvement, but it shows the source file only, not the changes before > and after. I have to compute in my head the patch against the source > file to undrestand the change. Additionally, diff-goto-source requires > the path to the source file. I wish it would take the dir instead and it > can compute the source file on its own. > > diff-mode also provides C-c C-e (which is diff-ediff-patch). This view > is what I am looking for: it provides a view when I can see the source > file before and after the change. However, diff-ediff-patch applies the > change automatically, which is not what I want to do. Additionally, > diff-ediff-patch generates .orig files which are also unwant. > > Any help is appreciated. There's ediff-patch-buffer. You can also try diffing the buffer with the file after applying the patch in diff mode, for eg, with ediff-current-file. More: (info "(ediff) Major Entry Points") --