[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 <abdo.haji.ali@gmail.com> 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:
https://lists.gnu.org/archive/html/auctex-devel/2020-08/msg00008.html
So the situation with respect to this dynamically-scoped variables may
be much different in future AUCTeX.
Regards,
Ikumi Keita
- Output filenames and the inconsistency of the `file` variable, Al Haji-Ali, 2020/08/23
- Re: Output filenames and the inconsistency of the `file` variable,
Ikumi Keita <=
- Re: Output filenames and the inconsistency of the `file` variable, Al Haji-Ali, 2020/08/25
- Re: Output filenames and the inconsistency of the `file` variable, Ikumi Keita, 2020/08/26
- Re: Output filenames and the inconsistency of the `file` variable, Al Haji-Ali, 2020/08/26
- Re: Output filenames and the inconsistency of the `file` variable, Ikumi Keita, 2020/08/26
- Re: Output filenames and the inconsistency of the `file` variable, Al Haji-Ali, 2020/08/26
- Re: Output filenames and the inconsistency of the `file` variable, Ikumi Keita, 2020/08/27
- Re: Output filenames and the inconsistency of the `file` variable, Al Haji-Ali, 2020/08/27
- Re: Output filenames and the inconsistency of the `file` variable, Ikumi Keita, 2020/08/27
- Re: Output filenames and the inconsistency of the `file` variable, Al Haji-Ali, 2020/08/28