From: Nordlöw <per.nordlow@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: Red background color when editing a file as root (using TRAMP)
Date: Fri, 14 Nov 2008 03:04:13 -0800 (PST) [thread overview]
Message-ID: <35441d76-c574-4825-80eb-b7c12ede2be2@q30g2000prq.googlegroups.com> (raw)
In-Reply-To: mailman.337.1226653574.26697.help-gnu-emacs@gnu.org
On 14 Nov, 10:06, Paul R <paul.r...@gmail.com> wrote:
> On Thu, 13 Nov 2008 22:48:26 -0800 (PST), Nordlöw <per.nord...@gmail.com> said:
>
> 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)
>
> --
> Paul
How do I buffer-locally set the background color?
/Nordlöw
next prev parent reply other threads:[~2008-11-14 11:04 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-14 6:48 Red background color when editing a file as root (using TRAMP) Nordlöw
2008-11-14 9:06 ` Paul R
[not found] ` <mailman.337.1226653574.26697.help-gnu-emacs@gnu.org>
2008-11-14 11:04 ` Nordlöw [this message]
2008-11-14 13:10 ` Kevin Rodgers
[not found] ` <mailman.348.1226668233.26697.help-gnu-emacs@gnu.org>
2008-11-14 13:59 ` Andreas Politz
2008-11-15 10:14 ` Johan Bockgård
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=35441d76-c574-4825-80eb-b7c12ede2be2@q30g2000prq.googlegroups.com \
--to=per.nordlow@gmail.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.