From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stuart Hacking Newsgroups: gmane.emacs.devel Subject: Re: Bikeshedding go! Why is unbound? Date: Wed, 19 Jan 2011 10:08:09 +0000 Message-ID: References: <4D355F3A.4040709@gmx.de> <871v4abc80.fsf@wanadoo.es> <4D359279.4090804@gmx.de> <87wrm29wb0.fsf@wanadoo.es> <9867180AEEC544C99CA9B0C398DF931F@us.oracle.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1295431734 21944 80.91.229.12 (19 Jan 2011 10:08:54 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 19 Jan 2011 10:08:54 +0000 (UTC) Cc: =?UTF-8?Q?=C3=93scar_Fuentes?= , grischka , emacs-devel@gnu.org To: Drew Adams Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jan 19 11:08:50 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PfUy8-00089x-RW for ged-emacs-devel@m.gmane.org; Wed, 19 Jan 2011 11:08:49 +0100 Original-Received: from localhost ([127.0.0.1]:55248 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PfUy8-0004JY-5G for ged-emacs-devel@m.gmane.org; Wed, 19 Jan 2011 05:08:48 -0500 Original-Received: from [140.186.70.92] (port=57574 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PfUxu-0004Ho-SP for emacs-devel@gnu.org; Wed, 19 Jan 2011 05:08:35 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PfUxs-00080B-Qd for emacs-devel@gnu.org; Wed, 19 Jan 2011 05:08:34 -0500 Original-Received: from mail-pv0-f169.google.com ([74.125.83.169]:50881) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PfUxs-0007zj-Er for emacs-devel@gnu.org; Wed, 19 Jan 2011 05:08:32 -0500 Original-Received: by pvc30 with SMTP id 30so161996pvc.0 for ; Wed, 19 Jan 2011 02:08:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type:content-transfer-encoding; bh=WHSGb1K2wuBpOz/CWTzmzmJGITj3AS4iTp3zHoETci0=; b=bFp6W6CwCj0lLm1CFZfoGXu+XN53D2I1Cnej9JXRqwYb6SqNzexM8svvDkJrEC58oS dcxbF+Fd1W6aUJKtqE0+s3nod/ocSiSYc6AUE1rl42pUkDmcvDLYOzK32yppYP+jC3Ic datpX3lUGEMRbYvMRXyIThmd+Yin9cfGDUB4M= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; b=G2whHH2SitEljF17KC06ohoMOj1sGNRWzKdRxH2LxS7gBXfpYeSAdMkyHCk6fcnJyf 9L7ReHp6fskd58N9bv9bi+ZGWNcJc5CdNP4A8ycTJVNzQ3nQrJXmumxKohPVY5sycoIN UqEaKjpmu190PvGmcWaF86vh1SKfRirxFx9tI= Original-Received: by 10.142.11.8 with SMTP id 8mr434621wfk.155.1295431710753; Wed, 19 Jan 2011 02:08:30 -0800 (PST) Original-Received: by 10.142.54.18 with HTTP; Wed, 19 Jan 2011 02:08:09 -0800 (PST) In-Reply-To: <9867180AEEC544C99CA9B0C398DF931F@us.oracle.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:134729 Archived-At: 2011/1/18 Drew Adams : >> >>> =C2=A0 =C2=A0 (global-set-key [M-f4] 'w32-syskey) > > This is what I suggested - it's the Emacs way of defining keys. ;-) > But since no one had discussed it here in terms of implementation I guess= ed it > was not feasible as an approach. The problem I see with this approach is that Emacs chooses the binding. If a user has gone to the effort of changing the windows bindings (however small this percentage of users is) then Emacs will no longer play nice in their expectations. Although, if a user, say, makes [Alt-x] the command to exit an application I guess Emacs will stick with it's own behaviour. If I follow the main discussion correctly, what Emacs should be doing is: 1) Got a keystroke. 2) Is this keystroke bound, or explicitly unbound? 3a) Yes: Do bound action 3b) No: Delegate to system key handler (however that may be implemented). AFAICS Doing this way means that we tap into a lot of the window manager behaviour for free without having to manually define the keystrokes. >> >> If we go that route why not just bind M-f4 to a function >> >> that closes the current frame, as suggested at the beginning >> >> of this thread? >> > Because you want to support menu accelerators [Alt-] ? > > I assume that `w32-syskey' here is a placeholder for pass-through to Wind= ows. > Which means that Windows does what it wants with M-f4 (Alt-f4 might be be= tter > here? dunno). This still makes the assumption that the user is using the default keybindings. If they have changed them in their environment then Emacs' behaviour will be surprising? > Yes, that is a good thing. =C2=A0We should pass M-f4 through only if the = key sequence > is M-f4, not if it is C-h k M-f4 or C-x M-f4 etc. The behaviour in Windows would normally be that [Alt-F4] interrupts whatever operation is in progress and exits. Is it feasible to have a sequence that interrupts the current command input like [C-g] and what if we don't know what this key is in advance? --Stuart