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: Carbon: resizing a frame on wrong "space" Date: Sun, 07 Sep 2008 12:46:02 +0900 Organization: Faculty of Science, Chiba University Message-ID: References: <2282B3B4-D844-4E26-BB94-9F79EEA2E847@gmail.com> 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: ger.gmane.org 1220759229 5471 80.91.229.12 (7 Sep 2008 03:47:09 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 7 Sep 2008 03:47:09 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Sep 07 05:48:03 2008 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.50) id 1KcBFA-00068b-9o for ged-emacs-devel@m.gmane.org; Sun, 07 Sep 2008 05:47:20 +0200 Original-Received: from localhost ([127.0.0.1]:46989 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KcBEA-0008LX-Hz for ged-emacs-devel@m.gmane.org; Sat, 06 Sep 2008 23:46:18 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KcBE4-0008Fb-Ab for emacs-devel@gnu.org; Sat, 06 Sep 2008 23:46:12 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KcBDz-00089Y-TF for emacs-devel@gnu.org; Sat, 06 Sep 2008 23:46:10 -0400 Original-Received: from [199.232.76.173] (port=42260 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KcBDz-00089E-O6 for emacs-devel@gnu.org; Sat, 06 Sep 2008 23:46:07 -0400 Original-Received: from ntp.math.s.chiba-u.ac.jp ([133.82.132.2]:65279 helo=mathmail.math.s.chiba-u.ac.jp) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KcBDz-0000oG-1w for emacs-devel@gnu.org; Sat, 06 Sep 2008 23:46:07 -0400 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 305812C58 for ; Sun, 7 Sep 2008 12:46:02 +0900 (JST) In-Reply-To: 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-kernel: by monty-python.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:103622 Archived-At: >>>>> On Fri, 29 Feb 2008 11:40:10 +0900, William Xu said: > YAMAMOTO Mitsuharu writes: >> FYI, it does not happen with the Carbon+AppKit port. > I have seen you mentioned this port several times, but never find it > through google. Seems not in CVS repo either? So where can I get it? Now it is publicly available from ftp://ftp.math.s.chiba-u.ac.jp/emacs/emacs-22.3-appkit-1.0.tar.gz Below is the contents its README file: 1. What's this? This is "Carbon+AppKit port" addition to GNU Emacs 22.3. The Carbon+AppKit port of GNU Emacs 22.3 is a port of the Carbon port (aka "Carbon Emacs", don't confuse it with "Carbon Emacs Package") that is a part of the official GNU Emacs 22 distribution and provides native GUI support for Mac OS. The two ports differ in the GUI implementation basis: the Carbon port uses Carbon HIToolbox, but the Carbon+AppKit port uses the Cocoa Application Kit framework (AppKit). The Carbon+AppKit port inherits the code of the non-GUI part of the Carbon port, such as drawing, font and image handling. So in this sense, the Carbon+AppKit port can be regarded as a variant of the Carbon port. Obviously, this is not a backport of the Cocoa/GNUstep port (aka "Emacs.app"). The Carbon+AppKit port shares mostly the same features with the Carbon port including the following: * C-g handling You can quit (while t) and (shell-command "sleep 100"). * Emulation of `select' without periodic polling It doesn't use CPU time while the Lisp interpreter is idle and waiting for some events to come, even with subprocesses or network connections. * Graceful termination If you try logout/shutdown/reboot while leaving a file-visiting buffer modified and unsaved, a popup window appears for confirmation. If you cancel the termination of Emacs, the whole logout/shutdown/reboot process is also canceled immediately. * Apple Event handling One can define Apple Event handlers at the Lisp level. Actually, graceful termination above is an instance of Lisp-level Apple Event handling. Another example is "Get URL" handler that enables us to invoke the mailer you customized with `mail-user-agent', e.g., $ osascript -e 'tell application "Emacs" to open location "mailto:foo@example.com"' If you set Emacs as the default mailer via Mail.app preference, the Emacs mailer will set up a draft buffer when you click a mailto: link in a Web browser. * DictionaryService support (10.4 and later) You can look up a word under the mouse pointer in the selected window by typing Command-Control-D. Basically, the Carbon+AppKit port doesn't add new features per se, except for the following two aspects: * Resolution independence (10.4 and later, 10.5 recommended) Scaling works in Framework-Scaled Mode as opposed to (blurry) Magnified Mode for the Carbon port. You may want to disable QuickDraw Text, which is incompatible with Framework-Scaled Mode, by adding "-DUSE_QUICKDRAW=0" to CFLAGS on compilation. * 64-bit (10.5, MAY CRASH, see below) You can build and run a 64-bit binary with GUI support by specifying CC='gcc -m64' on configure. !! Caution !! The resulting binary will crash when you try to display particular characters such as combining diacritics. This is due to a bug in 64-bit ATSUI. Apple says it won't be fixed but maybe you can vote for the fix of this bug (rdar://problem/5578675) at the Apple Bug Reporter. 2. Build instruction a. Untar the official GNU Emacs 22.3 distribution tarball. Let EMACS_SOURCE_TOP be the top directory of the source tree. b. Apply the patch `patch-carbon+appkit' to the source tree. c. Copy `lisp/term/mac-win.elc' to `EMACS_SOURCE_TOP/lisp/term/mac-win.elc' by overriding the latter. (Alternatively, you can bytecompile `EMACS_SOURCE_TOP/lisp/term/mac-win.el' that was patched in the previous step.) d. Copy `src/macappkit.h' and `src/macappkit.m' to `EMACS_SOURCE_TOP/src'. e. Build as usual with adding "--with-appkit" as a configure option. Enjoy, YAMAMOTO Mitsuharu mituharu@math.s.chiba-u.ac.jp