[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Ibuffer: w and B default to buffer at current line
From: |
Drew Adams |
Subject: |
RE: Ibuffer: w and B default to buffer at current line |
Date: |
Wed, 14 Sep 2016 07:08:56 -0700 (PDT) |
> > I don't like this part of your proposed change. The name of the
> > function is `ibuffer-get-marked-buffers'. Adding a new argument
> > to change the meaning of the function is not a good idea.
>
> If you compare the first patch with `dired-get-marked-files' (d-g-m-f)
> you might change your mind:
> (d-g-m-f) returns a list with the file at point when there are no
> marked files. The first patch follow similar idea.
I was going to say something similar to Tino. The same is true
of Dired commands generally - e.g., all of the `dired-do-*'
commands act on the file/dir of the current line if none are
marked: A, B, C, D, G, H, L, M, O, P, Q, R, S, T, U, X, and Z.
(And a few of them correspond to single-file commands for the
current-line's file/dir: c, d, and u. In Dired+ this is a bit
more the case: e/E, c/C, d/D, f/F, i/I, j/J, u/U, and z/Z)
I have no opinion about the proposal for Ibuffer. But it
sounds like it is applying a longstanding UI approach that
is used in Dired - one that I think is sound and useful.
> > Instead, there should be a new function `ibuffer-get-buffer-at-point'
> > or some such, to reflect the meaning you wish to express.
> > There may even already be such a function, I'm not all that
> > familiar with ibuffer.el.
>
> There is one, ibuffer-current-buffer.
> My point is that patch1 allow me to implement
> 'ibuffer-copy-filename-as-kill' (i-c-f-a-k) very similar as
> 'dired-copy-filename-as-kill' (d-c-f-a-k). That is nice to me.
Again, Dired offers separate commands that apply only to the
file/dir of the current line. They are on menus, for example.
Keys are generally not needed for them, precisely because of
the if-none-marked-then-act-on-this-one behavior.
The point of this design is to let you use the same key to act
on a single file/buffer. In addition, in Dired you can provide
a numeric prefix arg to act on the next (or previous) N files.
N defaults to 1, of course, which provides the this-line's-file
behavior.
(In Emacs there is more than one way to skin the cat...
This is a plus, not a minus.)
- Ibuffer: w and B default to buffer at current line, Tino Calancha, 2016/09/14
- Re: Ibuffer: w and B default to buffer at current line, John Wiegley, 2016/09/14
- Re: Ibuffer: w and B default to buffer at current line, Tino Calancha, 2016/09/14
- RE: Ibuffer: w and B default to buffer at current line,
Drew Adams <=
- Re: Ibuffer: w and B default to buffer at current line, John Wiegley, 2016/09/15
- Re: Ibuffer: w and B default to buffer at current line, Eli Zaretskii, 2016/09/16
- RE: Ibuffer: w and B default to buffer at current line, Drew Adams, 2016/09/16
- Re: Ibuffer: w and B default to buffer at current line, John Wiegley, 2016/09/17
- Re: Ibuffer: w and B default to buffer at current line, Eli Zaretskii, 2016/09/17
- RE: Ibuffer: w and B default to buffer at current line, Drew Adams, 2016/09/17
- Re: Ibuffer: w and B default to buffer at current line, Eli Zaretskii, 2016/09/17
- RE: Ibuffer: w and B default to buffer at current line, Drew Adams, 2016/09/17
- Re: Ibuffer: w and B default to buffer at current line, Eli Zaretskii, 2016/09/18
- naming functions [was: Ibuffer: w and B default to buffer at current line], Drew Adams, 2016/09/18