From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ikumi Keita Newsgroups: gmane.emacs.bugs Subject: bug#12552: 24.2; The setting of normal-erase-is-backspace-mode is erased when creating new frame Date: Tue, 02 Oct 2012 01:48:27 +0900 Message-ID: <9118.1349110107@localhost> NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1349113018 8001 80.91.229.3 (1 Oct 2012 17:36:58 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 1 Oct 2012 17:36:58 +0000 (UTC) To: 12552@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Oct 01 19:37:02 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TIjtK-0002SQ-86 for geb-bug-gnu-emacs@m.gmane.org; Mon, 01 Oct 2012 19:34:50 +0200 Original-Received: from localhost ([::1]:43347 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TIjtE-0001JF-QH for geb-bug-gnu-emacs@m.gmane.org; Mon, 01 Oct 2012 13:34:44 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:36960) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TIjt6-0001F6-86 for bug-gnu-emacs@gnu.org; Mon, 01 Oct 2012 13:34:43 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TIjt4-0001Al-Ie for bug-gnu-emacs@gnu.org; Mon, 01 Oct 2012 13:34:36 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:55337) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TIjt4-0001AZ-Fe for bug-gnu-emacs@gnu.org; Mon, 01 Oct 2012 13:34:34 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1TIjtV-0006aS-Qu for bug-gnu-emacs@gnu.org; Mon, 01 Oct 2012 13:35:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Ikumi Keita Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 01 Oct 2012 17:35:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 12552 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.134911286125264 (code B ref -1); Mon, 01 Oct 2012 17:35:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 1 Oct 2012 17:34:21 +0000 Original-Received: from localhost ([127.0.0.1]:36649 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TIjsp-0006ZP-0z for submit@debbugs.gnu.org; Mon, 01 Oct 2012 13:34:21 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:37397) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TIjBA-0004gK-4B for submit@debbugs.gnu.org; Mon, 01 Oct 2012 12:49:14 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TIjAh-00088V-8N for submit@debbugs.gnu.org; Mon, 01 Oct 2012 12:48:44 -0400 Original-Received: from lists.gnu.org ([208.118.235.17]:59256) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TIjAh-00088R-4F for submit@debbugs.gnu.org; Mon, 01 Oct 2012 12:48:43 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:39256) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TIjAf-0003RX-JN for bug-gnu-emacs@gnu.org; Mon, 01 Oct 2012 12:48:43 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TIjAZ-00087U-9C for bug-gnu-emacs@gnu.org; Mon, 01 Oct 2012 12:48:41 -0400 Original-Received: from smtpa15.m3.home.ne.jp ([220.152.44.30]:45463) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TIjAY-00086P-NE for bug-gnu-emacs@gnu.org; Mon, 01 Oct 2012 12:48:35 -0400 Original-Received: from localhost.my.domain ([125.15.34.245]) by smtpa15.m3.home.ne.jp with ESMTP id <20121001164829.SZZQ22920.smtpa15.m3.home.ne.jp@localhost.my.domain> for ; Tue, 2 Oct 2012 01:48:29 +0900 Original-Received: from localhost (localhost [127.0.0.1]) by localhost.my.domain (Postfix) with ESMTP id C2F8B284C8 for ; Tue, 2 Oct 2012 01:48:27 +0900 (JST) X-Mailer: MH-E 8.3.1; MH 6.8.4.JP-3.05; GNU Emacs 24.2.1 X-Authentication-Info: Submitted using SMTP AUTH LOGIN at smtpa15.m3.home.ne.jp from [125.15.34.245] at Tue, 2 Oct 2012 01:48:29 +0900 X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Mailman-Approved-At: Mon, 01 Oct 2012 13:34:17 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) 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:65089 Archived-At: This bug report will be sent to the Bug-GNU-Emacs mailing list and the GNU bug tracker at debbugs.gnu.org. Please check that the From: line contains a valid email address. After a delay of up to one day, you should receive an acknowledgement at that address. Please write in English if possible, as the Emacs maintainers usually do not have translators for other languages. Please describe exactly what actions triggered the bug, and the precise symptoms of the bug. If you can, give a recipe starting from `emacs -Q': 1. On X window, emacs -Q 2. M-x normal-erase-is-backspace-mode RET 3. At this stage, deletes backward. This is OK. 4. However, after creating new frame with C-x 5 2, deletes forward. Creating new frame erased the setting of n-e-i-b-m. I think this behaviour is a bug. On emacs 23, that did not happen. Emacs 23 retained the setting of n-e-i-b-m after creating new frame. 5. On emacs 24, the same thing occurs with C-x 5 b, C-x 5 o, etc. instead of C-x 5 2. I think that the reason is that the function normal-erase-is-backspace-mode does not store the right value in terminal-paramter. After the procedure of the item 2 in the above list, M-: (terminal-parameter nil 'normal-erase-is-backspace) RET reports nil. However, according to the elisp manual, the section Terminal Parameters says: Here's a list of a few terminal parameters that have a special meaning: (snip) `normal-erase-is-backspace' Value is either 1 or 0, depending on whether `normal-erase-is-backspace-mode' is turned on or off on this terminal. *Note DEL Does Not Delete: (emacs)DEL Does Not Delete. Thus, the value of 0, instead of nil, should be stored in the terminal parameter normal-erase-is-backspace in this case, and emacs 23 does store 0. Due to this issue, the function normal-erase-is-backspace-setup-frame considers wrongly that the terminal paramter n-e-i-b is not initialized yet when creating new frame, and resets the keybinds so that deletes forward. I confirmed that the following workaround fixes this problem. (It seems that it is cleaner to put the relavant codes in the function body than to use variable: tag, though) *** simple.el.orig 2012-08-23 14:33:42.000000000 +0900 --- simple.el 2012-09-28 15:43:25.000000000 +0900 *************** (define-minor-mode normal-erase-is-backs *** 6747,6754 **** have both Backspace, Delete and F1 keys. See also `normal-erase-is-backspace'." ! :variable (eq (terminal-parameter ! nil 'normal-erase-is-backspace) 1) (let ((enabled (eq 1 (terminal-parameter nil 'normal-erase-is-backspace)))) --- 6747,6757 ---- have both Backspace, Delete and F1 keys. See also `normal-erase-is-backspace'." ! :variable ((eq (terminal-parameter ! nil 'normal-erase-is-backspace) 1) ! . (lambda (val) ! (set-terminal-parameter nil 'normal-erase-is-backspace ! (if val 1 0)))) (let ((enabled (eq 1 (terminal-parameter nil 'normal-erase-is-backspace)))) If Emacs crashed, and you have the Emacs process in the gdb debugger, please include the output from the following gdb commands: `bt full' and `xbacktrace'. For information about debugging Emacs, please read the file /home/keita/scr/emacs-24.2/etc/DEBUG. In GNU Emacs 24.2.1 (i386-unknown-freebsd9.0, GTK+ Version 2.24.6) of 2012-10-02 on localhost.my.domain Windowing system distributor `The X.Org Foundation', version 11.0.10707000 Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: ja_JP.eucJP value of $XMODIFIERS: @im=ibus locale-coding-system: japanese-iso-8bit-unix default enable-multibyte-characters: t Major mode: Lisp Interaction Minor modes in effect: tooltip-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Recent input: C-h c C-h c M-x n o r m a l e r C-h c C-x 5 2 C-h c C-h c M-x r e p o r Recent messages: For information about GNU Emacs and the GNU system, type C-h C-a. DEL (translated from ) runs the command backward-delete-char-untabify (translated from ) runs the command delete-forward-char Delete key deletes backward DEL (translated from ) runs the command backward-delete-char-untabify (translated from ) runs the command delete-forward-char [2 times] Making completion list... delete-forward-char: End of buffer Load-path shadows: None found. Features: (shadow sort gnus-util mail-extr emacsbug message format-spec rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail regexp-opt rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils help-mode easymenu view time-date japan-util tooltip ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image fringe lisp-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer loaddefs button faces cus-face files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process dbusbind dynamic-setting system-font-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs)