From: Miles Bader <miles@gnu.org>
Cc: "Jan D." <jan.h.d@swipnet.se>, emacs-devel@gnu.org
Subject: Re: EWMH package, please review.
Date: Sun, 12 Oct 2003 18:54:59 -0400 [thread overview]
Message-ID: <20031012225459.GB10593@fencepost> (raw)
In-Reply-To: <m3ekxi5ce8.fsf@kfs-l.imdomain.dk>
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
next prev parent reply other threads:[~2003-10-12 22:54 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-10-12 16:53 EWMH package, please review Jan D.
2003-10-12 22:17 ` Kim F. Storm
2003-10-12 22:54 ` Miles Bader [this message]
2003-10-13 4:34 ` Jan D.
2003-10-13 4:30 ` Jan D.
2003-10-13 7:54 ` David Kastrup
2003-10-13 8:43 ` Thien-Thi Nguyen
2003-10-18 17:47 ` Jan D.
2003-10-18 18:05 ` David Kastrup
2003-10-18 18:15 ` David Kastrup
2003-10-27 5:56 ` Jan D.
2003-10-13 18:21 ` Richard Stallman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20031012225459.GB10593@fencepost \
--to=miles@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=jan.h.d@swipnet.se \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).