emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: vc-annotate error


From: JD Smith
Subject: Re: vc-annotate error
Date: Fri, 07 Apr 2006 18:36:55 -0700
User-agent: Pan/0.14.2.91 (As She Crawled Across the Table)

On Fri, 07 Apr 2006 18:40:35 -0600, Kevin Rodgers wrote:

> JD Smith wrote:
>> vc-annotate is giving me a similar error as was reported earlier for
>> vc.el revision 1.408:
>> 
>>  (file-error "Cannot open load file" "vc-nil")
>> 
>> This occurs because I have specified a default annotate mode of
>> 'fullscale, and the `vc-annotate-display-autoscale' function still
>> relies on the variable `vc-annotate-backend' to call the appropriate
>> backend time functions I wrote years ago.  This was formerly a global
>> variable, but Stefan's changes to `vc-annotate' circa 1.408 made it
>> buffer local:
>> 
>>     (with-current-buffer temp-buffer-name
>>       (set (make-local-variable 'vc-annotate-backend) (vc-backend file))
>>       (set (make-local-variable 'vc-annotate-parent-file) file) (set
>>       (make-local-variable 'vc-annotate-parent-rev) rev) (set
>>       (make-local-variable 'vc-annotate-parent-display-mode)
>>         display-mode))
> 
> That snippet immediately follows this:
> 
>      (with-output-to-temp-buffer temp-buffer-name
>        (vc-call annotate-command file (get-buffer temp-buffer-name) rev))
> 
> So could the problem be that those variables are set _after_ the annotate
> buffer contents have been inserted and displayed (via
> temp-buffer-show-function -> vc-annotate-display-select)?  Shouldn't they
> be set before?
> 
>> For whatever reason, these are not currently being set in the annotate
>> output buffer, which breaks the auto-scaling annotation display, since
>> it doesn't know the backend to use.  I haven't figured out how the
>> buffer-local variables are being lost.  Other annotate display modes
>> don't have backend-specific functions, so they continue to work.
> 
> Are you sure they're not being set at all, vs. being set too late?

I think that's probably correct, but after reversing the order I could
find no combination of buffer calls which would get the same buffer
behavior as currently, and also leave those local variables set.  I
believe the 'with-output-to-temp-buffer' body won't have access to
those values, since it doesn't actually set the current buffer to its
output buffer.  Given all the buffer switching that VC seems to do, it
may be somewhat unsafe to have these be buffer local.

Thanks,

JD






reply via email to

[Prev in Thread] Current Thread [Next in Thread]