Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

10.4: Use Transmit with X11 emacs UNIX
Tiger only hintHaving 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.

Now, every time you hit Control-x/Control-t, the current buffer will be saved locally and then sent to Transmit. If Transmit's Dock Send is enabled for the folder in which the file is located, then it will be uploaded to your server.

Could i have done the same using scp and ssh-keys? The short answer is yes, but I wanted to use Transmit.

As a bit of an additional hint, if you want a really cool editor environment for emacs, check out ECB. This blog entry provides aditional info on ECB.
    •    
  • Currently 1.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (1 vote cast)
 
[8,186 views]  

10.4: Use Transmit with X11 emacs | 0 comments | Create New Account
Click here to return to the '10.4: Use Transmit with X11 emacs' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.