Hi Al, >>>>> Al Haji-Ali <abdo.haji....@gmail.com> writes: > To start with, I think the first change is to ensure that the variable > `file` (or the lexically-scoped alternative) is not used as a string. > Since this is an internal variable, I think user config is not an > issue.
In my humble opinion, it's a bit dangerous to presume so. In general, a user can have an entry in TeX-view-program-list like ("XYZ" my-TeX-view-open-XYZ) where the second symbol is one's own elisp function. If that function assumes that the variable `file' has string value, your proposal would cause error. Thus I think the problem is more delicate than its appearance. How about using functionp test or stringp test on the value of `file' for the changes in TeX-pdf-tools-sync-view and TeX-evince-sync-view-1? That would be rather safe way although there still remains doubled identity, function name and string, of the variable `file'... Another possible idea is to stop relying on dynamic scope variable `file' and just to call TeX-active-master in TeX-pdf-tools-sync-view and TeX-evince-sync-view-1. My understanding is that TeX-active-master serves for such purposes for most cases. Regards, Ikumi Keita