Hongyi Zhao <[email protected]> writes:

>> > Or as a first step, you could also find the master file and all chapter
>> > files and eval the following in *stratch* and post the output:
>> >
>> > (delq nil (mapcar (lambda (buf)
>> >                     (with-current-buffer buf
>> >                       (when (eq major-mode 'latex-mode)
>> >                         (cons (buffer-file-name buf)
>> >                               (TeX-master-file "pdf")))))
>> >                   (buffer-list)))
>>
>> See below:
>>
>> (delq nil (mapcar (lambda (buf)
>>                     (with-current-buffer buf
>>                       (when (eq major-mode 'latex-mode)
>>                         (cons (buffer-file-name buf)
>>                               (TeX-master-file "pdf")))))
>>                   (buffer-list)))
>> (("/home/werner/Public/hpc/tools/thesis/gitlab.kwant-project.org/jbweston/thesis.git/thesis.tex"
>> . "thesis.pdf"))

Here it seems that you've just had thesis.tex open in a buffer but not
the chapter files.  I've asked you to "find the master file and *all
chapter files* and eval the following in *stratch*".

> Why can't `(La)TeX-mode' return the correct result:
>
> (delq nil (mapcar (lambda (buf)
>                     (with-current-buffer buf
>                       (when (eq major-mode 'TeX-mode)
>                         (cons (buffer-file-name buf)
>                               (TeX-master-file "pdf")))))
>                   (buffer-list)))

Because the symbols latex-mode and LaTeX-mode or TeX-mode are not `eq'
(identical).  `major-mode' is just a symbol, and in an AUCTeX LaTeX
buffer it'll be set to `latex-mode'.

Bye,
Tassilo


Reply via email to