From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Tino Calancha Newsgroups: gmane.emacs.bugs Subject: bug#9021: 24.0.50; epatch - weird, confusing, huh? Date: Sat, 11 Mar 2017 17:26:10 +0900 Message-ID: <87poho9q3h.fsf@calancha-pc> References: <595CCA6337AB479CBDA1D5ED43EF45C1@us.oracle.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1489220834 19567 195.159.176.226 (11 Mar 2017 08:27:14 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 11 Mar 2017 08:27:14 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) Cc: 9021@debbugs.gnu.org, tino.calancha@gmail.com To: "Drew Adams" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Mar 11 09:27:08 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 1cmcMj-0004BU-P7 for geb-bug-gnu-emacs@m.gmane.org; Sat, 11 Mar 2017 09:27:06 +0100 Original-Received: from localhost ([::1]:42403 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cmcMp-0004aR-Jc for geb-bug-gnu-emacs@m.gmane.org; Sat, 11 Mar 2017 03:27:11 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46795) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cmcMk-0004aA-Fh for bug-gnu-emacs@gnu.org; Sat, 11 Mar 2017 03:27:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cmcMh-0006QS-7r for bug-gnu-emacs@gnu.org; Sat, 11 Mar 2017 03:27:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:52025) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cmcMh-0006QO-3S for bug-gnu-emacs@gnu.org; Sat, 11 Mar 2017 03:27:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cmcMf-0002U3-Uk for bug-gnu-emacs@gnu.org; Sat, 11 Mar 2017 03:27:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Tino Calancha Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 11 Mar 2017 08:27:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 9021 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 9021-submit@debbugs.gnu.org id=B9021.14892207859498 (code B ref 9021); Sat, 11 Mar 2017 08:27:01 +0000 Original-Received: (at 9021) by debbugs.gnu.org; 11 Mar 2017 08:26:25 +0000 Original-Received: from localhost ([127.0.0.1]:50224 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cmcM5-0002T8-Cf for submit@debbugs.gnu.org; Sat, 11 Mar 2017 03:26:25 -0500 Original-Received: from mail-pg0-f66.google.com ([74.125.83.66]:33175) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cmcM3-0002Su-1q for 9021@debbugs.gnu.org; Sat, 11 Mar 2017 03:26:23 -0500 Original-Received: by mail-pg0-f66.google.com with SMTP id 77so12663239pgc.0 for <9021@debbugs.gnu.org>; Sat, 11 Mar 2017 00:26:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=SOGPp5tFb44422NyaFY0dDaOYBiUg/MTCeGh1BHMh8U=; b=Py0u+jfZizlHPP0YzfE4Bd2Q0fSc2UoHrQbu/zV40mwfVmKFwnBAITt3O6y5l2e9eN Bl4vqBDEOCjLWPCSf02YM6G8BU+rZI6BtkMMjxSW3b82f52X7br/O503s3jdB1D8zVSe zuGVzpjwwbNg3O1UJn3OaJRgzX8Q1bm3V9LDydmPRXqOuM/pheHRQHh7qNwiblNSrZjL N8yRUePlSg0CTyXfaZlXGlxUuoDwu1Y5CVTyXzENgUNVUNifydZe8AyU+ZiZMcPU4ph1 iH3QuontR/VYhdCXGoymyME7Uhk6s6y8aQjeuLn+tCRbt1bH61fmqXVY1d9qdID1TATr CoEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=SOGPp5tFb44422NyaFY0dDaOYBiUg/MTCeGh1BHMh8U=; b=PifSapW/4tYdW9Nq2bg781E5tP/rk/CfqS6J9pJ9llJ5YZSnaiJZDq2jAdrYx7iS+b XbsZTv76o2Wzay8/eyl3EZmxcuSPGYRI8lA4feRvL8V7N+G6pxMiVQ3PbUYa7x4Tfv7C jU9OiktvEpeLOuw8jM8AFXIDpHbXe4/IFDfy2JPoXi19b8IUrUGqe0zb4s/LQL2nu0Mg Lw0/F6BWe96iMilgIz/5CkDi+tMlqmU+zUKKegMG4r4GTKhMX+XoXk7I0GmlEgfqFb4e KXNQA4u6zFXzjOfKtGQQycVnUqhAjp2T7BO2D6/xeM1YrXQiY5WG4JHL4oVXLN4eoa6m Nzsw== X-Gm-Message-State: AMke39k9fSH+JTTLA5dBZvozD3SVK0JJjFZ8AGNO+x12OMcoePNQlNH23Y59MEQuSvCn0A== X-Received: by 10.98.62.219 with SMTP id y88mr25857983pfj.62.1489220776938; Sat, 11 Mar 2017 00:26:16 -0800 (PST) Original-Received: from calancha-pc ([240f:6e:d2cd:1:500:6e50:8d61:6810]) by smtp.gmail.com with ESMTPSA id d66sm22681566pfe.90.2017.03.11.00.26.14 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 11 Mar 2017 00:26:16 -0800 (PST) In-Reply-To: <595CCA6337AB479CBDA1D5ED43EF45C1@us.oracle.com> (Drew Adams's message of "Thu, 7 Jul 2011 09:15:49 -0700") 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:130466 Archived-At: "Drew Adams" writes: > emacs -Q > > This is the first time I've tried to use `epatch'. > > I have the file to patch (e.g. `toto.el') in one window, > and the patch (as a file, e.g. `throw.patch') in another. > Both files are in the same directory, which is also the current > directory (`default-directory'). > > `M-x epatch' in the buffer of the file to be patched. > > `y' to "Is the patch already in a buffer?" > I entered the name of the buffer of the patch, `throw.patch'. > > I entered the name of the file to patch, `toto.el', to the > question "File to patch (directory, if multifile patch):". > > I got this message: > > Ediff has inferred that > c:/drews-lisp-20/replace.el > is assumed to be the target for this patch. However, this file does not exist. > > Please enter an alternative patch target ... > > No idea what to do now. Why does it "infer" a file named "replace.el", > when I input the name of the file to be patched, which has a totally > different name ("toto.el")? Who said anything about "replace.el"? > > Anyway, I again try to input the (same) name of the file to be patched: > "toto.el". > > I then see this: > > Ediff Session Group Panel: Multifile Patch > > > Type ? to show useful commands in this buffer > > > *** Directory A: # > > > > Size Last modified Name > ---------------------------------------------- > > Session 1: > 112454 Jul 7 2011 08:24:00 c:/drews-lisp-20/toto.el > Session 2: > 112454 Jul 7 2011 08:24:00 c:/drews-lisp-20/toto.el > > > Huh? What does all of that mean? Why does it think I want a > "Multifile Patch"? Why does it (apparently) consider the patch buffer > to be a directory? Why does it list two Sessions? What do I do now? > > I hit `?' for more info...and I understand...nothing more (maybe less). > > I tried the same thing in Emacs 23.3 and 22.3, with the same result. I > tried consulting the Ediff manual for `epatch', but it was no help here. > > What am I missing? I'll admit that I do not know what I'm doing, here, > but at the very least it seems like the UI is confusing and the doc is > not very helpful. > > I have no idea where to begin, and all I'm trying to do is patch a > single file with a single patch. > > OK, so eventually I realized (by accidentally mousing over text) that > I could click one of the two (why two? why identical?) "sessions". > I tried that and it applied the patch - bingo. What to do then was > clear (I'm familiar with ediff). > > Whether or not someone who understands `epatch' will consider any of > this a product bug (e.g. why "replace.el"?), I hope you will think > about it some more from a UI/user (esp. newbie) perspective. > > I suggest that the `epatch' UI, doc, and help are a mess, at least for > an `epatch' newbie such as myself. I hope that someone will improve > this, and I'd appreciate any explanation wrt the behavior I see and the > questions raised above. I still have no clue what all of that is about. > Thx. > > > In GNU Emacs 24.0.50.1 (i386-mingw-nt5.1.2600) > of 2011-06-27 on 3249CTO > Windowing system distributor `Microsoft Corp.', version 5.1.2600 > configured using `configure --with-gcc (4.5) --no-opt --cflags > -Ic:/build/include' I cannot reproduce it using Emacs 24.5 (oldest version i use). I've tried to reproduce your receipt as follows: $ cat /tmp/toto.el 1 2 3 4 5 $ cat /tmp/throw.patch --- toto.el 2017-03-11 17:12:04.854906250 +0900 +++ toto-new.el 2017-03-11 17:12:40.639650683 +0900 @@ -1,2 +1,2 @@ -1 2 3 +1 h 3 4 5 M-: (dired "/tmp") RET M-x epatch RET y throw.patch RET /tmp/toto.el RET ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; In GNU Emacs 24.5.1 (x86_64-pc-linux-gnu, GTK+ Version 3.22.7) of 2017-01-23 on trouble, modified by Debian Windowing system distributor `The X.Org Foundation', version 11.0.11901000 System Description: Debian GNU/Linux 9.0 (stretch)