From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#7840: 23.2.91; default-terminal-coding-system not inherited by created terminals Date: Thu, 13 Jan 2011 22:45:57 -0500 Message-ID: Reply-To: Eli Zaretskii NNTP-Posting-Host: lo.gmane.org X-Trace: dough.gmane.org 1294977285 5987 80.91.229.12 (14 Jan 2011 03:54:45 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 14 Jan 2011 03:54:45 +0000 (UTC) To: 7840@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jan 14 04:54:40 2011 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.69) (envelope-from ) id 1PdakE-0003yB-QD for geb-bug-gnu-emacs@m.gmane.org; Fri, 14 Jan 2011 04:54:40 +0100 Original-Received: from localhost ([127.0.0.1]:40142 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PdakC-00012B-Kb for geb-bug-gnu-emacs@m.gmane.org; Thu, 13 Jan 2011 22:54:32 -0500 Original-Received: from [140.186.70.92] (port=39970 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pdak4-00010a-D5 for bug-gnu-emacs@gnu.org; Thu, 13 Jan 2011 22:54:25 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Pdak2-0003FI-Be for bug-gnu-emacs@gnu.org; Thu, 13 Jan 2011 22:54:24 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:55093) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Pdak2-0003FE-9s for bug-gnu-emacs@gnu.org; Thu, 13 Jan 2011 22:54:22 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1PdaVC-0003Tp-1L; Thu, 13 Jan 2011 22:39:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 14 Jan 2011 03:39:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 7840 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.129497631413341 (code B ref -1); Fri, 14 Jan 2011 03:39:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 14 Jan 2011 03:38:34 +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 1PdaUj-0003T7-Ho for submit@debbugs.gnu.org; Thu, 13 Jan 2011 22:38:34 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PdaUg-0003Sv-8A for submit@debbugs.gnu.org; Thu, 13 Jan 2011 22:38:30 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Pdabz-0002CM-PF for submit@debbugs.gnu.org; Thu, 13 Jan 2011 22:46:04 -0500 Original-Received: from lists.gnu.org ([199.232.76.165]:42867) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Pdabz-0002CI-Mh for submit@debbugs.gnu.org; Thu, 13 Jan 2011 22:46:03 -0500 Original-Received: from [140.186.70.92] (port=44558 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pdaby-00085v-HA for bug-gnu-emacs@gnu.org; Thu, 13 Jan 2011 22:46:03 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Pdabx-0002C8-23 for bug-gnu-emacs@gnu.org; Thu, 13 Jan 2011 22:46:02 -0500 Original-Received: from fencepost.gnu.org ([140.186.70.10]:47202) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Pdabw-0002C4-VM for bug-gnu-emacs@gnu.org; Thu, 13 Jan 2011 22:46:01 -0500 Original-Received: from eliz by fencepost.gnu.org with local (Exim 4.69) (envelope-from ) id 1Pdabt-0000d2-6B for bug-gnu-emacs@gnu.org; Thu, 13 Jan 2011 22:45:57 -0500 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Thu, 13 Jan 2011 22:39:02 -0500 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) 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: , 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:43350 Archived-At: I have this in my ~/.emacs: (set-terminal-coding-system 'utf-8) This is supposed to set the value of default-terminal-coding-system, and it indeed does. However, creating a new terminal, e.g. with "emacsclient -t" when an Emacs daemon is running, does not set the terminal encoding of the newly created terminal to utf-8. I don't see any code that attempts doing so; the only place where we do anything with the terminal encoding is in create_terminal: terminal->keyboard_coding = (struct coding_system *) xmalloc (sizeof (struct coding_system)); terminal->terminal_coding = (struct coding_system *) xmalloc (sizeof (struct coding_system)); setup_coding_system (Qno_conversion, terminal->keyboard_coding); setup_coding_system (Qundecided, terminal->terminal_coding); The net effect is that the user _must_ manually set up the terminal and keyboard encoding on every terminal created by emacsclient. I think that's a misfeature. Any reason not to honor default-terminal-coding-system and default-keyboard-coding-system when we create a new terminal? In GNU Emacs 23.2.91.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.12.9) of 2010-12-11 on fencepost configured using `configure '--with-jpeg=no' '--with-gif=no' '--with-tiff=no'' 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: nil value of $XMODIFIERS: nil locale-coding-system: nil default enable-multibyte-characters: t Major mode: Mail Minor modes in effect: flyspell-mode: t display-time-mode: t show-paren-mode: t savehist-mode: t 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 auto-encryption-mode: t auto-compression-mode: t line-number-mode: t Recent input: u c t SPC t e r m i n a l C-r C-r C-r C-r C-r C-r ESC [ 6 ~ ESC [ 6 ~ ESC O B ESC O B ESC O B ESC O B ESC O B ESC O B ESC O B ESC O B ESC O B ESC O B ESC O B ESC O B ESC O B ESC O B ESC O B ESC O B ESC O D ESC O D ESC O D ESC O D ESC x g r e p RET C-a f C-e ESC O B DEL c RET ESC C-v ESC C-v ESC C-v ESC C-v ESC C-v ESC C-v ESC C-v ESC C-v ESC C-v C-x o ESC [ 5 ~ ESC [ 5 ~ ESC O B ESC O A ESC O A ESC O A ESC O A ESC O A ESC O B ESC O B ESC O A RET C-x b I N B TAB RET C-x 4 C-o ESC O A C-e TAB - TAB RET ESC : ( t e r m i n a l - c o d i n g - s y s t e m ) RET ESC p ESC p ESC p SPC SPC C-x C-c ESC [ > 0 ; 1 3 6 ; 0 c C-x b RET ESC : ESC O A RET C-x RET t ESC O A RET C-l ESC : ESC O A RET C-x 2 C-x 4 C-o ESC O A ESC O A RET C-x 0 C-x 4 b RET C-u 9 C-x ^ ESC x r e p o C-h C-g C-g r ESC ~ C-x 5 o C-x 5 0 ESC x r e p o r t - e m TAB RET Recent messages: Mark set utf-8 (No files need saving) When done with this frame, type C-x 5 0 nil utf-8 Quit [2 times] Modification-flag cleared Scanning for dabbrevs...100% dabbrev-expand: No dynamic expansion for `default-ter' found Load-path shadows: None found. Features: (shadow emacsbug debug gud easy-mmode grep compile comint ring find-func pp help-mode view help-fns multi-isearch vc-bzr cc-mode cc-fonts cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs arc-mode archive-mode newcomment dabbrev flyspell ispell rmailsum rmailmm message sendmail regexp-opt ecomplete rfc822 mml easymenu mml-sec password-cache mm-decode mm-bodies mm-encode mailcap mailabbrev nnheader gnus-util netrc gmm-utils wid-edit mailheader canlock sha1 hex-util hashcash mail-parse rfc2231 rmail rfc2047 rfc2045 ietf-drums time-date qp mm-util mail-prsvr mail-utils server time paren cus-start cus-load savehist saveplace tooltip ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd font-setting tool-bar dnd fontset image fringe lisp-mode register page menu-bar rfn-eshadow timer select scroll-bar mldrag 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 loaddefs button minibuffer faces cus-face files text-properties overlay md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process font-render-setting gtk x-toolkit x multi-tty emacs)