emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Carbon port: setting the creator code (patch)


From: David Reitter
Subject: Re: Carbon port: setting the creator code (patch)
Date: Sat, 9 Jul 2005 14:06:09 +0100

On 9 Jul 2005, at 04:04, Steven Tamm wrote:

Sorry for the delay in reply, but it seems to me that using SetFile would be easier, and more flexible.

(defun mac-set-creator-code-for-file ()
(call-process shell-file-name nil nil t shell-command-switch (concat "/Developer/Tools/SetFile -c EMAx " buffer-file-name))
)
(add-hook 'after-save-hook 'mac-set-creator-code-for-file)


SetFile is only available if the Developer Tools are installed. That is not necessarily the case, and the other code doesn't introduce that dependency. The correct way to set file metadata is to go through Carbon, in this case. That's what the API is for...

-Dave





reply via email to

[Prev in Thread] Current Thread [Next in Thread]