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 14:35:57 -0700 Message-ID: References: > <83intw5our.fsf@gnu.org>> <3dbc0c03-56f9-4b6f-bd3b-258458967665@default> <83zin630i9.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Trace: blaine.gmane.org 1474148774 1911 195.159.176.226 (17 Sep 2016 21:46:14 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 17 Sep 2016 21:46:14 +0000 (UTC) User-Agent: Gnus/5.130014 (Ma Gnus v0.14) Emacs/25.1 (darwin) Cc: tino.calancha@gmail.com, drew.adams@oracle.com, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Sep 17 23:46:10 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 1blNQu-0006xv-6Q for ged-emacs-devel@m.gmane.org; Sat, 17 Sep 2016 23:46:00 +0200 Original-Received: from localhost ([::1]:47630 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1blNQv-0008Jg-CU for ged-emacs-devel@m.gmane.org; Sat, 17 Sep 2016 17:46:01 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60921) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1blNIP-00022c-5i for emacs-devel@gnu.org; Sat, 17 Sep 2016 17:37:14 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1blNIM-0003jT-Uo for emacs-devel@gnu.org; Sat, 17 Sep 2016 17:37:12 -0400 Original-Received: from mail-pf0-f170.google.com ([209.85.192.170]:34132) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1blNIH-0003cu-1v; Sat, 17 Sep 2016 17:37:05 -0400 Original-Received: by mail-pf0-f170.google.com with SMTP id p64so38022722pfb.1; Sat, 17 Sep 2016 14:37:04 -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=ASewUu5lQhcWpgLe0Jg3pcf6N4/adOuUnYsyfk+SfOY=; b=nXMNfyhuMNRsgkPsh1IBDdyN5CovPnXpRjdK+XfbAVgibrIbaVmY5YKseZaUPAgIkN YScWRkng9eKdvGjvO0pHj6gDFosYmATn4pN8+ZkRL4rjJkdcwLXnMHEA4LcVZbl32WJj pbCjLhCcna2V/nOiICFGrJgrI/mzbNzjl3S1xjM0DaR3JkyLA55TCOjM3rVsDZSOrvqH 8F0otqtPJctT3BT4ElR60QOWxRJ/s49YOXUC9v1ZxyzKLyW6XvHqJcLhHXYX2lQDUY94 DOKLCHt5Mk6THSD6C6eNUQ4yIwkVyy1w3b/WRV3cbIj2TYLmZnsHjxGnOfQWzjUBGlsH drXA== 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=ASewUu5lQhcWpgLe0Jg3pcf6N4/adOuUnYsyfk+SfOY=; b=iw7Yk5zBhDfW/5Nv89Mf/88tfoeo3JEqlMMhqZY0LPgtHIWuwvyTooPavoFST09mVg OzlnlwlQpsuq9gyJpQpAeRNhSUISaQhBQ8DUlymFZBokaxUHJG1QlB/zevxgwpuN3Wfp rRr/2iPm3Ls4Z5gRIZiopEE8w0qjYIZQ36V4N2kW0CgBo3B/AsV70a8VaeHy8TUsQJHB NaiFso+DRBdzpxbCUI1WALhUx7GJvpV/IOO3Qp/qPPTUzrcN7EBjrNFQ8cbK1baQfXX6 V49pSY/v0EfJqA06FcdLsGAngUkpmU/xJYq+gzzip+RHm6QA4Ejn4cpQmK/GBLkJktMV smUA== X-Gm-Message-State: AE9vXwMPWnrVaFfXqHHTQ5Ob1qMZSw/hns25+iGYnNp9R+G4ml/Ig4V1dI8RB421BtG4rg== X-Received: by 10.98.192.21 with SMTP id x21mr20135099pff.175.1474148164448; Sat, 17 Sep 2016 14:36:04 -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 m24sm61018300pfi.34.2016.09.17.14.36.02 (version=TLS1 cipher=AES128-SHA bits=128/128); Sat, 17 Sep 2016 14:36:02 -0700 (PDT) X-Google-Original-From: "John Wiegley" Original-Received: by Vulcan.local (Postfix, from userid 501) id 91B3E25CB90B; Sat, 17 Sep 2016 14:36:01 -0700 (PDT) In-Reply-To: <83zin630i9.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 17 Sep 2016 20:21:50 +0300") Mail-Followup-To: Eli Zaretskii , drew.adams@oracle.com, 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.170 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:207514 Archived-At: --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable >>>>> Eli Zaretskii writes: >> When it comes to UI, I'm in complete agreement with Eli: I love DWIM >> behavior, and think this is a virtue of Emacs, not a vice in any way. > If DWIM is okay in the UI, then functions that behave in support of that = UI > should also be okay. Since this responses surprised me a bit, I'm going to assume that I've misunderstood somehow. Let me give a hypothetical example: Assume for the sake of argument that `count-lines' did not report characters as well, and that someone wished to extend the `count-lines' command so that, given a prefix arg, it would count characters instead of lines. What I think should happen in this case is that a new command be created: count-items-in-region, which by default counts lines, but with a prefix argument counts characters. This leaves that command open to many new behaviors in future, while `count-lines' keeps doing just what it says: cou= nt lines. What I would object to is adding a new argument to `count-lines', called `characters-p', that changes the behavior of count-lines to now count characters instead (again, remember this is hypothetical, I know that today= 's `count-lines' already counts characters as well). Just because I want DWIM from my interface, doesn't mean I need to implement it as DWIM in my functions. I believe -- very strongly -- that each function should do one thing and one thing well, and this one thing should be documented well. I don't like magical functions with lots of alternative behaviors, unless it is a command created for the purpose of magically dispatching to other functions based on its context of use. Such magical interface functions are quite alright in my book; but complexifying the behavior of core functions is not. =2D-=20 John Wiegley GPG fingerprint =3D 4710 CF98 AF9B 327B B80F http://newartisans.com 60E1 46C4 BD1A 7AC1 4BA2 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGcBAEBCgAGBQJX3bc9AAoJEMFE2PTxn+YwQCcL/37eOzN8P1nYhh6gM+ygynbA 19wz2xcKycKqN0p2m4Un0Z/qQ21VgJEQ/MbalToZIi+dqMlHiK0vTWcEw2i8TGMY yuiBRgeCfCx/KWPI20pFAUmF4JOPzOcj9lujxkIDBcmeLZ8iYhr91jxOt/3rLWZo urc4cO0le7Nb8cNr6yH4Qr6GwnNEMXgWM2fwdeZHg7AX61m966gcjUHnn9fBHt1+ 3GBtB5n+fOg2wnqASzjeKY8aLhptjBeN4nV8HdWpJvGA5pUbp9sug79a7z8379qI edB5wUlV2nsK9eZuycZaj9E2VsqcTbQ6IwWfbbDjeKUAtIq0NPXWxnGFfBxwE25J APhUVQgKzY1C8wOvQ3iNuoR5aRVlNtUKKQ/KApXWaHBsvKyw4TfJxD3efXHZRUQp wXMMO+hgDMdjIzXsuL1i1gLl9/QEGHXFMyw7SC+FpWljZILwqM2Hy8NkcmsbsEwG gHZRNAjcFFOGGxGIjDHc20RQkeyyBEeaCmC372d34Q== =Ay/X -----END PGP SIGNATURE----- --=-=-=--