Having spent €39 on TextMate and a similar amount on Transmit, I felt quite happy with my development environment. However, once an emacs user, always an emacs user (and it doesn't help that TextMate has mediocre python support, either).
I still like Transmit, though, and wanted to use it from within emacs. After some fumbling and gnashing of teeth, I came up with this solution. Note that this requires a registered version of Transmit ~2.5 or newer.
Here's what my .emacs file looks like:
;; Un-coment this line if you want to use Transmit with every save
;;(add-hook 'after-save-hook 'save-with-transmit)
(defun save-with-transmit () (interactive)
(cond
(
;; The line below is optional, and can safely be removed.
;; The line assures that the function is valid only in python mode
(and (derived-mode-p 'python-mode))
(save-buffer)
(start-process-shell-command "transmit" nil
"osascript" "~/bin/TransmitFile.scpt"
(shell-quote-argument (buffer-file-name))))))
(global-set-key "\C-x\C-t" 'save-with-transmit)
Save the following AppleScript to your user's bin directory, and name it TransmitFile.scpt:
on run argv
tell application "Transmit" to open POSIX file argv as alias
tell application "X11" to activate
end run
I guess the ..."X11" to activate bit makes this a 10.4 only hint.
Comments (0)
Mac OS X Hints
http://hints.macworld.com/article.php?story=20060212105029885