On 7/23/19 10:52 AM, Joel Kulesza wrote:
>
>
> On Mon, Jul 22, 2019 at 9:17 PM Richard Kimberly Heck
> <rikih...@lyx.org <mailto:rikih...@lyx.org>> wrote:
>
>     On 7/22/19 5:12 PM, Pavel Sanda wrote:
>     > On Sun, Jul 14, 2019 at 11:28:28PM -0600, Joel Kulesza wrote:
>     >> LyX Developers (Jürgen in particular):
>     >>
>     >> A few questions on the Insert -> Field capability with respect
>     to version
>     >> control:
>     >>
>     >>    1. When git hashes (i.e. VCS Revisions) are entered, I see
>     that they are
>     >>    updated when the underlying revision is updated.  This
>     generally delights
>     >>    me.  However, what governs this update logic timing (when
>     the document is
>     >>    opened, at some interval, etc.)?  Is there an indication to
>     the user that
>     >>    this part of the document has changed?  If not, should there be?
>     > Without looking at the code IIRC it updates at each document
>     (re)load (that
>     > includes git commits via lyx gui).
>
>     I could be wrong, but it looks to be re-calculated each time through
>     updateBuffer (which would include reloads). Which, Joel, would mean it
>     is reset very often. Not on every keystroke, but almost that often.
>
>     The user should just expect these auto-calculated things to
>     update, uh,
>     automatically, it seems to me.
>
>
> That is good news for my purpose.  Further, do we know if it is
> recalculated when rendered to PDF via command line? I hope so and will
> test later unless someone knows for sure...

Sorry, Pavel is right in his other message: This only gets re-calculated
when the document is reloaded, at least for git. I did not dig deeply
enough into the code to see where it is cached. So, in that sense, the
inset reports the revision on which the document is based. If the file
on disk were changed externally, then I think you'd get a warning about
that, and ask you to reload, or whatever.

In any event, this is calculated, fresh, if the document is exported via
the command line.

Riki


Reply via email to