all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Peter Dyballa <Peter_Dyballa@Web.DE>
To: Barrie <barriehie@bluebottle.com>
Cc: help-gnu-emacs@gnu.org
Subject: Re: TRAMP and faces
Date: Sat, 5 Dec 2009 12:21:41 +0100	[thread overview]
Message-ID: <BB200CDE-C911-4004-AD3D-539140AA9673@Web.DE> (raw)
In-Reply-To: <284Sm.64479$rE5.24592@newsfe08.iad>


Am 04.12.2009 um 09:55 schrieb Barrie:

> What I'm looking for is a way to make the background of the mode- 
> line red
> when running a buffer through tramp.
>


Here is a message cited from last year (2008-11-13):

Nordlöw> I would like to visually hint that I am editing a buffer as
Nordlöw> root (using TRAMP) by setting the background to a slightly more
Nordlöw> red color. What hooks are involved?

Exemple to change the header line :

(defun my-tramp-header-line-function ()
  (when (string-match "^/su\\(do\\)?:" default-directory)
    (setq header-line-format
	  (format-mode-line "----- THIS BUFFER IS VISITED WITH ROOT  
PRIVILEGES -----"
			    'font-lock-warning-face))))

(add-hook 'find-file-hooks 'my-tramp-header-line-function)
(add-hook 'dired-mode-hook 'my-tramp-header-line-function)


You can add more...

--
Greetings

   Pete

      _o    o         o   o
    _<<     \\_/\_,   \\_ \\_/\_,
   (*)/(*) (*)   (*) (*) `-    (*)





  reply	other threads:[~2009-12-05 11:21 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-03 23:12 TRAMP and faces Barrie
2009-12-04  0:24 ` Barrie
2009-12-04  8:55 ` Barrie
2009-12-05 11:21   ` Peter Dyballa [this message]
     [not found]   ` <mailman.12272.1260012110.2239.help-gnu-emacs@gnu.org>
2009-12-05 13:24     ` Barrie
2009-12-04  9:04 ` Peter Dyballa
     [not found] ` <mailman.12162.1259917514.2239.help-gnu-emacs@gnu.org>
2009-12-04  9:21   ` Barrie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=BB200CDE-C911-4004-AD3D-539140AA9673@Web.DE \
    --to=peter_dyballa@web.de \
    --cc=barriehie@bluebottle.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.