From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: YAMAMOTO Mitsuharu Newsgroups: gmane.emacs.devel Subject: Re: GDB on Mac is Broken Date: Sat, 13 Mar 2010 15:58:11 +0900 Organization: Faculty of Science, Chiba University Message-ID: References: <19354.32067.21297.436863@fencepost.gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-Trace: dough.gmane.org 1268463515 24601 80.91.229.12 (13 Mar 2010 06:58:35 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 13 Mar 2010 06:58:35 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Mar 13 07:58:30 2010 Return-path: Envelope-to: ged-emacs-devel@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 1NqLIr-00078R-KK for ged-emacs-devel@m.gmane.org; Sat, 13 Mar 2010 07:58:29 +0100 Original-Received: from localhost ([127.0.0.1]:58299 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NqLIr-0007Du-6W for ged-emacs-devel@m.gmane.org; Sat, 13 Mar 2010 01:58:29 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NqLIj-0007Dc-HK for emacs-devel@gnu.org; Sat, 13 Mar 2010 01:58:22 -0500 Original-Received: from [140.186.70.92] (port=37956 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NqLIg-0007DU-65 for emacs-devel@gnu.org; Sat, 13 Mar 2010 01:58:19 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1NqLId-0004wM-RM for emacs-devel@gnu.org; Sat, 13 Mar 2010 01:58:18 -0500 Original-Received: from mathmail.math.s.chiba-u.ac.jp ([133.82.132.2]:64860) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NqLId-0004w8-Br for emacs-devel@gnu.org; Sat, 13 Mar 2010 01:58:15 -0500 Original-Received: from church.math.s.chiba-u.ac.jp (church [133.82.132.36]) by mathmail.math.s.chiba-u.ac.jp (Postfix) with ESMTP id 3D50CC055D for ; Sat, 13 Mar 2010 15:58:11 +0900 (JST) In-Reply-To: <19354.32067.21297.436863@fencepost.gnu.org> User-Agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (=?ISO-8859-4?Q?Shij=F2?=) APEL/10.6 Emacs/22.3 (sparc-sun-solaris2.8) MULE/5.0 (SAKAKI) X-detected-operating-system: by eggs.gnu.org: NetBSD 3.0 (DF) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:121886 Archived-At: >>>>> On Fri, 12 Mar 2010 12:43:31 -0500, Glenn Morris said: > This is a duplicate of > http://debbugs.gnu.org/cgi/bugreport.cgi?bug=5712 > but presumably refers to GNU Emacs now. As expected, reproducibility on the Mac port could contribute to show whether a bug was NS-specific or not. The related difference between Emacs 22, on which the completion works, and Emacs 23 seems to be: 1. The default value of default-process-coding-system. 2. A change in comint-exec-1. For the first one, the value is (mule-utf-8 . mule-utf-8) in Emacs 22, and (utf-8-unix . utf-8-unix) in Emacs 23 on Mac OS X 10.6. The difference in the EOL conversion comes from the following code in mule-cmd.el: (let ((output-coding ;; When bootstrapping, coding-systems are not defined yet, so ;; we need to catch the error from check-coding-system. (condition-case nil (coding-system-change-text-conversion (car default-process-coding-system) 'undecided) (coding-system-error 'undecided))) (input-coding (condition-case nil (coding-system-change-text-conversion (cdr default-process-coding-system) 'iso-latin-1) (coding-system-error 'iso-latin-1)))) (setq default-process-coding-system (cons output-coding input-coding))) The value of default-coding-system is nil as of bootstrapping, and the following snippet evaluates to `undecided' on Emacs 22, but `undecided-unix' on Emacs 23. (condition-case nil (coding-system-change-text-conversion (car default-process-coding-system) 'undecided) (coding-system-error 'undecided)) This difference in turn comes from that of (coding-system-eol-type nil), which evaluates to nil on Emacs 22 and 0 on Emacs 23. The second one is the first hunk in http://lists.gnu.org/archive/html/emacs-devel/2008-03/msg00322.html 2008-03-04 Kenichi Handa * comint.el (comint-exec-1): Don't change the coding-system for decoding to dos-like EOL. Index: comint.el =================================================================== RCS file: /cvsroot/emacs/emacs/lisp/comint.el,v retrieving revision 1.373 diff -c -r1.373 comint.el *** comint.el 22 Jan 2008 23:53:43 -0000 1.373 --- comint.el 4 Mar 2008 11:41:44 -0000 *************** *** 800,811 **** (let ((coding-systems (process-coding-system proc))) (setq decoding (car coding-systems) encoding (cdr coding-systems))) - ;; If start-file-process decided to use some coding system for decoding - ;; data sent from the process and the coding system doesn't - ;; specify EOL conversion, we had better convert CRLF to LF. - (if (vectorp (coding-system-eol-type decoding)) - (setq decoding (coding-system-change-eol-conversion decoding 'dos) - changed t)) ;; Even if start-file-process left the coding system for encoding data ;; sent from the process undecided, we had better use the same one ;; as what we use for decoding. But, we should suppress EOL I'm not sure which side should be changed, gud or comint with coding-system functions. At least, the above differences explain why completion in *gdb* buffer behaves differently between Emacs 22 and 23. YAMAMOTO Mitsuharu mituharu@math.s.chiba-u.ac.jp