From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Ibuffer: w and B default to buffer at current line Date: Fri, 16 Sep 2016 09:40:44 +0300 Message-ID: <83intw5our.fsf@gnu.org> References: Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1474008100 26389 195.159.176.226 (16 Sep 2016 06:41:40 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 16 Sep 2016 06:41:40 +0000 (UTC) Cc: emacs-devel@gnu.org, tino.calancha@gmail.com To: John Wiegley Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Sep 16 08:41:35 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 1bkmpx-00057S-Lv for ged-emacs-devel@m.gmane.org; Fri, 16 Sep 2016 08:41:25 +0200 Original-Received: from localhost ([::1]:38786 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bkmpv-0005Tz-V6 for ged-emacs-devel@m.gmane.org; Fri, 16 Sep 2016 02:41:23 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47236) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bkmpD-0005SZ-Bq for emacs-devel@gnu.org; Fri, 16 Sep 2016 02:40:40 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bkmp9-0000yg-5D for emacs-devel@gnu.org; Fri, 16 Sep 2016 02:40:38 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:49383) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bkmp9-0000yP-1v; Fri, 16 Sep 2016 02:40:35 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:3575 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1bkmp7-0001jd-5c; Fri, 16 Sep 2016 02:40:33 -0400 In-reply-to: (message from John Wiegley on Thu, 15 Sep 2016 15:05:20 -0700) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e 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:207458 Archived-At: > From: John Wiegley > Date: Thu, 15 Sep 2016 15:05:20 -0700 > Cc: Emacs developers > > > 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 understand dired may also be taking this bad approach, but that's not a good > reason to continue the practice. But it isn't just Dired. Having the marked items default to the current one is a very frequent idiom in Emacs modes that present lists of actionable items. It is also consistent with what GUI file managers out there do. > Functions should do what they say, and not have lots of alternative > functionality baked into them because it's a convenient hack today. There's a clash here between this goal, and the goal of being DWIMish. One way of resolving the contradiction is to have the info in the function's name, and if all else fails, in the doc string.