auctex
[Top][All Lists]
Advanced

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

Re: Failed to skip from chapter tex file to master pdf file.


From: Tassilo Horn
Subject: Re: Failed to skip from chapter tex file to master pdf file.
Date: Mon, 12 Jul 2021 07:01:37 +0200
User-agent: mu4e 1.5.13; emacs 28.0.50

Hongyi Zhao <hongyi.zhao@gmail.com> 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

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