From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: John Wiegley Newsgroups: gmane.emacs.devel Subject: Re: Ibuffer: w and B default to buffer at current line Date: Sat, 17 Sep 2016 19:18:22 -0700 Message-ID: References: > <83intw5our.fsf@gnu.org>> <3dbc0c03-56f9-4b6f-bd3b-258458967665@default> <83zin630i9.fsf@gnu.org> <4ec39f76-8397-42d4-9422-b75b379dcff5@default> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1474165246 8388 195.159.176.226 (18 Sep 2016 02:20:46 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 18 Sep 2016 02:20:46 +0000 (UTC) User-Agent: Gnus/5.130014 (Ma Gnus v0.14) Emacs/25.1 (darwin) Cc: Eli Zaretskii , tino.calancha@gmail.com, emacs-devel@gnu.org To: Drew Adams Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Sep 18 04:20: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 1blRiU-0008LG-2e for ged-emacs-devel@m.gmane.org; Sun, 18 Sep 2016 04:20:26 +0200 Original-Received: from localhost ([::1]:48309 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1blRiS-0006GV-8X for ged-emacs-devel@m.gmane.org; Sat, 17 Sep 2016 22:20:24 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58114) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1blRhe-0006E9-UM for emacs-devel@gnu.org; Sat, 17 Sep 2016 22:19:36 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1blRhc-00015f-PI for emacs-devel@gnu.org; Sat, 17 Sep 2016 22:19:33 -0400 Original-Received: from mail-pf0-f173.google.com ([209.85.192.173]:34183) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1blRhW-0000v3-2n; Sat, 17 Sep 2016 22:19:26 -0400 Original-Received: by mail-pf0-f173.google.com with SMTP id p64so39141896pfb.1; Sat, 17 Sep 2016 19:19:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:in-reply-to:date:message-id:references :user-agent:mail-followup-to:mime-version; bh=uDCcp67MN7tAbLUX8dKGn4FB8HTc0drnYGNrNY4T64E=; b=vJA5y4gI8DHGRI9riW+kXcpiaFBfmxpRx+glzeV6JLtgMv3yEPTJkugLXbqCcLHsCs m156DmfJsKJGNjMqcRKUN/QzQHcYbc6nVlOMRtE+eJhO0mbj0CcjD2rwScRVl03rejAW QW9eaZWLbXTvzjVZQNU1zgDN0Z8BdzDrGwHqe6u0C1COjkz15qfqfQ926Yy1RC3QqSuU ujMJmfo20qIFwQem+bmggAB/xb2vs4K6L6kHa/RScm/0+hlPblSW+gXVvYZV9LbehgqY 6AJPqCZVthuhANqa0vV9Un7dHwlCTtD0Oei5EquInz0wO8tWvWfCInU/0AKDpOfYpl6B sULQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:in-reply-to:date:message-id :references:user-agent:mail-followup-to:mime-version; bh=uDCcp67MN7tAbLUX8dKGn4FB8HTc0drnYGNrNY4T64E=; b=X2N3kA1hEzDXWq+rTz2s5xO9weNja9tgIpgpIuEQUI2cd8V/GtyB8HlxWMMjuteQdG 9sWPQsjnr0EqP3ZKcBVU83I/r+do4kV805mbN90zINnpLTyEcboq7gU0gYyqoOTOHFqg +3zfeXi8JCwWKI5cUI0d9/+6/SaYQalCcKgK5dmh46XGX/lWxzj7XqdZjftAie1WJ3qo K7cF5Bza/FqgFIsrTzCnR0KwtDW1c4k+5Vs4vY5ALvMIlg8M4iMV6hS7TTEme+x9gf9p wWysESZ92hLHn5D4fPsClg9MQGd0vhK6a4a9g1orflLRl3bLJtjMiI82fJYqvHpbGCWp 1gHw== X-Gm-Message-State: AE9vXwNKSh2a9EiZpicq5jmNt7h30d8QZKQL1sS48THa1BYzvZpppn1QqowLaMvuYSCyXw== X-Received: by 10.98.32.78 with SMTP id g75mr35427312pfg.103.1474165105518; Sat, 17 Sep 2016 19:18:25 -0700 (PDT) Original-Received: from Vulcan.local (76-234-69-149.lightspeed.frokca.sbcglobal.net. [76.234.69.149]) by smtp.gmail.com with ESMTPSA id d26sm52025628pfe.37.2016.09.17.19.18.24 (version=TLS1 cipher=AES128-SHA bits=128/128); Sat, 17 Sep 2016 19:18:24 -0700 (PDT) X-Google-Original-From: "John Wiegley" Original-Received: by Vulcan.local (Postfix, from userid 501) id CA10625E0B3C; Sat, 17 Sep 2016 19:18:23 -0700 (PDT) In-Reply-To: (Drew Adams's message of "Sat, 17 Sep 2016 18:45:20 -0700 (PDT)") Mail-Followup-To: Drew Adams , Eli Zaretskii , emacs-devel@gnu.org, tino.calancha@gmail.com X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.85.192.173 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:207521 Archived-At: >>>>> Drew Adams writes: > Trying to find out what you are really saying, and how it might apply to > Emacs development. You have a strong belief that each function should do one > thing and one thing well. It would be helpful, if that is to be a guideline > or if we can learn from it, to flesh out what you mean by it. > My guess is that what you prefer here is probably something I would prefer > too, but I'm not sure. The devil, as well as interesting guidelines, are > likely in the details. I had expected (naively?) that everyone would want this, since the intent is to make code easier to learn and to maintain. It's natural to assume that a function called "string-append" just appends strings, for example. It would be quite surprising if it had a special behavior when the arguments are both numbers. I know that some languages applaud this sort of hidden behavior, but I find it confusing. But maybe you're right, and I should just wait until there are other, more specific contexts for me to champion this idea. The basic philosophy behind "do one thing, do it well" is that a function named `plus' should just add numbers; and a function called `save-file' should just save files. If a function were named "dwim-at-point", then it could do whatever it thinks is appropriate at point. Since we don't have types in Emacs Lisp to enforce function semantics, we rely on naming and documentation to figure out what things mean. I find myself surprised that a function advertising itself as acting on "marked-files", under some circumstances acts on unmarked files... I mean nothing beyond this, but this can wait until it becomes clearer over time. Thank you for your patience, and your interest. -- John Wiegley GPG fingerprint = 4710 CF98 AF9B 327B B80F http://newartisans.com 60E1 46C4 BD1A 7AC1 4BA2