From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: YAMAMOTO Mitsuharu Newsgroups: gmane.emacs.bugs Subject: bug#1367: #1367 - 23.0.60; Mailto service won't work - Emacs bug report logs Date: Sat, 22 Nov 2008 10:36:09 +0900 Organization: Faculty of Science, Chiba University Message-ID: References: <9195CB25-E9D7-4C36-99BA-D59160AAB662@gmail.com> Reply-To: YAMAMOTO Mitsuharu , 1367@emacsbugs.donarmstrong.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 1227318640 26826 80.91.229.12 (22 Nov 2008 01:50:40 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 22 Nov 2008 01:50:40 +0000 (UTC) Cc: Harald Hanche-Olsen To: Adrian Robert , 1367@emacsbugs.donarmstrong.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Nov 22 02:51:41 2008 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1L3heu-0007ee-Ey for geb-bug-gnu-emacs@m.gmane.org; Sat, 22 Nov 2008 02:51:40 +0100 Original-Received: from localhost ([127.0.0.1]:41385 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L3hdl-0001aM-Bn for geb-bug-gnu-emacs@m.gmane.org; Fri, 21 Nov 2008 20:50:29 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L3hdh-0001a7-Lq for bug-gnu-emacs@gnu.org; Fri, 21 Nov 2008 20:50:25 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L3hdf-0001Zu-7f for bug-gnu-emacs@gnu.org; Fri, 21 Nov 2008 20:50:24 -0500 Original-Received: from [199.232.76.173] (port=35885 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L3hdf-0001Zr-03 for bug-gnu-emacs@gnu.org; Fri, 21 Nov 2008 20:50:23 -0500 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:48648) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1L3hde-0006AU-UJ for bug-gnu-emacs@gnu.org; Fri, 21 Nov 2008 20:50:23 -0500 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id mAM1o9em018462; Fri, 21 Nov 2008 17:50:10 -0800 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id mAM1j3rd016415; Fri, 21 Nov 2008 17:45:03 -0800 X-Loop: don@donarmstrong.com Resent-From: YAMAMOTO Mitsuharu Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs , don@donarmstrong.com Resent-Date: Sat, 22 Nov 2008 01:45:03 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 1367 X-Emacs-PR-Package: emacs,ns X-Emacs-PR-Keywords: Original-Received: via spool by 1367-submit@emacsbugs.donarmstrong.com id=B1367.122731777415028 (code B ref 1367); Sat, 22 Nov 2008 01:45:03 +0000 Original-Received: (at 1367) by emacsbugs.donarmstrong.com; 22 Nov 2008 01:36:14 +0000 Original-Received: from mathmail.math.s.chiba-u.ac.jp (ntp.math.s.chiba-u.ac.jp [133.82.132.2]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id mAM1aAOp015020 for <1367@emacsbugs.donarmstrong.com>; Fri, 21 Nov 2008 17:36:12 -0800 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 596FC2C45; Sat, 22 Nov 2008 10:36:09 +0900 (JST) In-Reply-To: <9195CB25-E9D7-4C36-99BA-D59160AAB662@gmail.com> User-Agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 =?UTF-8?Q?(Shij=C5=8D)?= APEL/10.6 Emacs/22.3 (sparc-sun-solaris2.8) MULE/5.0 (SAKAKI) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Resent-Date: Fri, 21 Nov 2008 20:50:24 -0500 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:22576 Archived-At: >>>>> On Fri, 21 Nov 2008 16:00:47 -0500, Adrian Robert said: > On the other hand, if the mailto: mapping results in some random > applescript command being sent to Emacs, then what is needed is an > enhancement. I am unfamiliar with how standardized the various > applescript things a well-behaved OS X application should respond to > is. Is there documentation on this somewhere? Also, I don't know > if you are familiar with Cocoa programming, but I wonder if there is > an NSApp delegate method or a notification that could be registered > for, avoiding the need to parse applescript. (This is the way, > e.g., double-clicking associated files in the Finder can open them > in Emacs.app.) You don't need to "parse" AppleScript. What Carbon or Cocoa applications receive is an Apple event: http://developer.apple.com/documentation/Cocoa/Conceptual/ScriptableCocoaApplications/SApps_handle_AEs/chapter_11_section_4.html Core functionalities such as "open documents" and "quit application" also send some corresponding Apple events, and Cocoa applications usually handle them via some application delegate methods. http://developer.apple.com/documentation/Cocoa/Conceptual/ScriptableCocoaApplications/SApps_handle_AEs/chapter_11_section_3.html > The Carbon port of emacs did do applescript parsing, but I was never > convinced that it was sufficiently "core" functionality to bring to > the Cocoa port (given the bloat involved). Though nowadays with > DBUS in the X11 emacs the case is more compelling. Unlike Cocoa, Carbon applications need to handle the "core functionalities" via Apple event handers. In the original Carbon Emacs by Andrew Choi, the handlers were hard-coded C routines. I lifted them to the Lisp-level so I can provide graceful termination(*) in response to the "quit application" event. The mailto: URL support via "get URL" handler in the Carbon port is a bonus that came for free by its general Lisp-level Apple event handling mechanism. (*) 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. YAMAMOTO Mitsuharu mituharu@math.s.chiba-u.ac.jp