[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#19591: 24.4; file & buffer compare failures

From: Eli Zaretskii
Subject: bug#19591: 24.4; file & buffer compare failures
Date: Wed, 14 Jan 2015 21:53:23 +0200

[Please keep the bug address on the CC list.]

> Date: Wed, 14 Jan 2015 11:40:16 -0800
> From: Glenn Linderman <address@hidden>
> I didn't expect a fix for diff from the emacs team, but I do know that the
> excellent file comparison is one huge reason that people use emacs... I know
> people that use vi for most editing, but fire up emacs for file comparison...
> probably works on Unix even with funny names...

Most Unix systems use UTF-8 to encode file names, which is why Diff
doesn't have a problem on such systems.

> I was sort of thinking, though, that the case of buffer comparison is a case
> where emacs is creating the files to do the diff, and that it creates temp
> files with names derived from the buffer name, which is, I suppose somewhat
> mnemonic when looking at the error message, but temporary file names such as
> "compare-buffer-1.txt" and "compare-buffer-2.txt" would be just as useful. And
> the file has to be written before the compare can be done in that case anyway.

If you are talking about comparing buffers, not files, then yes,
perhaps Emacs can do something about the issue, if it exists.  But
please provide a reproducible recipe, starting from "emacs -Q", that
shows the problem.

> Of course, the other approach, since diff is invoked with very specific 
> options
> by buffer/file compare, would be to reimplement that aspect of diff 
> internally,
> which would actually be an optimization (not needed to write the files, call
> the external program, and read its results) that would also sidestep the need
> for file names at all.

Emacs tries not to reinvent the wheels that already exist.

> It does seem, though, that the correct file names are being passed to the
> external programs, at least, the error message seen in emacs has the correct
> file name... it is just that diff isn't smart enough to use the right API to
> open it. Or else the incorrect name being passed isn't being included in the
> error message.

I think just the error message, being generated inside Emacs, shows
the correct file names, what Diff gets are file names butchered by
conversion to the ANSI codepage.  Once again, if you show the command
you issued and the error message you've got in response, we could look
into that and tell what really happens in your case.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]