[Top][All Lists]

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

Re: Ibuffer: w and B default to buffer at current line

From: John Wiegley
Subject: Re: Ibuffer: w and B default to buffer at current line
Date: Sun, 18 Sep 2016 12:35:06 -0700
User-agent: Gnus/5.130014 (Ma Gnus v0.14) Emacs/25.1 (darwin)

>>>>> Eli Zaretskii <address@hidden> writes:

> In Emacs, every command is a function, so eventually, we would need to have
> a single function which could do both, right? Therefore, the only issue here
> is whether that function should be called count-lines or something else,
> right?

OK, I hear you now, Eli, thanks for clarifying. You are perfectly right, every
command is also a function. In the example of counting lines and characters,
my preference would have been for there to be three functions:


Where the third is the DWIM-y interactive command. This keeps the behavior of
count-lines and count-characters very clear, while the behavior of `count' is
not very clear and justifiably needs looking up in the manual to be sure what
it does.

Now, I'm not saying every package HAS to be architected this way. What I
dislike is something fairly specific: "shoe-horning" in the ability to count
characters into count-lines, simply because that's easier to do than turning
one function into three. That makes count-lines a lot more complicated, for
what seems to me to be no good reason at all.

I *think* that your point about "every command is also a function" is just a
bit orthogonal to whether we should be multiplying the semantics of our
functions -- be they commands or not. Clearly "string-append" should not start
logging to disk, or "current-time" suddenly gain the ability to compute the
volumes of spheres based on special arguments.

If your point is that this is vague, and can only be decided on a case-by-case
basis, then yes, you've convinced me of that. I'll speak up whenever I see it
happen, and we can discuss again in the context of particular issues.

For the patch at hand, if no one else has a problem with mirroring the
structure of dired in ibuffer, I'll go with the majority opinion. I guess
sometimes it can even be easier to maintain the same structure in two places,
than to have the architectures diverge because of differing principles.

John Wiegley                  GPG fingerprint = 4710 CF98 AF9B 327B B80F
http://newartisans.com                          60E1 46C4 BD1A 7AC1 4BA2

Attachment: signature.asc
Description: PGP signature

reply via email to

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