From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Miles Bader Newsgroups: gmane.emacs.devel Subject: Re: EWMH package, please review. Date: Sun, 12 Oct 2003 18:54:59 -0400 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <20031012225459.GB10593@fencepost> References: <3F898710.9050109@swipnet.se> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1065999640 7907 80.91.224.253 (12 Oct 2003 23:00:40 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 12 Oct 2003 23:00:40 +0000 (UTC) Cc: "Jan D." , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Mon Oct 13 01:00:37 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 1A8pCX-0003F2-00 for ; Mon, 13 Oct 2003 01:00:37 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1A8pCW-0003JE-00 for ; Mon, 13 Oct 2003 01:00:36 +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 1A8pBw-0008Uf-F5 for emacs-devel@quimby.gnus.org; Sun, 12 Oct 2003 19:00:00 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1A8pAd-0008EA-6a for emacs-devel@gnu.org; Sun, 12 Oct 2003 18:58:39 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1A8pA5-00084V-8z for emacs-devel@gnu.org; Sun, 12 Oct 2003 18:58:36 -0400 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1A8pA4-00084K-QW for emacs-devel@gnu.org; Sun, 12 Oct 2003 18:58:04 -0400 Original-Received: from miles by fencepost.gnu.org with local (Exim 4.24) id 1A8p75-00031J-6X; Sun, 12 Oct 2003 18:54:59 -0400 Original-To: "Kim F. Storm" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.3.28i Blat: Foop 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:17051 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:17051 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. -miles -- Freedom's just another word, for nothing left to lose --Janis Joplin