From: Paul R <paul.r.ml@gmail.com>
To: Nordlöw <per.nordlow@gmail.com>
Cc: help-gnu-emacs@gnu.org
Subject: Re: Red background color when editing a file as root (using TRAMP)
Date: Fri, 14 Nov 2008 10:06:02 +0100 [thread overview]
Message-ID: <87bpwi65j9.fsf@gmail.com> (raw)
In-Reply-To: <9c5c3657-7b90-4dd4-8f34-0b97cef109c6@n33g2000pri.googlegroups.com> ("Nordlöw"'s message of "Thu, 13 Nov 2008 22:48:26 -0800 (PST)")
On Thu, 13 Nov 2008 22:48:26 -0800 (PST), Nordlöw <per.nordlow@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
next prev parent reply other threads:[~2008-11-14 9:06 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 [this message]
[not found] ` <mailman.337.1226653574.26697.help-gnu-emacs@gnu.org>
2008-11-14 11:04 ` Nordlöw
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=87bpwi65j9.fsf@gmail.com \
--to=paul.r.ml@gmail.com \
--cc=help-gnu-emacs@gnu.org \
--cc=per.nordlow@gmail.com \
/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.