From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stephen Berman Newsgroups: gmane.emacs.devel Subject: Re: split-window as a command Date: Sat, 13 Apr 2013 01:31:19 +0200 Message-ID: <877gk7fhrs.fsf@rosalinde.fritz.box> References: <87ppy0p4cm.fsf@rosalinde.fritz.box> <5167D3E8.8000903@gmx.at> <87obdkf097.fsf@rosalinde.fritz.box> <51681696.7000405@gmx.at> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1365809495 27338 80.91.229.3 (12 Apr 2013 23:31:35 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 12 Apr 2013 23:31:35 +0000 (UTC) Cc: emacs-devel@gnu.org To: Rand Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Apr 13 01:31:39 2013 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UQnRO-0001yg-Hb for ged-emacs-devel@m.gmane.org; Sat, 13 Apr 2013 01:31:34 +0200 Original-Received: from localhost ([::1]:41264 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UQnRO-0001w6-5P for ged-emacs-devel@m.gmane.org; Fri, 12 Apr 2013 19:31:34 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:59463) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UQnRJ-0001w0-DS for emacs-devel@gnu.org; Fri, 12 Apr 2013 19:31:31 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UQnRG-0003TL-Jg for emacs-devel@gnu.org; Fri, 12 Apr 2013 19:31:29 -0400 Original-Received: from mout.gmx.net ([212.227.17.22]:61335) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UQnRG-0003Ss-9F for emacs-devel@gnu.org; Fri, 12 Apr 2013 19:31:26 -0400 Original-Received: from mailout-de.gmx.net ([10.1.76.30]) by mrigmx.server.lan (mrigmx001) with ESMTP (Nemesis) id 0MQKg6-1TzOfA0ar6-00Thkm for ; Sat, 13 Apr 2013 01:31:24 +0200 Original-Received: (qmail invoked by alias); 12 Apr 2013 23:31:23 -0000 Original-Received: from i59F57871.versanet.de (EHLO rosalinde.fritz.box) [89.245.120.113] by mail.gmx.net (mp030) with SMTP; 13 Apr 2013 01:31:23 +0200 X-Authenticated: #20778731 X-Provags-ID: V01U2FsdGVkX18qwA005p0qYPv8E8OH8W8A/7IZ+jAH2NvljsrbZj iv3mb/9pt2fObh In-Reply-To: (Rand's message of "Fri, 12 Apr 2013 19:44:31 +0000 (UTC)") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-Y-GMX-Trusted: 0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 212.227.17.22 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:158865 Archived-At: On Fri, 12 Apr 2013 19:44:31 +0000 (UTC) Rand wrote: > Stephen Berman gmx.net> writes: > >> The doc string of split-window says "Interactively, SIZE is the prefix >> argument." But in fact, invoking split-window with a prefix argument >> has no effect, because its interactive spec is "i". Maybe this is just >> a doc bug, since, when split-window was still a C function, its doc >> string said "Interactively, all arguments are nil." But I don't see why >> it is a command at all any more: invoked interactively, it has exactly >> the same effect as invoking split-window-below without a prefix >> argument, and since the latter does not ignore a prefix argument passed >> to it, it does more than interactively called split-window. So it >> appears to be superfluous for split-window to be a command. Or am I >> overlooking something? > > It may be superfluous but it has always been a command and > removing the interactive form would break existing keybindings > and usage. Maybe in the early days there was no split-window-vertically and split-window was the only window-splitting command (I don't know). But at least since 18.59 (probably earlier) split-window has been redundant as a command (and not documented in the Emacs manual), and has not had a default key binding. So any breakage would be in user settings or third-party packages. And the fix would simply be to add "-below" to such occurrences of "split-window", which doesn't seem like much of a hardship. As for usage, since split-window never acted on a prefix argument, replacing it with split-window-below interactively instead can only be a win. > I think that: > > * Fixing the doc-string would be better than removing the > interactive form. That would perpetuate its mistaken current status as a command. > * Changing the interactive form to use the prefix argument would > be better than fixing the doc-string. That would mean adding code from split-window-below to process the prefix argument, though split-window-below itself calls split-window. That doesn't seem very clean. It would be nice if there were a make-obsolete-command function, so invoking split-window would warn: "This function is obsolete as a command since 24.4; use `split-window-below' instead. Steve Berman