[Top][All Lists]

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

Re: Output filenames and the inconsistency of the `file` variable

From: Ikumi Keita
Subject: Re: Output filenames and the inconsistency of the `file` variable
Date: Wed, 26 Aug 2020 02:45:38 +0900

Hi Al,

>>>>> Al Haji-Ali <> writes:
> 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?

I think that is just a historical reason.

> Would changing that to calling the appropriate filename function be
> acceptable in my contribution?

Probably yes, provided that your contribution is careful enough not to
break compatibility with existing codes including users' customization.

> 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 this is another historical reason.

> 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.

Recently, there were some
discussions in this list about moving to lexical scope:
So the situation with respect to this dynamically-scoped variables may
be much different in future AUCTeX.

Ikumi Keita

reply via email to

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