auctex-devel
[Top][All Lists]
Advanced

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

Output filenames and the inconsistency of the `file` variable


From: Al Haji-Ali
Subject: Output filenames and the inconsistency of the `file` variable
Date: Sun, 23 Aug 2020 22:26:59 +0100

I am working on a contribution for AUCTeX that uses the fact that `TeX-master-file`, and similar functions, are called with an extension to get the output files.

However, I noticed that in functions in `tex.el` like `TeX-pdf-tools-sync-view` and `TeX-evince-sync-view-1` the filename of the output file is constructed from the `file` variable along with `(TeX-output-extension)` instead of calling the filename function (like `TeX-master-file`) with `(TeX-output-extension)` as an argument. Is there a reason for this? Would changing that to calling the appropriate filename function be acceptable in my contribution?

Also, this might be related, I noticed that the variable `file` is used in dynamic scope with two different meanings: sometimes as a function to get the filename, other times as the filename itself (after being overwritten on tex-buf.el:534). I am wondering if there is a reason for having the same variable name for two different functionalities. I think having two dynamically-scoped variables (something like `file` and `file-name` for example) would be more useful and less confusing. This would make it possible to call the correct filename function with the output extension in the functions I mentioned above.

Any input on this is much appreciated.

Best regards,
-- Al

reply via email to

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