From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Gallagher, Kevin" Newsgroups: gmane.emacs.bugs Subject: bug#5668: acknowledged by developer (control message for bug #5668) Date: Wed, 13 Jul 2011 15:01:29 -0500 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="_000_DEA5AB0D58A5EB4F98C312A173A3ECAE171F3FD5E8XCHMW11Vmwnos_" X-Trace: dough.gmane.org 1310587353 17054 80.91.229.12 (13 Jul 2011 20:02:33 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 13 Jul 2011 20:02:33 +0000 (UTC) To: "5668@debbugs.gnu.org" <5668@debbugs.gnu.org> Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jul 13 22:02:29 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Qh5db-0005FW-Mv for geb-bug-gnu-emacs@m.gmane.org; Wed, 13 Jul 2011 22:02:28 +0200 Original-Received: from localhost ([::1]:43129 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qh5da-0005sa-Hg for geb-bug-gnu-emacs@m.gmane.org; Wed, 13 Jul 2011 16:02:26 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:35587) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qh5dH-0005sT-CP for bug-gnu-emacs@gnu.org; Wed, 13 Jul 2011 16:02:11 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qh5dC-0004X0-OB for bug-gnu-emacs@gnu.org; Wed, 13 Jul 2011 16:02:07 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:36250) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qh5dC-0004Wv-L2 for bug-gnu-emacs@gnu.org; Wed, 13 Jul 2011 16:02:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1Qh5dC-0005re-0E; Wed, 13 Jul 2011 16:02:02 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: Resent-From: "Gallagher, Kevin" Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 13 Jul 2011 20:02:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 5668 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: notabug Original-Received: via spool by 5668-submit@debbugs.gnu.org id=B5668.131058731222527 (code B ref 5668); Wed, 13 Jul 2011 20:02:01 +0000 Original-Received: (at 5668) by debbugs.gnu.org; 13 Jul 2011 20:01:52 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Qh5cy-0005rF-Cw for submit@debbugs.gnu.org; Wed, 13 Jul 2011 16:01:52 -0400 Original-Received: from slb-smtpout-01.boeing.com ([130.76.64.48]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Qh5cq-0005qw-56 for 5668@debbugs.gnu.org; Wed, 13 Jul 2011 16:01:45 -0400 Original-Received: from slb-av-01.boeing.com (slb-av-01.boeing.com [129.172.13.4]) by slb-smtpout-01.ns.cs.boeing.com (8.14.4/8.14.4/8.14.4/SMTPOUT) with ESMTP id p6DK1VHL026819 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL) for <5668@debbugs.gnu.org>; Wed, 13 Jul 2011 13:01:34 -0700 (PDT) Original-Received: from slb-av-01.boeing.com (localhost [127.0.0.1]) by slb-av-01.boeing.com (8.14.4/8.14.4/DOWNSTREAM_RELAY) with ESMTP id p6DK1Vvx021181 for <5668@debbugs.gnu.org>; Wed, 13 Jul 2011 13:01:31 -0700 (PDT) Original-Received: from XCH-MWHT-04.mw.nos.boeing.com (xch-mwht-04.mw.nos.boeing.com [134.57.113.164]) by slb-av-01.boeing.com (8.14.4/8.14.4/UPSTREAM_RELAY) with ESMTP id p6DK1UgM021129 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=OK) for <5668@debbugs.gnu.org>; Wed, 13 Jul 2011 13:01:31 -0700 (PDT) Original-Received: from XCH-MW-11V.mw.nos.boeing.com ([134.57.119.194]) by XCH-MWHT-04.mw.nos.boeing.com ([134.57.113.164]) with mapi; Wed, 13 Jul 2011 15:01:31 -0500 Thread-Topic: RE: bug#5668 acknowledged by developer (control message for bug #5668) Thread-Index: AcxBl6dgltdKOffNRMC9LS5xCStUjQ== Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Wed, 13 Jul 2011 16:02:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:48922 Archived-At: --_000_DEA5AB0D58A5EB4F98C312A173A3ECAE171F3FD5E8XCHMW11Vmwnos_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Lars Magne Ingebrigtsen gnus.org> writes: > Yes, binding [kp-delete] seems rather gratuitous, but many modes bind > [delete]. If you want to rebind them to something else, you can use the > mode hooks to alter their definitions. So I don't really think this is > a bug. I should have been more specific. The above change affects the EDT Emulati= on package (bundled with GNU Emacs) in a shell window. (I am the maintaine= r of this package.). Now, EDT Emulation does not run as a mode. Instead, = it copies the global map, escape map, etc., and modifies the copies of thes= e maps, saving off the originals. During first time setup, when using a Window system, a user executes edt-ma= pper.el to bind EDT functions to the keypad keys, function keys, and some o= ther keys like Home, PageUp, End, PageDown, Delete, Insert, etc. This allo= ws the user to map EDT functions to the same (or almost the same) physical = location they are bound to on DEC VT-100/VT-200 series keyboards when using= the actual EDT editor on DEC VMS computers. Normally, on a PC keyboard, an EDT Emulation user will map [delete] and [kp= -delete] to the function edt-select to correspond to the default mapping in= the EDT editor, but users are free to map it differently if they choose. = However, the recent change made to comint.el overrides these EDT Emulation = bindings in a shell window, which really puzzled me, at first, until I crac= ked open comint.el and saw what was going on. Recently, I discovered in Emacs 23.x that the keymap, local-function-key-ma= p, has new bindings made to all the keypad keys. These bindings override t= he behavior expected by edt-mapper.el and prevent it from doing the right t= hing. I did develop a workaround to deal with this, but it is rather ugly.= In my .emacs file, I have to unbind all the PC keypad keys like this: (defun undef-keys-for-edt-mapper () (define-key local-function-key-map [kp-0] nil) (define-key local-function-key-map [kp-1] nil) (define-key local-function-key-map [kp-2] nil) (define-key local-function-key-map [kp-3] nil) (define-key local-function-key-map [kp-4] nil) (define-key local-function-key-map [kp-5] nil) (define-key local-function-key-map [kp-6] nil) (define-key local-function-key-map [kp-7] nil) (define-key local-function-key-map [kp-8] nil) (define-key local-function-key-map [kp-9] nil) (define-key local-function-key-map [kp-divide] nil) (define-key local-function-key-map [kp-multiply] nil) (define-key local-function-key-map [kp-subtract] nil) (define-key local-function-key-map [kp-add] nil) (define-key local-function-key-map [kp-enter] nil) (define-key local-function-key-map [kp-decimal] nil) (define-key local-function-key-map [delete] nil) )) And start the EDT Emulation like this: (defun my-term-setup () ;; Allow rebinding of keypad keys and delete key in EDT ;; Emulation by edt-mapper.el. This is accomplished by removing ;; lower level redirection of these keys. (undef-keys-for-edt-mapper)) ;; On MS Windows, normal-erase-is-backspace-mode is turned on by ;; default. When on, it also remaps most of the keypad keys, ;; which breaks EDT Emulation. So, it is turned off, here, to ;; prevent the remapping. (normal-erase-is-backspace-mode nil) (setq edt-word-entities '(?\t ?- ?/)) (edt-emulation-on) ) (add-hook 'term-setup-hook 'my-term-setup) Kevin Gallagher --_000_DEA5AB0D58A5EB4F98C312A173A3ECAE171F3FD5E8XCHMW11Vmwnos_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Lars Magne Ingebrigtsen &= lt;larsi <at> gnus.org> writes:

