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: Tue, 13 Jan 2004 17:03:07 -0500
User-agent: Mutt/1.3.28i

On Tue, Jan 13, 2004 at 10:21:17PM +0100, Daniel Pfeiffer wrote:
> > 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
> 
> True, but that holds for diff, not diff-*

What are you talking about?  I made two points, one about the common behavior
of emacs commands that invoke external filters/commands, and one about the
name `diff'; the first point certainly holds for diff-* as well (they are,
after all emacs commands), and I think really the second does as well -- the
presence of the `-*' doesn't really make that much difference unless the `*'
part contains something that indicates the difference.

> > 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.
> 
> Actually that's wrong, because you don't get asked for the buffer so it
> should then be a longish `diff-current-buffer-with-backup-file'.  And not
> even that, because it's the other way round, the file being older.  But
> that's cumbersome to explain (diff this buffer's backup file with this
> buffer).

Don't be silly, the name doesn't have to be a treatise on how the command
works, it just have to give a decent hint.

Anyway, it may very well be that there are _better_ names that those I
suggested, but the point stands that the `...-with-...' names are _worse_.

> > 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?
> 
> `diff-backup' doesn't really mean anything, so I wonder if many people
> would actually notice such a change.

I'm not talking about the correspondence of the name with the functionality,
simply that it's a command that's existed for a long time, so that people are
used to it's current behavior (whether well-named or not).

I use diff-backup very often, but I personally don't ever recall having used
it without having saved the buffer first, in which case it's equivalent to
your new command.  However I can't speak for others.

-Miles
-- 
"1971 pickup truck; will trade for guns"




reply via email to

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