From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Paul R Newsgroups: gmane.emacs.help Subject: Re: Red background color when editing a file as root (using TRAMP) Date: Fri, 14 Nov 2008 10:06:02 +0100 Message-ID: <87bpwi65j9.fsf@gmail.com> References: <9c5c3657-7b90-4dd4-8f34-0b97cef109c6@n33g2000pri.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1226653603 14139 80.91.229.12 (14 Nov 2008 09:06:43 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 14 Nov 2008 09:06:43 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: =?utf-8?Q?Nordl=C3=B6w?= Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Nov 14 10:07:44 2008 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1L0ueT-0007FP-LU for geh-help-gnu-emacs@m.gmane.org; Fri, 14 Nov 2008 10:07:41 +0100 Original-Received: from localhost ([127.0.0.1]:42250 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L0udL-0005uD-M7 for geh-help-gnu-emacs@m.gmane.org; Fri, 14 Nov 2008 04:06:31 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L0ud2-0005tw-84 for help-gnu-emacs@gnu.org; Fri, 14 Nov 2008 04:06:12 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L0ud0-0005tb-NV for help-gnu-emacs@gnu.org; Fri, 14 Nov 2008 04:06:11 -0500 Original-Received: from [199.232.76.173] (port=52317 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L0ud0-0005tU-I5 for help-gnu-emacs@gnu.org; Fri, 14 Nov 2008 04:06:10 -0500 Original-Received: from fk-out-0910.google.com ([209.85.128.190]:34925) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1L0ud0-00057V-4T for help-gnu-emacs@gnu.org; Fri, 14 Nov 2008 04:06:10 -0500 Original-Received: by fk-out-0910.google.com with SMTP id 18so1430590fkq.10 for ; Fri, 14 Nov 2008 01:06:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:references :date:in-reply-to:message-id:user-agent:mime-version:content-type :content-transfer-encoding; bh=TXl1ucB2rtzegaeF+pujub5lTTZkSTg6Jk4/QzFAzJE=; b=oSecDoCdsltW4mgBcZj+xxIvZvm4J5mEAmzoKwL9tNtEDKqSvx7jNN6bEgc4QXvANT LtpJcKAtCIKQM7VngAU77IFAx5Lij8zyqgTvqlfIAPC7bEzR7uomXVNk0oeoXnlieIUv 1JGPJWKvJ4r07cDxZfO3d1A1wwHcC2B1qLIhg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type:content-transfer-encoding; b=xidkdhqhsEvqzWuRNblXk3GuJ4CbfzXpndkIUUlLNxf2dZgZWeQ5fbQEtpVERJCDyd UyGSV0YzLezRFoMg/T2h3UMyi/7/VTQfvWwv2r4hhsnecEj7TqkmHCEh8GF32X4egxvx mzCiKc69aZx59jXV6vVClk4j16zNhwKEvuo7M= Original-Received: by 10.181.226.5 with SMTP id d5mr187589bkr.116.1226653567671; Fri, 14 Nov 2008 01:06:07 -0800 (PST) Original-Received: from ubuT42 (pdc35-1-82-242-132-111.fbx.proxad.net [82.242.132.111]) by mx.google.com with ESMTPS id z15sm382180fkz.16.2008.11.14.01.06.04 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 14 Nov 2008 01:06:05 -0800 (PST) In-Reply-To: <9c5c3657-7b90-4dd4-8f34-0b97cef109c6@n33g2000pri.googlegroups.com> (=?utf-8?Q?=22Nordl=C3=B6w=22's?= message of "Thu, 13 Nov 2008 22:48:26 -0800 (PST)") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:59770 Archived-At: On Thu, 13 Nov 2008 22:48:26 -0800 (PST), Nordl=C3=B6w said: Nordl=C3=B6w> I would like to visually hint that I am editing a buffer as Nordl=C3=B6w> root (using TRAMP) by setting the background to a slightly mo= re Nordl=C3=B6w> 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) --=20 Paul