From: David House <dmhouse@gmail.com>
To: "Óscar Fuentes" <ofv@wanadoo.es>
Cc: emacs-devel@gnu.org
Subject: Re: vc-mode-line
Date: Tue, 10 Aug 2010 11:29:25 -0400 [thread overview]
Message-ID: <AANLkTinQHkgC7cBESJmHZe_P_tnLyx6fLV6h5vVwfx-7@mail.gmail.com> (raw)
In-Reply-To: <87wrs45s28.fsf@telefonica.net>
[-- Attachment #1: Type: text/plain, Size: 1201 bytes --]
On 5 August 2010 23:38, Óscar Fuentes <ofv@wanadoo.es> wrote:
> Whatever you decide, please consider allowing for some colorized
> clue. Associating background faces to VC states, for instance, so the
> user can customize "green for unmodified, red for modified" etc.
>
> I guess that asking for images would be too contentious ;-)
For a while now, I've been using the following customization to
display a green circle for an unmodified file and an orange square for
a modified one (versus the repository, I mean):
(setq-default
mode-line-format
'(...
(vc-mode (:eval (vc-icon)))
...)
;; Display a coloured square indicating the vc status of the current file
(defun vc-icon ()
(let ((icon (if (vc-workfile-unchanged-p (buffer-file-name))
"in-vc.png"
"modified-vc.png"))
(bg (face-attribute 'mode-line :background)))
(propertize
" "
'display (find-image
`((:type png :file ,icon :ascent center :background ,bg))))))
It relies on the attached two PNG images (I presume sending
attachments to this mailing list works; if not, email me and I'll
place them on imgur or somewhere similar).
[-- Attachment #2: in-vc.png --]
[-- Type: image/png, Size: 725 bytes --]
[-- Attachment #3: modified-vc.png --]
[-- Type: image/png, Size: 433 bytes --]
next prev parent reply other threads:[~2010-08-10 15:29 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-30 11:53 vc-mode-line Eli Zaretskii
2010-07-30 12:34 ` vc-mode-line Andy Moreton
2010-08-01 23:04 ` vc-mode-line Stefan Monnier
2010-07-30 15:52 ` vc-mode-line Leo
2010-08-05 4:16 ` vc-mode-line Dan Nicolaescu
2010-08-05 4:55 ` vc-mode-line Miles Bader
2010-08-05 5:20 ` vc-mode-line Dan Nicolaescu
2010-08-05 6:39 ` vc-mode-line Stephen J. Turnbull
2010-08-05 16:20 ` vc-mode-line David Kastrup
2010-08-05 14:57 ` vc-mode-line Eli Zaretskii
2010-08-05 18:54 ` vc-mode-line Dan Nicolaescu
2010-08-06 2:41 ` vc-mode-line Miles Bader
2010-08-06 3:38 ` vc-mode-line Óscar Fuentes
2010-08-06 4:59 ` vc-mode-line Óscar Fuentes
2010-08-06 5:13 ` vc-mode-line Miles Bader
2010-08-06 6:52 ` vc-mode-line Óscar Fuentes
2010-08-06 8:13 ` vc-mode-line Eli Zaretskii
2010-08-06 14:23 ` vc-mode-line Óscar Fuentes
2010-08-06 16:33 ` vc-mode-line Óscar Fuentes
2010-08-06 18:12 ` vc-mode-line Eli Zaretskii
2010-08-06 5:12 ` vc-mode-line Miles Bader
2010-08-10 15:29 ` David House [this message]
2010-08-10 15:43 ` vc-mode-line Óscar Fuentes
2010-08-12 13:08 ` vc-mode-line Ted Zlatanov
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=AANLkTinQHkgC7cBESJmHZe_P_tnLyx6fLV6h5vVwfx-7@mail.gmail.com \
--to=dmhouse@gmail.com \
--cc=emacs-devel@gnu.org \
--cc=ofv@wanadoo.es \
/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.