From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.devel Subject: RE: Ibuffer: w and B default to buffer at current line Date: Wed, 14 Sep 2016 07:08:56 -0700 (PDT) Message-ID: References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1473863154 5634 195.159.176.226 (14 Sep 2016 14:25:54 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 14 Sep 2016 14:25:54 +0000 (UTC) Cc: Emacs developers To: Tino Calancha , jwiegley@gmail.com Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Sep 14 16:25:50 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bkB8E-0000qA-Ei for ged-emacs-devel@m.gmane.org; Wed, 14 Sep 2016 16:25:46 +0200 Original-Received: from localhost ([::1]:56385 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bkB8C-0002sd-JQ for ged-emacs-devel@m.gmane.org; Wed, 14 Sep 2016 10:25:44 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58420) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bkAs7-0007KE-F4 for emacs-devel@gnu.org; Wed, 14 Sep 2016 10:09:11 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bkAs2-0005z3-8d for emacs-devel@gnu.org; Wed, 14 Sep 2016 10:09:06 -0400 Original-Received: from userp1040.oracle.com ([156.151.31.81]:48648) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bkAs1-0005yo-WD for emacs-devel@gnu.org; Wed, 14 Sep 2016 10:09:02 -0400 Original-Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id u8EE8xKp024408 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 14 Sep 2016 14:09:00 GMT Original-Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by aserv0021.oracle.com (8.13.8/8.13.8) with ESMTP id u8EE8wSc003476 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 14 Sep 2016 14:08:59 GMT Original-Received: from abhmp0003.oracle.com (abhmp0003.oracle.com [141.146.116.9]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id u8EE8vks001930; Wed, 14 Sep 2016 14:08:58 GMT In-Reply-To: X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9 (901082) [OL 12.0.6753.5000 (x86)] X-Source-IP: aserv0021.oracle.com [141.146.126.233] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 156.151.31.81 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:207431 Archived-At: > > 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.)