From unknown Mon Aug 18 18:02:14 2025 X-Loop: help-debbugs@gnu.org Subject: bug#7840: 23.2.91; default-terminal-coding-system not inherited by created terminals 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: To: 7840@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Reply-To: Eli Zaretskii Received: via spool by submit@debbugs.gnu.org id=B.129497631413341 (code B ref -1); Fri, 14 Jan 2011 03:39:01 +0000 Received: (at submit) by debbugs.gnu.org; 14 Jan 2011 03:38:34 +0000 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 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 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 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, T_RP_MATCHES_RCVD autolearn=unavailable version=3.3.1 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 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 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 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 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 From: Eli Zaretskii Message-Id: Date: 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-Spam-Score: -6.5 (------) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.5 (------) 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) From unknown Mon Aug 18 18:02:14 2025 X-Loop: help-debbugs@gnu.org Subject: bug#7840: 23.2.91; default-terminal-coding-system not inherited by created terminals Resent-From: Stefan Monnier 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 23:12:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 7840 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: 7840@debbugs.gnu.org Received: via spool by 7840-submit@debbugs.gnu.org id=B7840.129504670926936 (code B ref 7840); Fri, 14 Jan 2011 23:12:01 +0000 Received: (at 7840) by debbugs.gnu.org; 14 Jan 2011 23:11:49 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Pdso8-00070P-Sx for submit@debbugs.gnu.org; Fri, 14 Jan 2011 18:11:49 -0500 Received: from ironport2-out.teksavvy.com ([206.248.154.183] helo=ironport2-out.pppoe.ca) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Pdso7-00070D-1u for 7840@debbugs.gnu.org; Fri, 14 Jan 2011 18:11:47 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApMHADVpME1FxIbi/2dsb2JhbAAzpCd0ux+FTwSEa44u X-IronPort-AV: E=Sophos;i="4.60,325,1291611600"; d="scan'208";a="88130307" Received: from 69-196-134-226.dsl.teksavvy.com (HELO ceviche.home) ([69.196.134.226]) by ironport2-out.pppoe.ca with ESMTP/TLS/ADH-AES256-SHA; 14 Jan 2011 18:19:22 -0500 Received: by ceviche.home (Postfix, from userid 20848) id 4BBAF66164; Fri, 14 Jan 2011 10:33:30 -0500 (EST) From: Stefan Monnier Message-ID: References: Date: Fri, 14 Jan 2011 10:33:30 -0500 In-Reply-To: (Eli Zaretskii's message of "Thu, 13 Jan 2011 22:45:57 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -1.6 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.6 (-) > Any reason not to honor default-terminal-coding-system and > default-keyboard-coding-system when we create a new terminal? Probably a simple oversight. Stefan From unknown Mon Aug 18 18:02:14 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.427 (Entity 5.427) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Eli Zaretskii Subject: bug#7840: closed (Re: bug#7840: 23.2.91; default-terminal-coding-system not inherited by created terminals) Message-ID: References: <8362spr2zz.fsf@gnu.org> X-Gnu-PR-Message: they-closed 7840 X-Gnu-PR-Package: emacs Reply-To: 7840@debbugs.gnu.org Date: Sat, 12 Feb 2011 09:47:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1297504022-14067-1" This is a multi-part message in MIME format... ------------=_1297504022-14067-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #7840: 23.2.91; default-terminal-coding-system not inherited by created ter= minals which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 7840@debbugs.gnu.org. --=20 7840: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D7840 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1297504022-14067-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 7840-done) by debbugs.gnu.org; 12 Feb 2011 09:46:22 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PoC3a-0003d4-8b for submit@debbugs.gnu.org; Sat, 12 Feb 2011 04:46:22 -0500 Received: from mtaout22.012.net.il ([80.179.55.172]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PoC3Y-0003cd-3E for 7840-done@debbugs.gnu.org; Sat, 12 Feb 2011 04:46:21 -0500 Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0LGI00C000POW000@a-mtaout22.012.net.il> for 7840-done@debbugs.gnu.org; Sat, 12 Feb 2011 11:55:10 +0200 (IST) Received: from HOME-C4E4A596F7 ([84.229.171.5]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0LGI00CN30VWBDB0@a-mtaout22.012.net.il>; Sat, 12 Feb 2011 11:55:10 +0200 (IST) Date: Sat, 12 Feb 2011 11:55:28 +0200 From: Eli Zaretskii Subject: Re: bug#7840: 23.2.91; default-terminal-coding-system not inherited by created terminals In-reply-to: X-012-Sender: halo1@inter.net.il To: Stefan Monnier Message-id: <8362spr2zz.fsf@gnu.org> References: X-Spam-Score: -2.1 (--) X-Debbugs-Envelope-To: 7840-done Cc: 7840-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.1 (--) > From: Stefan Monnier > Cc: 7840@debbugs.gnu.org > Date: Fri, 14 Jan 2011 10:33:30 -0500 > > > Any reason not to honor default-terminal-coding-system and > > default-keyboard-coding-system when we create a new terminal? > > Probably a simple oversight. Fixed by revision 100466 on the emacs-23 branch. ------------=_1297504022-14067-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 14 Jan 2011 03:38:34 +0000 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 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 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 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, T_RP_MATCHES_RCVD autolearn=unavailable version=3.3.1 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 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 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 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 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 From: Eli Zaretskii To: bug-gnu-emacs@gnu.org Subject: 23.2.91; default-terminal-coding-system not inherited by created terminals Message-Id: Date: 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-Spam-Score: -6.5 (------) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.5 (------) 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) ------------=_1297504022-14067-1-- From unknown Mon Aug 18 18:02:14 2025 X-Loop: help-debbugs@gnu.org Subject: bug#7840: SYMBOL_VALUE in terminal.c (was 23.2.91; default-terminal-coding-system not inherited by created terminals) References: In-Reply-To: Resent-From: Chong Yidong Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 13 Feb 2011 00:10:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 7840 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: Stefan Monnier , 7840@debbugs.gnu.org Received: via spool by 7840-submit@debbugs.gnu.org id=B7840.12975558001994 (code B ref 7840); Sun, 13 Feb 2011 00:10:03 +0000 Received: (at 7840) by debbugs.gnu.org; 13 Feb 2011 00:10:00 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PoPXL-0000W4-5W for submit@debbugs.gnu.org; Sat, 12 Feb 2011 19:10:00 -0500 Received: from vm-emlprdomr-03.its.yale.edu ([130.132.50.144]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PoPXJ-0000Vm-UI for 7840@debbugs.gnu.org; Sat, 12 Feb 2011 19:09:58 -0500 Received: from furball (c-71-192-165-84.hsd1.ct.comcast.net [71.192.165.84]) (authenticated bits=0) by vm-emlprdomr-03.its.yale.edu (8.14.4/8.14.4) with ESMTP id p1D0In9h020163 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Sat, 12 Feb 2011 19:18:50 -0500 Received: by furball (Postfix, from userid 1000) id 2BC181605B7; Sat, 12 Feb 2011 19:18:45 -0500 (EST) From: Chong Yidong Date: Sat, 12 Feb 2011 19:18:45 -0500 Message-ID: <87wrl423dm.fsf@stupidchicken.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Scanned-By: MIMEDefang 2.71 on 130.132.50.144 X-Spam-Score: -2.7 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.7 (--) > 2011-02-12 Eli Zaretskii > * terminal.c (create_terminal): Use default-keyboard-coding-system > and default-terminal-coding-system to initialize coding systems of > the new terminal. (Bug#7840) > > ! keyboard_coding = SYMBOL_VALUE (intern ("default-keyboard-coding-system")); > ! if (NILP (keyboard_coding) > ! || EQ (keyboard_coding, Qunbound) > ! || NILP (Fcoding_system_p (keyboard_coding))) > ! keyboard_coding = Qno_conversion; > ! terminal_coding = SYMBOL_VALUE (intern ("default-terminal-coding-system")); This change doesn't build on the trunk, due to Stefan's 2010-04-20 change removing SYMBOL_VALUE. I left out this change when doing the last merge from the branch. Would you mind working up a separate patch and applying it to the trunk? (Fsymbol_value apparently doesn't work here, because the symbols can be unbound and we don't want to signal an error.) Thanks. From unknown Mon Aug 18 18:02:14 2025 X-Loop: help-debbugs@gnu.org Subject: bug#7840: SYMBOL_VALUE in terminal.c (was 23.2.91; default-terminal-coding-system not inherited by created terminals) Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 14 Feb 2011 17:57:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 7840 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Chong Yidong Cc: Eli Zaretskii , 7840@debbugs.gnu.org Received: via spool by 7840-submit@debbugs.gnu.org id=B7840.129770620915072 (code B ref 7840); Mon, 14 Feb 2011 17:57:01 +0000 Received: (at 7840) by debbugs.gnu.org; 14 Feb 2011 17:56:49 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Pp2fJ-0003v3-4g for submit@debbugs.gnu.org; Mon, 14 Feb 2011 12:56:49 -0500 Received: from ironport2-out.teksavvy.com ([206.248.154.183] helo=ironport2-out.pppoe.ca) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Pp2fG-0003us-Vb for 7840@debbugs.gnu.org; Mon, 14 Feb 2011 12:56:47 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvsEAJr9WE1MCqmX/2dsb2JhbACmC3S7O4VeBIUEjEWCdA X-IronPort-AV: E=Sophos;i="4.60,469,1291611600"; d="scan'208";a="91694199" Received: from 76-10-169-151.dsl.teksavvy.com (HELO ceviche.home) ([76.10.169.151]) by ironport2-out.pppoe.ca with ESMTP/TLS/ADH-AES256-SHA; 14 Feb 2011 13:05:44 -0500 Received: by ceviche.home (Postfix, from userid 20848) id 7554E66188; Mon, 14 Feb 2011 13:05:44 -0500 (EST) From: Stefan Monnier Message-ID: References: <87wrl423dm.fsf@stupidchicken.com> Date: Mon, 14 Feb 2011 13:05:44 -0500 In-Reply-To: <87wrl423dm.fsf@stupidchicken.com> (Chong Yidong's message of "Sat, 12 Feb 2011 19:18:45 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.1 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.1 (--) >> * terminal.c (create_terminal): Use default-keyboard-coding-system >> and default-terminal-coding-system to initialize coding systems of >> the new terminal. (Bug#7840) >> >> ! keyboard_coding = SYMBOL_VALUE (intern ("default-keyboard-coding-system")); >> ! if (NILP (keyboard_coding) >> ! || EQ (keyboard_coding, Qunbound) >> ! || NILP (Fcoding_system_p (keyboard_coding))) >> ! keyboard_coding = Qno_conversion; >> ! terminal_coding = SYMBOL_VALUE (intern ("default-terminal-coding-system")); > This change doesn't build on the trunk, due to Stefan's 2010-04-20 > change removing SYMBOL_VALUE. > I left out this change when doing the last merge from the branch. Would > you mind working up a separate patch and applying it to the trunk? > (Fsymbol_value apparently doesn't work here, because the symbols can be > unbound and we don't want to signal an error.) We can just use Fboundp tests, when needed. Stefan From unknown Mon Aug 18 18:02:14 2025 X-Loop: help-debbugs@gnu.org Subject: bug#7840: SYMBOL_VALUE in terminal.c (was 23.2.91; default-terminal-coding-system not inherited by created terminals) 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, 18 Feb 2011 14:52:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 7840 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Monnier Cc: cyd@stupidchicken.com, 7840@debbugs.gnu.org Reply-To: Eli Zaretskii Received: via spool by 7840-submit@debbugs.gnu.org id=B7840.129804069322411 (code B ref 7840); Fri, 18 Feb 2011 14:52:02 +0000 Received: (at 7840) by debbugs.gnu.org; 18 Feb 2011 14:51:33 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PqRgD-0005pQ-7Z for submit@debbugs.gnu.org; Fri, 18 Feb 2011 09:51:33 -0500 Received: from mtaout20.012.net.il ([80.179.55.166]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PqRgB-0005pD-3C for 7840@debbugs.gnu.org; Fri, 18 Feb 2011 09:51:32 -0500 Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0LGT00300H0DDI00@a-mtaout20.012.net.il> for 7840@debbugs.gnu.org; Fri, 18 Feb 2011 16:51:09 +0200 (IST) Received: from HOME-C4E4A596F7 ([77.124.140.24]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0LGT00360IL5AIB0@a-mtaout20.012.net.il>; Fri, 18 Feb 2011 16:51:07 +0200 (IST) Date: Fri, 18 Feb 2011 16:51:13 +0200 From: Eli Zaretskii In-reply-to: X-012-Sender: halo1@inter.net.il Message-id: <83lj1dv1jy.fsf@gnu.org> References: <87wrl423dm.fsf@stupidchicken.com> X-Spam-Score: -2.0 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.0 (--) > From: Stefan Monnier > Cc: Eli Zaretskii , 7840@debbugs.gnu.org > Date: Mon, 14 Feb 2011 13:05:44 -0500 > > >> * terminal.c (create_terminal): Use default-keyboard-coding-system > >> and default-terminal-coding-system to initialize coding systems of > >> the new terminal. (Bug#7840) > >> > >> ! keyboard_coding = SYMBOL_VALUE (intern ("default-keyboard-coding-system")); > >> ! if (NILP (keyboard_coding) > >> ! || EQ (keyboard_coding, Qunbound) > >> ! || NILP (Fcoding_system_p (keyboard_coding))) > >> ! keyboard_coding = Qno_conversion; > >> ! terminal_coding = SYMBOL_VALUE (intern ("default-terminal-coding-system")); > > > This change doesn't build on the trunk, due to Stefan's 2010-04-20 > > change removing SYMBOL_VALUE. > > > I left out this change when doing the last merge from the branch. Would > > you mind working up a separate patch and applying it to the trunk? > > (Fsymbol_value apparently doesn't work here, because the symbols can be > > unbound and we don't want to signal an error.) > > We can just use Fboundp tests, when needed. I used find_symbol_value instead, which seems to be the Emacs 24 equivalent of SYMBOL_VALUE in this situation. Committed to the trunk. From unknown Mon Aug 18 18:02:14 2025 X-Loop: help-debbugs@gnu.org Subject: bug#7840: SYMBOL_VALUE in terminal.c (was 23.2.91; default-terminal-coding-system not inherited by created terminals) Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 18 Feb 2011 17:34:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 7840 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: cyd@stupidchicken.com, 7840@debbugs.gnu.org Received: via spool by 7840-submit@debbugs.gnu.org id=B7840.12980504184012 (code B ref 7840); Fri, 18 Feb 2011 17:34:01 +0000 Received: (at 7840) by debbugs.gnu.org; 18 Feb 2011 17:33:38 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PqUD3-00012f-LJ for submit@debbugs.gnu.org; Fri, 18 Feb 2011 12:33:37 -0500 Received: from pruche.dit.umontreal.ca ([132.204.246.22]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PqUD2-00012U-4X for 7840@debbugs.gnu.org; Fri, 18 Feb 2011 12:33:36 -0500 Received: from faina.iro.umontreal.ca (lechon.iro.umontreal.ca [132.204.27.242]) by pruche.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id p1IHXTq2023737; Fri, 18 Feb 2011 12:33:29 -0500 Received: by faina.iro.umontreal.ca (Postfix, from userid 20848) id 4ECA0B411A; Fri, 18 Feb 2011 12:33:29 -0500 (EST) From: Stefan Monnier Message-ID: References: <87wrl423dm.fsf@stupidchicken.com> <83lj1dv1jy.fsf@gnu.org> Date: Fri, 18 Feb 2011 12:33:29 -0500 In-Reply-To: <83lj1dv1jy.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 18 Feb 2011 16:51:13 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV3735=0 X-Spam-Score: -2.0 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.0 (--) > I used find_symbol_value instead, which seems to be the Emacs 24 > equivalent of SYMBOL_VALUE in this situation. Yes, both of them are undesirable since they're internal functions used to implement Fsymbol_value. Better use Fsymbol_value and Fboundp. Stefan From unknown Mon Aug 18 18:02:14 2025 X-Loop: help-debbugs@gnu.org Subject: bug#7840: SYMBOL_VALUE in terminal.c (was 23.2.91; default-terminal-coding-system not inherited by created terminals) 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, 18 Feb 2011 17:47:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 7840 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Monnier Cc: cyd@stupidchicken.com, 7840@debbugs.gnu.org Reply-To: Eli Zaretskii Received: via spool by 7840-submit@debbugs.gnu.org id=B7840.12980512205457 (code B ref 7840); Fri, 18 Feb 2011 17:47:02 +0000 Received: (at 7840) by debbugs.gnu.org; 18 Feb 2011 17:47:00 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PqUPz-0001Py-Jz for submit@debbugs.gnu.org; Fri, 18 Feb 2011 12:46:59 -0500 Received: from mtaout20.012.net.il ([80.179.55.166]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PqUPw-0001Pk-FG for 7840@debbugs.gnu.org; Fri, 18 Feb 2011 12:46:58 -0500 Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0LGT00500QP2N600@a-mtaout20.012.net.il> for 7840@debbugs.gnu.org; Fri, 18 Feb 2011 19:46:49 +0200 (IST) Received: from HOME-C4E4A596F7 ([77.124.140.24]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0LGT005XQQPZ4390@a-mtaout20.012.net.il>; Fri, 18 Feb 2011 19:46:49 +0200 (IST) Date: Fri, 18 Feb 2011 19:46:55 +0200 From: Eli Zaretskii In-reply-to: X-012-Sender: halo1@inter.net.il Message-id: <83fwrlutf4.fsf@gnu.org> References: <87wrl423dm.fsf@stupidchicken.com> <83lj1dv1jy.fsf@gnu.org> X-Spam-Score: -2.0 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.0 (--) > From: Stefan Monnier > Cc: cyd@stupidchicken.com, 7840@debbugs.gnu.org > Date: Fri, 18 Feb 2011 12:33:29 -0500 > > > I used find_symbol_value instead, which seems to be the Emacs 24 > > equivalent of SYMBOL_VALUE in this situation. > > Yes, both of them are undesirable since they're internal functions used > to implement Fsymbol_value. Better use Fsymbol_value and Fboundp. But find_symbol_value is used in quite a few places elsewhere in Emacs. That's why I thought it was kosher to use. And create_terminal is hardly a place where internal functions are inappropriate to use, isn't it? I also don't understand the "internal function" argument: it sounds TRT to have a function that just fetches a symbol's value, without signaling an error if it is unbound. Fsymbol_value, as it is now, is clearly coded for interactive use, which this isn't. In any case, if you want people to avoid these APIs, please explain more why you dislike them, because so far it is utterly unclear, at least to me. From unknown Mon Aug 18 18:02:14 2025 X-Loop: help-debbugs@gnu.org Subject: bug#7840: SYMBOL_VALUE in terminal.c (was 23.2.91; default-terminal-coding-system not inherited by created terminals) Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 18 Feb 2011 21:36:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 7840 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: cyd@stupidchicken.com, 7840@debbugs.gnu.org Received: via spool by 7840-submit@debbugs.gnu.org id=B7840.129806492724756 (code B ref 7840); Fri, 18 Feb 2011 21:36:02 +0000 Received: (at 7840) by debbugs.gnu.org; 18 Feb 2011 21:35:27 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PqXz4-0006RF-Qj for submit@debbugs.gnu.org; Fri, 18 Feb 2011 16:35:27 -0500 Received: from pruche.dit.umontreal.ca ([132.204.246.22]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PqXz3-0006R1-DB for 7840@debbugs.gnu.org; Fri, 18 Feb 2011 16:35:25 -0500 Received: from faina.iro.umontreal.ca (lechon.iro.umontreal.ca [132.204.27.242]) by pruche.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id p1ILZIHV011569; Fri, 18 Feb 2011 16:35:18 -0500 Received: by faina.iro.umontreal.ca (Postfix, from userid 20848) id 257E9B411A; Fri, 18 Feb 2011 16:35:18 -0500 (EST) From: Stefan Monnier Message-ID: References: <87wrl423dm.fsf@stupidchicken.com> <83lj1dv1jy.fsf@gnu.org> <83fwrlutf4.fsf@gnu.org> Date: Fri, 18 Feb 2011 16:35:18 -0500 In-Reply-To: <83fwrlutf4.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 18 Feb 2011 19:46:55 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV3735=0 X-Spam-Score: -2.0 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.0 (--) > I also don't understand the "internal function" argument: it sounds > TRT to have a function that just fetches a symbol's value, without > signaling an error if it is unbound. Fsymbol_value, as it is now, is > clearly coded for interactive use, which this isn't. You mean "Lisp use" rather than "interactive", right? > In any case, if you want people to avoid these APIs, please explain > more why you dislike them, because so far it is utterly unclear, at > least to me. Basically Emacs variables provide get/set/letbind/unbind/boundp/make-local/makunbound and everything else is internal. Any code which is not directly related to implementing that functionality should go through those entry points, IMO. find_symbol_value is the least harmful of the internal functions, indeed, but it still requires extra care from the caller since it can return Qunbound which is a value which should never escape to Lisp code. Stefan From unknown Mon Aug 18 18:02:14 2025 X-Loop: help-debbugs@gnu.org Subject: bug#7840: SYMBOL_VALUE in terminal.c 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: Sat, 19 Feb 2011 08:07:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 7840 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Monnier Cc: cyd@stupidchicken.com, 7840@debbugs.gnu.org Reply-To: Eli Zaretskii Received: via spool by 7840-submit@debbugs.gnu.org id=B7840.129810278122777 (code B ref 7840); Sat, 19 Feb 2011 08:07:02 +0000 Received: (at 7840) by debbugs.gnu.org; 19 Feb 2011 08:06:21 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Pqhpd-0005vK-2R for submit@debbugs.gnu.org; Sat, 19 Feb 2011 03:06:21 -0500 Received: from mtaout22.012.net.il ([80.179.55.172]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Pqhpa-0005v6-FC for 7840@debbugs.gnu.org; Sat, 19 Feb 2011 03:06:19 -0500 Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0LGU00600UAXKP00@a-mtaout22.012.net.il> for 7840@debbugs.gnu.org; Sat, 19 Feb 2011 10:05:30 +0200 (IST) Received: from HOME-C4E4A596F7 ([77.124.140.24]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0LGU005KLUH3T4B0@a-mtaout22.012.net.il>; Sat, 19 Feb 2011 10:05:29 +0200 (IST) Date: Sat, 19 Feb 2011 10:05:36 +0200 From: Eli Zaretskii In-reply-to: X-012-Sender: halo1@inter.net.il Message-id: <8339nkv48f.fsf@gnu.org> References: <87wrl423dm.fsf@stupidchicken.com> <83lj1dv1jy.fsf@gnu.org> <83fwrlutf4.fsf@gnu.org> X-Spam-Score: -2.0 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.0 (--) > From: Stefan Monnier > Cc: cyd@stupidchicken.com, 7840@debbugs.gnu.org > Date: Fri, 18 Feb 2011 16:35:18 -0500 > > > I also don't understand the "internal function" argument: it sounds > > TRT to have a function that just fetches a symbol's value, without > > signaling an error if it is unbound. Fsymbol_value, as it is now, is > > clearly coded for interactive use, which this isn't. > > You mean "Lisp use" rather than "interactive", right? No, I mean "interactive", as "in the context of some interactive API call". By contrast, create_terminal runs during Emacs initialization, when there's no one to signal a useful error to. If there were a way to have Fsymbol_value return nil instead of signaling an error, or any other way to get at a symbol's value while suppressing errors, I'd use that. find_symbol_value looked just like such an interface. > > In any case, if you want people to avoid these APIs, please explain > > more why you dislike them, because so far it is utterly unclear, at > > least to me. > > Basically Emacs variables provide > get/set/letbind/unbind/boundp/make-local/makunbound and everything else > is internal. Any code which is not directly related to implementing > that functionality should go through those entry points, IMO. The entry points you mention are Lisp APIs. Low-level C code would need to jump through the hoops to use them safely, especially if it runs during periods when the Emacs session is not yet fully set up. > find_symbol_value is the least harmful of the internal functions, > indeed, but it still requires extra care from the caller since it can > return Qunbound which is a value which should never escape to Lisp code. Checking the value in advance with Funboundp needs the same level of care. And all Fsymbol_value does is call find_symbol_value and then signal an error if the result is Qunbound. I really don't see the difference, unless you are planning some significant change in the implementation of Fsymbol_value VSN. (Btw, I see several uses of `unbound' in Lisp files.) From unknown Mon Aug 18 18:02:14 2025 X-Loop: help-debbugs@gnu.org Subject: bug#7840: SYMBOL_VALUE in terminal.c Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 19 Feb 2011 21:15:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 7840 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: cyd@stupidchicken.com, 7840@debbugs.gnu.org Received: via spool by 7840-submit@debbugs.gnu.org id=B7840.129815009127511 (code B ref 7840); Sat, 19 Feb 2011 21:15:03 +0000 Received: (at 7840) by debbugs.gnu.org; 19 Feb 2011 21:14:51 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Pqu8h-00079f-5y for submit@debbugs.gnu.org; Sat, 19 Feb 2011 16:14:51 -0500 Received: from ironport2-out.teksavvy.com ([206.248.154.183] helo=ironport2-out.pppoe.ca) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Pqu8e-00079R-Uu for 7840@debbugs.gnu.org; Sat, 19 Feb 2011 16:14:49 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvsEAGbBX01MCqhK/2dsb2JhbACmOHS5UoVeBIUNjFuCdg X-IronPort-AV: E=Sophos;i="4.62,192,1297054800"; d="scan'208";a="92327527" Received: from 76-10-168-74.dsl.teksavvy.com (HELO pastel.home) ([76.10.168.74]) by ironport2-out.pppoe.ca with ESMTP/TLS/ADH-AES256-SHA; 19 Feb 2011 16:14:43 -0500 Received: by pastel.home (Postfix, from userid 20848) id 1070A58B97; Sat, 19 Feb 2011 16:14:43 -0500 (EST) From: Stefan Monnier Message-ID: References: <87wrl423dm.fsf@stupidchicken.com> <83lj1dv1jy.fsf@gnu.org> <83fwrlutf4.fsf@gnu.org> <8339nkv48f.fsf@gnu.org> Date: Sat, 19 Feb 2011 16:14:43 -0500 In-Reply-To: <8339nkv48f.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 19 Feb 2011 10:05:36 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.1 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.1 (--) > (Btw, I see several uses of `unbound' in Lisp files.) No worried, it's unrelated: the Qunbound symbol is not interned. Stefan