Michael Albinus <[EMAIL PROTECTED]> writes: Hi Michael,
>> I'd like to have tramp buffers prefixed with the current method. For >> example if I open /ets/hosts with the sudo method, the buffer should >> be named "sudo:hosts" instead of only "hosts" so that I can easily >> use the usual buffer completion to distinguish between normal and >> tramp buffers. >> >> How can I achieve that? > > (add-hook 'find-file-hook > '(lambda () > (when (file-remote-p (buffer-file-name)) > (rename-buffer > (format "%s:%s" > (file-remote-p (buffer-file-name) 'method) > (buffer-name)) > 'unique)))) Thanks, that works like a charm. Bye, Tassilo -- No person, no idea, and no religion deserves to be illegal to insult, not even the Church of Emacs. (Richard M. Stallman) _______________________________________________ Tramp-devel mailing list [email protected] http://lists.gnu.org/mailman/listinfo/tramp-devel
