David Masterson <dsmaster...@icloud.com> writes:

> Ihor Radchenko <yanta...@posteo.net> writes:
>
>> David Masterson <dsmaster...@icloud.com> writes:
>>
>>> org-publish publishes a lot of files for me via multiple backends.  The
>>> problem is that, in ox-latex's post scan of Latex output for warnings to
>>> add to the *Warnings* buffer, it doesn't print out the filename
>>> associated with the warning which makes it difficult to backtrack.
>>>
>>> My wish:
>>>
>>> I can (mostly) read Elisp, but ox-latex is somewhat more than I can
>>> figure out.  I'm hoping someone with more Lisp knowledge than me could
>>> take a look.  Is the starting place org-latex-compile--postprocess ?
>>> I'm not sure if outfile would be the filename.
>>
>> The starting place is `org-compile-file'. Its LOG-BUF argument defines
>> where the compilation output is dumped.  You can augment that output
>> with some information about which file is being compiled and using
>> which commands.
>
> Hmm. Am I right in assuming LOG-BUF will be the *Messages* buffer?
> Also, will ERR-MSG be the *Warnings* buffer?  Then, it looks like the
> appropriate thing for what I want would be to set 'ERR-MSG=LOG-BUF', but
> only when publishing files.  Unfortunately, I don't see a good way of
> doing without some significant rewrite the publishing process.  Is there
> a useful hook that I'm not seeing?

Minor update:

Unfortunately, I don't see a good way of doing this without some
significant rewrite of the publishing process *unless* there is a global
variable that's true when org-publish has been invoked.

> Assumptions:
> 1. Hand org-export-* is done to export a single file
> 2. Hand org-publish is done to export many files (plus other stuff)
> 3. It's OK (eh?) to have a separate *Warnings* buffer in #1
> 4. In #2, publish says which file it's working on in *Messages* buffer
> 5. Interleaving #3 and #4 produces a good log where warnings can be
>    traced to the file that caused them
>
> Note: running org-publish via 'emacs --batch' (which I often do via a
> Makefile) produces #5 just fine

...because warnings and messages are mixed in the output.

-- 
David Masterson

Reply via email to