unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Tino Calancha <tino.calancha@gmail.com>
To: "Drew Adams" <drew.adams@oracle.com>
Cc: 9021@debbugs.gnu.org, tino.calancha@gmail.com
Subject: bug#9021: 24.0.50; epatch - weird, confusing, huh?
Date: Sat, 11 Mar 2017 17:26:10 +0900	[thread overview]
Message-ID: <87poho9q3h.fsf@calancha-pc> (raw)
In-Reply-To: <595CCA6337AB479CBDA1D5ED43EF45C1@us.oracle.com> (Drew Adams's message of "Thu, 7 Jul 2011 09:15:49 -0700")

"Drew Adams" <drew.adams@oracle.com> 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: #<buffer throw.patch>
>  
>  
>  
>         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)






  reply	other threads:[~2017-03-11  8:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-07 16:15 bug#9021: 24.0.50; epatch - weird, confusing, huh? Drew Adams
2017-03-11  8:26 ` Tino Calancha [this message]
2019-06-27 16:30   ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87poho9q3h.fsf@calancha-pc \
    --to=tino.calancha@gmail.com \
    --cc=9021@debbugs.gnu.org \
    --cc=drew.adams@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).