emacs-devel
[Top][All Lists]
Advanced

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

RE: Add some aliases for re-related functions


From: Drew Adams
Subject: RE: Add some aliases for re-related functions
Date: Mon, 4 May 2020 10:10:28 -0700 (PDT)

> > > You make it sound like because naming is hard
> > > bad names are ok
> >
> > How did I make it sound like that to you?
>
> By systematically showing examples where it's
> impossible and always rejecting proposals.
> Also your tone while your say this kinda imply
> this is a futile endeavor. Maybe it's just me
> misintepretating tho.

I'm not in any position to reject anything.
Eli is the maintainer.

I may have disagreed with this or that.
Just one opinion.  Agreement and disagreement,
with accompanying arguments, are normal.

> > If you look at the particular half-kidding examples
> > I showed, you might see that they're not screwball.
> > Nearly all of them are perfectly reasonable.  And
> > that's the point of showing them.
> >
> > With a command such as `flush-lines', if we want to
> > prefix the name, just what is a good prefix?
> >
> > Is the command mostly about lines (the type of data
> > acted on), so perhaps use prefix `lines-'?
> >
> > Is it mostly about regexp-matching/searching, so
> > perhaps use prefix `re-'?
> >
> > Is it mostly about deleting text, so perhaps use
> > prefix `delete-' (as in one of its aliases)?
>
> First of all let's agree that nobody here proposed
> to rename flush-lines.

Fine.

> Anyway, if we had to do it I think all your categories
> are weak IMHO, sure it touches the concept of lines,
> regexp and deleting

I was trying to imagine renamings based on the things
involved, which I thought was what is behind, say,
renaming functions that are, as you said,
"string-related APIs", to have prefix `string-' (and
similarly for regexp-related APIs).

> but fundamentally it's about modifying buffers.

It's about modifying buffer content (only - nothing
else about buffers).  OK.

> If I had to name it it'd be:
>
> keep-lines -> buffer-keep-lines
> flush-lines -> buffer-flush-lines

OK.  So for you the most relevant thing involved
is the buffer.  Can you imagine that some might
think something else is more relevant/helpful?

That's the point (one of the points): which word
to use as prefix - what's the main point/effect
of the function?  What term will users want to
look for first or type first?  (And other
considerations.)

> With more finesse I could argue for
> `buffer-modif-select` and `buffer-modif-reject`
> but I'd probably lose you ;-)

Don't worry about losing me.  I'm not important.
Just try imagining that what's "obvious" to you
might be open to different judgments.  And naming
is very much a judgment call - a balancing act.



reply via email to

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