From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ivan Andrus Newsgroups: gmane.emacs.bugs Subject: bug#3792: #3792 - 23.1.50; other-window misbehaving with C-tab keybinding - Emacs bug report logs Date: Fri, 10 Jul 2009 09:13:55 -0600 Message-ID: Reply-To: Ivan Andrus , 3792@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="_004_C67CB6D58F92Eiandrusomniturecom_" X-Trace: ger.gmane.org 1247291087 22070 80.91.229.12 (11 Jul 2009 05:44:47 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 11 Jul 2009 05:44:47 +0000 (UTC) To: "3792@emacsbugs.donarmstrong.com" <3792@emacsbugs.donarmstrong.com> Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jul 11 07:44:40 2009 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MPVO2-0000Lq-Us for geb-bug-gnu-emacs@m.gmane.org; Sat, 11 Jul 2009 07:44:39 +0200 Original-Received: from localhost ([127.0.0.1]:50274 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MPVO2-00011h-CL for geb-bug-gnu-emacs@m.gmane.org; Sat, 11 Jul 2009 01:44:38 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MPIAJ-00021e-Mf for bug-gnu-emacs@gnu.org; Fri, 10 Jul 2009 11:37:35 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MPIAE-0001xJ-HQ for bug-gnu-emacs@gnu.org; Fri, 10 Jul 2009 11:37:34 -0400 Original-Received: from [199.232.76.173] (port=38098 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MPIAE-0001x8-55 for bug-gnu-emacs@gnu.org; Fri, 10 Jul 2009 11:37:30 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:34888) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MPIAD-0001oY-Hz for bug-gnu-emacs@gnu.org; Fri, 10 Jul 2009 11:37:29 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n6AFbR0t004225; Fri, 10 Jul 2009 08:37:27 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.14.3/8.14.3/Submit) id n6AFK502001151; Fri, 10 Jul 2009 08:20:05 -0700 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: Ivan Andrus Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Fri, 10 Jul 2009 15:20:05 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: followup 3792 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 3792-submit@emacsbugs.donarmstrong.com id=B3792.124723885232678 (code B ref 3792); Fri, 10 Jul 2009 15:20:05 +0000 Original-Received: (at 3792) by emacsbugs.donarmstrong.com; 10 Jul 2009 15:14:12 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from exHub01.orm.omniture.com (exHub01.orm.omniture.com [64.0.193.252]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n6AFE4dd032650 for <3792@emacsbugs.donarmstrong.com>; Fri, 10 Jul 2009 08:14:05 -0700 Original-Received: from Exchange1.orm.omniture.com ([fe80::557e:8a15:8eb3:a5cd]) by exhub01 ([10.10.0.212]) with mapi; Fri, 10 Jul 2009 09:14:22 -0600 Thread-Topic: #3792 - 23.1.50; other-window misbehaving with C-tab keybinding - Emacs bug report logs Thread-Index: AcoBcQpYhEiDCHzcFkmU8QLaRK0m2Q== Accept-Language: en-US Content-Language: en X-MS-Has-Attach: yes X-MS-TNEF-Correlator: acceptlanguage: en-US X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Resent-Date: Fri, 10 Jul 2009 11:37:34 -0400 X-Mailman-Approved-At: Sat, 11 Jul 2009 01:43:46 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:29312 Archived-At: --_004_C67CB6D58F92Eiandrusomniturecom_ Content-Type: multipart/alternative; boundary="_000_C67CB6D58F92Eiandrusomniturecom_" --_000_C67CB6D58F92Eiandrusomniturecom_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable I noticed that view-lossage shows two for every time I press it. I= n nsterm.m it specifically checks for control-tab and references http://osdir.com/ml/editors.vim.mac/2007-10/msg00141.html Which in turn references https://bugzilla.mozilla.org/show_bug.cgi?id=3D374076#c12 Which makes me think that in Mac OS 10.4 the control-tab keyDown event isn'= t sent, but in 10.5 it is. Or at the very least in the latest version of 1= 0.5 (I'm running 10.5.7) it sends a keyDown event. I have implemented what I think is a very simple fix (though it is probably= not ideal). It sets a flag if it recieves a C-tag keyDown, and if so does= not send the corresponging keyUp. I like this because then it works on ke= yDown like everything else if possible, but if not it should work on keyUp.= I don't have the facilities to test the latter assumption. Also the patch almost certainly is less efficient than it could be. For ex= ample it sets flags and code twice (I believe) to the same thing, but I'm n= ot really familiar enough with the code to want to risk changing that (and = it's only for the Cocoa port as well). I believe it should be correct at l= east. -Ivan Andrus --_000_C67CB6D58F92Eiandrusomniturecom_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable #3792 - 23.1.50; other-window misbehaving with C-tab keybinding - Em= acs bug report logs I noticed that view-lossage shows two <C-tab> for every time I = press it.  In nsterm.m it specifically checks for control-tab and refe= rences
http:= //osdir.com/ml/editors.vim.mac/2007-10/msg00141.html
Which in turn references
https= ://bugzilla.mozilla.org/show_bug.cgi?id=3D374076#c12

