From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Jan D." Newsgroups: gmane.emacs.devel Subject: Re: EWMH package, please review. Date: Mon, 13 Oct 2003 06:34:16 +0200 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <80CD5F13-FD36-11D7-8B0B-00039363E640@swipnet.se> References: <20031012225459.GB10593@fencepost> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 (Apple Message framework v552) Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1066019847 974 80.91.224.253 (13 Oct 2003 04:37:27 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 13 Oct 2003 04:37:27 +0000 (UTC) Cc: emacs-devel@gnu.org, "Kim F. Storm" Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Mon Oct 13 06:37:25 2003 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1A8uST-0003vU-00 for ; Mon, 13 Oct 2003 06:37:25 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1A8uSS-0004N6-00 for ; Mon, 13 Oct 2003 06:37:24 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1A8uQd-0002QG-R3 for emacs-devel@quimby.gnus.org; Mon, 13 Oct 2003 00:35:31 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1A8uQQ-0002Pn-Qi for emacs-devel@gnu.org; Mon, 13 Oct 2003 00:35:18 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1A8uPu-0002Jy-To for emacs-devel@gnu.org; Mon, 13 Oct 2003 00:35:17 -0400 Original-Received: from [193.201.16.94] (helo=stubby.bodenonline.com) by monty-python.gnu.org with esmtp (Exim 4.24) id 1A8uPu-0002JP-Dq; Mon, 13 Oct 2003 00:34:46 -0400 Original-Received: from accessno42.bodenonline.com (accessno42.bodenonline.com [193.201.16.44]) by stubby.bodenonline.com (8.12.1/8.12.1) with ESMTP id h9D5Iamh014718; Mon, 13 Oct 2003 07:18:36 +0200 Original-To: Miles Bader In-Reply-To: <20031012225459.GB10593@fencepost> X-Mailer: Apple Mail (2.552) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:17055 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:17055 > On Mon, Oct 13, 2003 at 12:17:35AM +0200, Kim F. Storm wrote: >> Maybe in general, the functions should be named >> >> x-ewmh-toggle-... >> >> to emphasize that their default operation is to toggle the hint. > > If they _only_ toggle, they could be called `...toggle...', but it > seems > wrong to call them that if they just usually toggle. > > In general the set and naming of functions seems kind of clumsy; how > about > having just a single `x-ewmh-maximize' that can do both horizontal and > vertical maximization based on an optional argument? Interactively, > I'd > like something like: > > just `M-x x-ewmh-maximize' toggles (full screen) maximization > C-u `M-x x-ewmh-maximize' toggles vertical maximization > C-u C-u `M-x x-ewmh-maximize' toggles horizontal maximization > C-u -1 `M-x x-ewmh-maximize' un-maximizes > C-u 1 `M-x x-ewmh-maximize' (full screen) maximizes > > [Of course normally you'd bind it to a key. I chose vertical > maximization > for the single-C-u because I find myself doing that _far_ more often > than > horizontal maximization.] > > Implementation-wise, this would probably be something like: > > (defun x-emwh-maximize (arg &optional axis frame) > "... ARG nil, toggle, ARG < 0, un-maximize, ARG > 0, maximize ... > If AXIS is `horizontal', maximiaze horizontally, if `vertical', > maximiaze vertically, otherwise, both. ..." > (interactive > (cond ((equal current-prefix-arg '(4)) '(nil vertical)) > ((equal current-prefix-arg '(16)) '(nil horizontal)) > (t (list (prefix-numeric-value current-prefix-arg))))) > ...) > > That seems simpler and more convenient for both users and for programs. The problem is that fullscreen, vertical and horizontal are three different hints. So the un-maximiez must know which of the three that has been done. It is possible to do horizontal and vertical and fullscreen all at once. So which should be removed? I guess you could remove them all unconditionally, but then you can not go from max horizontal and vertical to just max vertical. Or am I missing something? Thanks for the comment. Jan D.