[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [patch] vc-annotate-toggle-annotation-visibility, almost
From: |
Thien-Thi Nguyen |
Subject: |
Re: [patch] vc-annotate-toggle-annotation-visibility, almost |
Date: |
Sun, 04 Nov 2007 10:43:28 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.0.50 (gnu/linux) |
() Stefan Monnier <address@hidden>
() Sat, 03 Nov 2007 23:13:29 -0400
> "almost" because i don't see any change w/ `redisplay'
> in `vc-annotate-toggle-annotation-visibility'; use of
> `force-mode-line-update' is suboptimal. still investigating.
Use of force-mode-line-update doesn't seem particularly bad to me
(assuming it works).
prior to `redisplay' being available, i would agree. but not now.
that `redisplay' doesn't is bug that should be fixed, IMO.
> You can use the mode-specific menu to alter the time-span of the used
> colors. See variable `vc-annotate-menu-elements' for customizing the
> menu items."
> + (setq buffer-invisibility-spec nil)
> (set (make-local-variable 'truncate-lines) t)
> (set (make-local-variable 'font-lock-defaults)
> '(vc-annotate-font-lock-keywords t))
> (view-mode 1))
the default buffer-invisibility-spec value is `t', so when
vc-annotate-get-time-set-line-props sets the text property `invisible' to a
non-nil value, the result is that the buffer is initially displayed w/
invisible annotations. (you would need to toggle it once to see them.)
thanks for pointing this out. upon review, i think there is a better way:
;; Frob buffer-invisibility-spec so that if it is originally a naked t,
;; it will become a list, to avoid initial annotations being invisible.
(add-to-invisibility-spec 'foo)
(remove-from-invisibility-spec 'foo)
> + (when (get-text-property (point) 'invisible)
> + (goto-char (next-single-property-change (point) 'invisible)))
What is this for?
effect "edge-triggered intangible". however, it's not necessary (and
in fact somtimes leaves point one further than expected). removed.
We could additionally put commands to print the (invisible) annotation
in the echo-area, and also add a `help-echo' property to the whole
buffer so as to get tooltips that display the (invisible) annotation.
yes, but that's outside the scope of this patch.
thi