On 23 May 2001, Kai [iso-8859-1] Großjohann wrote:

> On Wed, 23 May 2001, Chris Majewski wrote:
> 
> > Cool, that worked. I had to put (require 'tramp-util) in my .emacs.
> > Now, how can I tell C-x C-e to run tramp-compile in a remote buffer,
> > and compile otherwise?
> 
> (defun cm-compile-maybe-remote ()
>   (interactive)
>   (if (and (buffer-file-name)
>            (tramp-tramp-file-p (expand-file-name (buffer-file-name))))
>       (call-interactively 'tramp-compile)
>     (call-interactively 'compile)))
> 
> Untested.  

Really? What do you use?

> Does it work? 

No. buffer-file-name returns nil in a remote dired buffer.

-chris

Reply via email to