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: C-g crash in C-x C-f (OSX Lion) Date: Tue, 27 Dec 2011 10:14:53 +0900 Organization: Faculty of Science, Chiba University Message-ID: References: <4EEB48B2.9090602@swipnet.se> <83liqc1tac.fsf@gnu.org> <83fwgk1atk.fsf@gnu.org> <4EEBE0DC.1050803@cs.ucla.edu> <4EEF5DF5.3030506@swipnet.se> <9E637EAB-A0C5-421B-9CCA-71C41442AF52@gmail.com> <6F793ECE-97CA-4CB9-9F7F-C141FE825E3F@swipnet.se> <61A2186E-2D7D-419B-8813-D8ACB733DE70@swipnet.se> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1324948512 12726 80.91.229.12 (27 Dec 2011 01:15:12 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 27 Dec 2011 01:15:12 +0000 (UTC) Cc: Carsten Mattner , Emacs developers To: Jan =?ISO-8859-1?Q?Dj=E4rv?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Dec 27 02:15:07 2011 Return-path: Envelope-to: ged-emacs-devel@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 1RfLdC-0005o5-I7 for ged-emacs-devel@m.gmane.org; Tue, 27 Dec 2011 02:15:06 +0100 Original-Received: from localhost ([::1]:44343 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RfLdB-0001hu-Lc for ged-emacs-devel@m.gmane.org; Mon, 26 Dec 2011 20:15:05 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:36366) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RfLd7-0001gf-Pn for emacs-devel@gnu.org; Mon, 26 Dec 2011 20:15:03 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RfLd6-0006zN-6N for emacs-devel@gnu.org; Mon, 26 Dec 2011 20:15:01 -0500 Original-Received: from mathmail.math.s.chiba-u.ac.jp ([133.82.132.2]:52479) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RfLd5-0006z5-Nz for emacs-devel@gnu.org; Mon, 26 Dec 2011 20:15:00 -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 09AD4C055D; Tue, 27 Dec 2011 10:14:54 +0900 (JST) In-Reply-To: <61A2186E-2D7D-419B-8813-D8ACB733DE70@swipnet.se> 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-Received-From: 133.82.132.2 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:146976 Archived-At: >>>>> On Mon, 26 Dec 2011 16:31:12 +0100, Jan Dj=E4rv = said: >>> Are you saying the Cocoa port runs lisp inside read_socket_hook? >>> Can you show where that is done? >>=20 >> I wrote about that in >> http://lists.gnu.org/archive/html/emacs-devel/2009-01/msg00952.html >> : >>=20 >> In the platforms other than the Cocoa/GNUstep port, menu bar is >> uniformly activated by the x_activate_menubar call in >> kbd_buffer_get_event, which is called from read_char. However, the >> Cocoa/GNUstep port activates the menu bar and starts mouse tracking >> in the context of read_socket_hook, which is supposed to be called >> from fairly random states of the Lisp interpreter. >>=20 >> The current NS port is trying to minimize the problem by >> disallowing Lisp evaluations from QUIT and UNBLOCK_INPUT (grep >> `handling_signal' in the NS specific code including those enclosed >> with #ifdef HAVE_NS). I don't know if that could avoid all the >> problems, or some of unsolved problems on the NS port are caused by >> this. Anyway, I would choose keeping the fundamental design >> principle and did so in the Mac port. >>=20 >> Allowing menu bar activation while disallowing Lisp evaluations in >> read_socket_hook from QUIT/UNBLOCK_INPUT also causes a bogus menu >> bar problem: one can start menu bar tracking even during the >> evaluation of (while t), whereas the contents of the `Buffers' menu >> would possibly be outdated. > This can be fixed in Cocoa, but OSX 10.5 or later is required (AFAIK > anyway). That'll be good. When I first tried porting the GUI part to Cocoa, the newest version of Mac OS X was 10.4, so I couldn't use the way you are talking about. (It was a bit after the announcement that Carbon GUI will not support 64-bit on coming Mac OS X 10.5.) Even after the 10.5 release, I couldn't have dropped the support for the older versions. YAMAMOTO Mitsuharu mituharu@math.s.chiba-u.ac.jp