From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Reitter Newsgroups: gmane.emacs.devel Subject: Re: Carbon port: setting the creator code (patch) Date: Sun, 10 Jul 2005 12:16:10 +0100 Message-ID: References: <14EAA211-1A2F-4534-A504-867C51151104@inf.ed.ac.uk> <6EE47A44-098A-432C-9127-204E7A9BF1D3@gmail.com> <8F8C693C-FCF4-4C74-9473-2329578539DC@mac.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 (Apple Message framework v730) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1120994723 1588 80.91.229.2 (10 Jul 2005 11:25:23 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 10 Jul 2005 11:25:23 +0000 (UTC) Cc: emacs-devel ' Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jul 10 13:25:22 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DrZvu-0005IX-TV for ged-emacs-devel@m.gmane.org; Sun, 10 Jul 2005 13:25:15 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DrZxQ-0002ZM-N1 for ged-emacs-devel@m.gmane.org; Sun, 10 Jul 2005 07:26:48 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DrZwc-0002Lq-77 for emacs-devel@gnu.org; Sun, 10 Jul 2005 07:25:58 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DrZwU-0002If-Rs for emacs-devel@gnu.org; Sun, 10 Jul 2005 07:25:51 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DrZwU-0002GX-Db for emacs-devel@gnu.org; Sun, 10 Jul 2005 07:25:50 -0400 Original-Received: from [64.233.184.195] (helo=wproxy.gmail.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DrZuK-0005te-Nm for emacs-devel@gnu.org; Sun, 10 Jul 2005 07:23:36 -0400 Original-Received: by wproxy.gmail.com with SMTP id i31so686607wra for ; Sun, 10 Jul 2005 04:16:14 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:in-reply-to:references:mime-version:content-type:message-id:cc:content-transfer-encoding:from:subject:date:to:x-mailer; b=p5IfXD3BcEPaBszyYhJKELRPgcs5/SBOskAaENHVpM3F8Uf4Fthw13fM1rx4uk+9kBY1bkcg1g44zmJjy92PyxYjxoWTddmggDMiozw1aj+ulj8UPRv/FjDdudqvWhf5FEW2X5yzNjGWVY+twiao77cFVc6T/1ScMa6Zl116DBc= Original-Received: by 10.54.7.78 with SMTP id 78mr3136386wrg; Sun, 10 Jul 2005 04:16:14 -0700 (PDT) Original-Received: from ?129.215.174.81? ([129.215.174.81]) by mx.gmail.com with ESMTP id 8sm4643674wrl.2005.07.10.04.16.14; Sun, 10 Jul 2005 04:16:14 -0700 (PDT) In-Reply-To: <8F8C693C-FCF4-4C74-9473-2329578539DC@mac.com> Original-To: Steven Tamm X-Mailer: Apple Mail (2.730) 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:40721 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:40721 On 9 Jul 2005, at 17:08, Steven Tamm wrote: > Fine. You can do the same thing with osascript (although it's much > more annoying). I did that for a while, until I had a bug report from a user saying that it started Finder every time he saved a file. The AppleScript had to go through the Finder to set the creator code. Turns out that the user was running a replacement for Finder. Lesson learned: AppleScript is only a user-level API. :-( > The problem I have with it is that it will only set it to "EMAx", > it can't set the file type, it will modify the creator code of > already existing files, it doesn't test for UFS drives, etc. > http://developer.apple.com/technotes/tn/tn2017.html It is meant to modify the creator code of an existing file. I don't know if we need to check for UFS drives (works fine for me on SMB mounts; the OS takes care of creating metadata files which is not nice, but none of our business on application level). I don't know how to check for that - maybe you can add that. > Furthermore, Creator codes are being deprecated and replaced with > file extension based mapping or Universal Type Identifiers. > http://developer.apple.com/documentation/Carbon/Conceptual/ > understanding_utis/ Yes they are and that is known, but users wanted it and I hear it plays a role in Spotlight. (I don't know anything about that in detail.) > That doesn't mean we shouldn't add the feature to "set a creator > code", but it should take in the code as a parameter (a four > character string or a 32-bit number). > (mac-set-creator-type "EMAx") > (mac-set-file-type "TEXT") Yes, done. See next message. - D