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



_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

Reply via email to