emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Tramp with GUD broken on trunk?


From: Michael Albinus
Subject: Re: Tramp with GUD broken on trunk?
Date: Wed, 11 Jul 2007 09:58:08 +0200
User-agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.3 (hpux)

Nick Roberts <address@hidden> writes:

> It may be a bit of a hack but you may be able to generalise it.

I'll check tonight.

> Incidentally, I think something should display in the mode-line to say that
> the default-directory is remote.  Quite often there are similar files on
> both machines and it's easy to forget which one you're looking at.

>From the Tramp FAQ:

   * I'ld like to see a host indication in the mode line when I'm
     remote

     The following code has been tested with GNU Emacs 22.  You
     should put it into your `~/.emacs':

          (defconst my-mode-line-buffer-identification
            (list
             '(:eval
               (let ((host-name
                    (if (file-remote-p default-directory)
                        (tramp-file-name-host
                         (tramp-dissect-file-name default-directory))
                      (system-name))))
                 (if (string-match "^[^0-9][^.]*\\(\\..*\\)" host-name)
                   (substring host-name 0 (match-beginning 1))
                 host-name)))
             ": %12b"))

          (setq-default
           mode-line-buffer-identification
           my-mode-line-buffer-identification)

          (add-hook
           'dired-mode-hook
           '(lambda ()
              (setq
               mode-line-buffer-identification
               my-mode-line-buffer-identification)))

Maybe it shall be enabled by default?

Best regards, Michael.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]