AucTeX uses the two variables TeX-expand-list and TeX-expand-list-builtin when processing (La)TeX buffers.

According to the documentation of the variable TeX-expand-list

... Each entry is a list with two or more elements. The first element is the string to be expanded. The second element is the name of a function returning the expanded string when called with the remaining elements as arguments. The special value ‘file’ will be expanded to the name of the file being processed, with an optional extension.

With only this information in hands I am enable to figure out what is the expansion of the string "%T" by applying the rule ("%T" file t t nil t) as well as the expansion of the strings "%s" and "%t" by applying ("%s" file nil t) and ("%t" file t t) defined in TeX-expand-list-builtin

  • TeX-command-expand replaces temporarily the value of its file argument with TeX--master-or-region-file-with-extra-quotes. See the doc string of that function. Note that the file argument is used for the expansion of the special value file in TeX-expand-list. – Tobias Sep 30 '19 at 10:24
  • Note, that the last sentence in the description text of your question looks somewhat strange. It looks like you had already answered the question yourself. But, comparing your statement with the code of tex-buf.el I can imagine that you have not. I only mention that because maybe that identifies the reason why your question does not have an answer yet. – Tobias Sep 30 '19 at 10:29
  • @Tobias Thank you for your reply. The goal of my question is to figure out what is the final expansion of the string "%%l%(mode)%' %T"` which is associated to "LaTeX" command in TeX-command-list according to TeX-expand-list-builtin. I am sorry for my English. – Hafid Boukhoulda Sep 30 '19 at 16:18
  • Did you have a look at the help for TeX--master-or-region-file-with-extra-quotes? That explains what the arguments to the file command, i.e., t t nil t mean. – Tobias Sep 30 '19 at 16:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.