emacs-pretest-bug
[Top][All Lists]
Advanced

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

Re: diff adapted for new M-x compile


From: Miles Bader
Subject: Re: diff adapted for new M-x compile
Date: Mon, 12 Jan 2004 19:01:34 -0500
User-agent: Mutt/1.3.28i

On Mon, Jan 12, 2004 at 09:13:33PM +0100, Daniel Pfeiffer wrote:
> Then the already existing diff-backup (which diffs a file with that file's
> backup) must be even more confusing :-)

The existing diff commmands are like the diff program, in that they work on
files, not buffers.  I think this is natural enough -- almost every emacs
command that invokes an external command makes the same assumption -- and in
any case people are used to the old names, (I certainly am).

However if to the existing `diff-backup', you add `diff-with-backup-file',
what's the user supposed to think?  The new command doesn't follow the usual
convention, but there's no way the user can tell this from the command name,
other than the rather cryptic convention you seem to have followed that
`-with'- in the a function's name means it uses the buffer's contents, not
the associated file.

Adding an indicator of _how_ the command differs from the usual convention:
`diff-buffer-with-backup-file' gives the user a much better chance at seeing
what's going on.

I personally think that the buffer-with-file definition would actually be
better for `diff-backup' than the old definition (for obvious reasons), but I
don't know if replacing it would be wise or not.  I wonder how often people
run that command intentionally without saving the buffer first?

-miles
-- 
`...the Soviet Union was sliding in to an economic collapse so comprehensive
 that in the end its factories produced not goods but bads: finished products
 less valuable than the raw materials they were made from.'  [The Economist]




reply via email to

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