Dear Keita, Indeed, if you put an ampersand, as you did, the old way sometimes does not work, depending on if your emacs uses PTYs to communicate with the process by default. I fixed this by changing the connection type, so now your way should work as well (it does on my machine, where I could reproduce your problem). Patch attached here, let me know if this fixes it for you. The advantage is now it seems to me all configurations will work properly.
Best, YDL P.S. I did not have your problem since I used emacsclient -n %s as the viewer, which does not require an ampersand. On Mon, Sep 30, 2024 at 3:07 PM Arash Esbati <[email protected]> wrote: > Hi Keita, > > Ikumi Keita <[email protected]> writes: > > > The reason is that asynchronous call to texdoc terminates immediately > > and doesn't launch pdf viewer at all for my setup. Let me explain the > > detail. I set PDFVIEWER environment variable to "evince %s &". I > > attach the final ampersand so that I can freely use shell prompt > > after "texdoc SOMENAME" on a terminal (outside of emacs) while evince > > shows the pdf document. > > Though it is possible to omit the ampersand in PDFVIEWER and add one to > > texdoc call like "texdoc SOMENAME &" on a terminal, it fails when texdoc > > can't find a match for SOMENAME like this: > > ,---- > > | Unfortunately, there are no good matches for "xxxyyyzzz". > > | > > | There may be online documentation available for "xxxyyyzzz" at > > | https://texdoc.org/serve/xxxyyyzzz/0 > > | This documentation may be for a different version than you have > installed. > > | > > | Would you like to search online? (y/N) fish: Job 1, 'env > > | PDFVIEWER="evince %s" texdo…' has stopped > > `---- > > Thus I don't want to take that way. > > What happens if you adjust the entry for viewer_pdf in your personal > texdoc.cnf? The one shipped with texlive says: > > # Defaults depend on what is available on your system, as well as your > desktop > # environment. Here are a few examples. > # > # %s is optional and stands for the filename. > # > # viewer_pdf = xpdf # works > # viewer_pdf = xpdf %s & # works even better > > Maybe that helps getting rid of the env variable. > > Best, Arash >
0001-texdoc-called-non-interactively-and-synchronously.patch
Description: Binary data
