Subject: bug#73638: 31.0.50; doc-view: imenu index cannot be made for LaTeX PDFs

From: Eli Zaretskii <[email-masked]>
Date: Sun, 06 Oct 2024 09:39:47 +0300

> From: Visuwesh <[email-masked]>
> Cc: Tassilo Horn <[email-masked]>,  [email-masked]
> Date: Sun, 06 Oct 2024 11:58:28 +0530
> 
> > Can't we invoke the JS interpreter with this script as the command, or
> > invoke it as async subprocess and pipe the script to it via standard
> > input?
> 
> When "mutool run" is called without any script argument, it opens a
> REPL.  We would need to `process-send-string' to the REPL but the REPL
> reports syntax error when I try to do so.  This is after trying to
> "minify" the JS script.  Maybe I am doing something wrong.  I've
> attached my test lisp at the end.
> 
> I do not understand what you suggest by the former however.

Many programs that include an interpreter can accept a script either
as a file or as a string passed through the command line, with or
without a special command-line option.  One example is Awk, another is
Python.

In any case, the process-send-string method sounds like the best
alternative to me, so I hope someone will explain how to do it
correctly (does mutool have some forum where you could ask
questions?).  If that is unworkable for some reason, I guess
generating a temporary file with the script is the next thing I would
try.

Thanks.