Which makes me think that in Mac OS 10.4 the control-tab keyDown event isn&= #8217;t sent, but in 10.5 it is.  Or at the very least in the latest v= ersion of 10.5 (I’m running 10.5.7) it sends a keyDown event.  <= BR>
I have implemented what I think is a very simple fix (though it is probably= not ideal).  It sets a flag if it recieves a C-tag keyDown, and if so= does not send the corresponging keyUp.  I like this because then it w= orks on keyDown like everything else if possible, but if not it should work= on keyUp.  I don’t have the facilities to test the latter assum= ption.

Also the patch almost certainly is less efficient than it could be.  F= or example it sets flags and code twice (I believe) to the same thing, but = I’m not really familiar enough with the code to want to risk changing= that (and it’s only for the Cocoa port as well).  I believe it = should be correct at least.

-Ivan Andrus
--_000_C67CB6D58F92Eiandrusomniturecom_-- --_004_C67CB6D58F92Eiandrusomniturecom_ Content-Type: application/octet-stream; name="emacs.patch" Content-Description: emacs.patch Content-Disposition: attachment; filename="emacs.patch"; size=1541; creation-date="Fri, 10 Jul 2009 09:14:21 GMT"; modification-date="Fri, 10 Jul 2009 09:14:21 GMT" Content-Transfer-Encoding: base64 LS0tIG5zdGVybS5tCTA2IEp1bCAyMDA5IDIxOjQ2OjU3IC0wNjAwCTEuNzYKKysrIG5zdGVybS5t CTEwIEp1bCAyMDA5IDA5OjExOjIwIC0wNjAwCkBAIC0yMTgsNiArMjE4LDE1CiAgICBNb2RlIDAg aXMgbm9ybWFsIGFudGktYWxpYXNpbmcsIG1vZGUgMSBpcyBubyBhbnRpLWFsaWFzaW5nLCBhbmQg bW9kZSAyIGlzCiAgICA0LWJpdCBwaXhlbC1hbGlnbmVkIGFud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eU1hc2spICYmICEoZmxhZ3MgJiBOU0NvbW1hbmRLZXlNYXNrKSkgeworICAgIG5zX3NlbmRzX2Nv bnRyb2xfdGFiX2tleWRvd24gPSBZRVM7CisgIH0KKyNlbmRpZgorCiAgIE5TVFJBQ0UgKGtleURv d24pOwoKICAgLyogUmhhcHNvZHkgYW5kIE9TIFggZ2l2ZSB1cCBhbmQgZG93biBldmVudHMgZm9y IHRoZSBhcnJvdyBrZXlzICovCkBAIC00NjI4LDYgKzQ2MjgsOCBAQAogICAgSWYgaXQgbWF0Y2hl cyBvbmUgb2YgdGhlc2UsIHNlbmQgaXQgb24gdG8ga2V5RG93bi4gKi8KIC0odm9pZClrZXlVcDog KE5TRXZlbnQgKil0aGVFdmVudAogeworICBpZiAoIG5zX3NlbmRzX2NvbnRyb2xfdGFiX2tleWRv d24gKSAgcmV0dXJuOworCiAgIGludCBmbGFncyA9IFt0aGVFdmVudCBtb2RpZmllckZsYWdzXTsK ICAgaW50IGNvZGUgPSBbdGhlRXZlbnQga2V5Q29kZV07CiAgIGlmIChjb2RlID09IDB4MzAgJiYg KGZsYWdzICYgTlNDb250cm9sS2V5TWFzaykgJiYgIShmbGFncyAmIE5TQ29tbWFuZEtleU1hc2sp KQo= --_004_C67CB6D58F92Eiandrusomniturecom_--