<= o:p> 

= > Yes, binding [kp-delete] seems rather gratuitous, but man= y modes bind

> [delete].  If you want to rebind them to some= thing else, you can use the

> mode hooks to alter their definitio= ns.  So I don't really think this is

> a bug.

&n= bsp;

I should have been more specific.  Th= e above change affects the EDT Emulation package (bundled with GNU Emacs) i= n a shell window.  (I am the maintainer of this package.).  Now, = EDT Emulation does not run as a mode.  Instead, it copies the global m= ap, escape map, etc., and modifies the copies of these maps, saving off the= originals. 

 

During first time setup, when using a Window system, a use= r executes edt-mapper.el to bind EDT functions to the keypad keys, function= keys, and some other keys like Home, PageUp, End, PageDown, Delete, Insert= , etc.  This allows the user to map EDT functions to the same (or almo= st the same) physical location they are bound to on DEC VT-100/VT-200 serie= s keyboards when using the actual EDT editor on DEC VMS computers.

 

<= span style=3D'font-size:10.0pt;font-family:"Arial","sans-serif"'>Normally, = on a PC keyboard, an EDT Emulation user will map [delete] and [kp-delete] t= o the function edt-select to correspond to the default mapping in the EDT e= ditor, but users are free to map it differently if they choose.  Howev= er, the recent change made to comint.el overrides these EDT Emulation bindi= ngs in a shell window, which really puzzled me, at first, until I cracked o= pen comint.el and saw what was going on.

<= o:p> 

Recently, I discovered in Emacs 23.x= that the keymap, local-function-key-map, has new bindings made to all the = keypad keys.  These bindings override the behavior expected by edt-map= per.el and prevent it from doing the right thing.  I did develop a wor= karound to deal with this, but it is rather ugly.  In my .emacs file, = I have to unbind all the PC keypad keys like this:

 

(defun undef-keys-for-edt-= mapper ()

  (define-key local-functio= n-key-map [kp-0] nil)

  (define-key l= ocal-function-key-map [kp-1] nil)

  (= define-key local-function-key-map [kp-2] nil)

  (define-key local-function-key-map [kp-3] nil)=

  (define-key local-function-key-map [kp-4] nil)<= /o:p>

  (define-key local-function-key-map [kp-5= ] nil)

  (define-key local-function-k= ey-map [kp-6] nil)

  (define-key loca= l-function-key-map [kp-7] nil)

  (def= ine-key local-function-key-map [kp-8] nil)

  (define-key local-function-key-map [kp-9] nil)

  (define-key local-function-key-map [kp-divide] nil)

  (define-key local-function-key-map [kp= -multiply] nil)

  (define-key local-f= unction-key-map [kp-subtract] nil)

  = (define-key local-function-key-map [kp-add] nil)

  (define-key local-function-key-map [kp-enter] nil)=

  (define-key local-function-key-map [kp-decima= l] nil)

  (define-key local-function-= key-map [delete] nil)

  ))=

 

And start th= e EDT Emulation like this:

 

(defun my-term-setup ()

  ;; Allow rebinding of keypad keys and delete key in EDT<= /o:p>

  ;; Emulation by edt-mapper.el. This is a= ccomplished by removing

  ;; lower le= vel redirection of these keys.

  (und= ef-keys-for-edt-mapper))

  ;; On MS W= indows, normal-erase-is-backspace-mode is turned on by

  ;; default. When on, it also remaps most of the keypad = keys,

  ;; which breaks EDT Emulation= . So, it is turned off, here, to

=   ;;= prevent the remapping.

  (normal-era= se-is-backspace-mode nil)

  (setq edt= -word-entities '(?\t ?- ?/))

  (edt-e= mulation-on)

)

(add-hook 'term-setup-hook 'my-term-setup)

 

Kevin Gallagher

=

 

= --_000_DEA5AB0D58A5EB4F98C312A173A3ECAE171F3FD5E8XCHMW11Vmwnos_--