[Top][All Lists]

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

Re: [AUCTeX] forward / backward with evince

From: Tassilo Horn
Subject: Re: [AUCTeX] forward / backward with evince
Date: Wed, 11 Apr 2012 07:39:20 +0200
User-agent: Gnus/5.130004 (Ma Gnus v0.4) Emacs/24.0.95 (gnu/linux)

David Kastrup <address@hidden> writes:

Hi David,

>>> But I keep getting the following sort of error on typing C-c C-v:
>>> TeX-evince-sync-view: Arithmetic range error: "round", 1334070937.742052
>> Ok, I see.  I guess, you are using a 32 bit system.  On 32 bit
>> systems, the biggest emacs integer is less than what's needed for a
>> POSIX timestamp.  I'll check how to work around that limitation.
> Why not use the Emacs functions for manipulating time?

The problem is that DBUS as a python thingy wants the timestamp as a
unsigned 32 bit integer (UInt32).  The Emacs dbus interface does the
datatype conversion automatically.  For example, when a DBUS method
returns a UInt64, you either get an emacs integer or a float if the
number is too big.  But the other way round, you cannot provide a float
which is then passed to the DBUS method as some integer.  Michael
Albinus will implement that for Emacs 24.2.

So now I'll check if the timestamp is important at all.  It might be
important to distinguish 2 evince windows showing the same document,
which is a rather uncommon case.

Argh!  Now I've searched for the docs of the Evince DBUS API, and in
3.4.0 they removed the timestamp parameter and changed it to "String
owner"!  What a mess... :-(

> How did you arrive at a non-Emacs representation of the timestamp in
> the first place?

,----[ C-h f float-time RET ]
| float-time is a built-in function in `C source code'.
| (float-time &optional SPECIFIED-TIME)
| Return the current time, as a float number of seconds since the epoch.
| If SPECIFIED-TIME is given, it is the time to convert to float
| instead of the current time.  The argument should have the form
| (HIGH LOW) or (HIGH LOW USEC). Thus, you can use times obtained from
| `current-time' and from `file-attributes'.  SPECIFIED-TIME can also
| have the form (HIGH . LOW), but this is considered obsolete.
| WARNING: Since the result is floating point, it may not be exact.
| If precise time stamps are required, use either `current-time',
| or (if you need time as a string) `format-time-string'.


reply via email to

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