From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: YAMAMOTO Mitsuharu Newsgroups: gmane.emacs.devel Subject: Re: Emacs Mac port Date: Thu, 12 Oct 2017 17:12:17 +0900 Organization: Faculty of Science, Chiba University Message-ID: References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-Trace: blaine.gmane.org 1507795952 23692 195.159.176.226 (12 Oct 2017 08:12:32 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 12 Oct 2017 08:12:32 +0000 (UTC) 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) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Oct 12 10:12:27 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e2YbQ-00053m-G5 for ged-emacs-devel@m.gmane.org; Thu, 12 Oct 2017 10:12:24 +0200 Original-Received: from localhost ([::1]:44239 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e2YbX-0005Eb-Jr for ged-emacs-devel@m.gmane.org; Thu, 12 Oct 2017 04:12:31 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51777) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e2YbR-0005EV-24 for emacs-devel@gnu.org; Thu, 12 Oct 2017 04:12:26 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e2YbM-0007gA-N9 for emacs-devel@gnu.org; Thu, 12 Oct 2017 04:12:25 -0400 Original-Received: from mathmail.math.s.chiba-u.ac.jp ([133.82.132.2]:56375) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e2YbM-0007dB-2g for emacs-devel@gnu.org; Thu, 12 Oct 2017 04:12:20 -0400 Original-Received: from fermat1.math.s.chiba-u.ac.jp (fermat [192.168.32.10]) by mathmail.math.s.chiba-u.ac.jp (Postfix) with ESMTP id 388AAF0902 for ; Thu, 12 Oct 2017 17:12:17 +0900 (JST) (envelope-from mituharu@math.s.chiba-u.ac.jp) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 133.82.132.2 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.devel:219404 Archived-At: The bare development branch of the Mac port is now based on Emacs 26.0.90 pretest: https://bitbucket.org/mituharu/emacs-mac.git The branch name is "work". It should be considered as experimental/hackers-only. At the moment, the new frame parameters `parent-frame' and `undecorated' are not supported yet. I have some premature code internally, but not included in the repository above. In order to support concurrency on Emacs 26 properly, I've redesigned the `select' emulation code. It runs the Lisp REPL in a non-main thread, so the main thread is dedicated to GUI tasks, which might be requested from multiple Lisp threads. The GUI and Lisp threads run mostly cooperatively (i.e., do not run simultaneously) except in the `select' emulation. Note that the variable `main_thread_id' in sysdep.c no longer corresponds to the "main thread" in a usual sense. Thanks to this new design, all the following examples can work without hang or crash: (make-thread (lambda () (let (last-nonmenu-event) (setq test (y-or-n-p-with-timeout "test" 2 'timeout))))) (make-thread 'buffer-menu-open) (make-thread (lambda () (let (last-nonmenu-event) (call-interactively 'find-file)))) (make-thread (lambda () (setq test (x-select-font)))) In addition to the usual configure options for debugging, I'd recommend using "the Main Thread Checker" introduced in Xcode 9 by setting the environment variable DYLD_INSERT_LIBRARIES to /Applications/Xcode.app/Contents/Developer/usr/lib/libMainThreadChecker.dylib If you are using lldb, then you can set it as follows: (lldb) settings set target.env-vars DYLD_INSERT_LIBRARIES=/Applications/Xcode.app/Contents/Developer/usr/lib/libMainThreadChecker.dylib YAMAMOTO Mitsuharu mituharu@math.s.chiba-u.ac.jp