emacs-devel
[Top][All Lists]
Advanced

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

Re: Running external info within Emacs


From: Arash Esbati
Subject: Re: Running external info within Emacs
Date: Thu, 30 Mar 2023 17:00:25 +0200
User-agent: Gnus/5.13 (Gnus v5.13)

Eli Zaretskii <eliz@gnu.org> writes:

> It's hard to say.  What shell is being used to invoke commands via
> async-shell-command?

`shell-file-name' returns "C:\\msys64\\usr\\bin\\bash.exe" or should I
check something else in order to find out which shell is invoked?

> What value of INFOPATH does the stand-alone Info reader see when it is
> invoked like that?

'echo $INFOPATH' in a MinGW64 shell returns (line-breaks added manually)

  /mingw64/local/info:
  /mingw64/share/info:
  /usr/local/info:
  /usr/share/info:
  /usr/info:/share/info:
  /c/texlive/2023/texmf-dist/doc/info

(getenv "INFOPATH") in Emacs returns:

  "C:\\msys64\\mingw64\\local\\info;
  C:\\msys64\\mingw64\\share\\info;
  C:\\msys64\\usr\\local\\info;
  C:\\msys64\\usr\\share\\info;
  C:\\msys64\\usr\\info;
  C:\\msys64\\share\\info;
  C:\\texlive\\2023\\texmf-dist\\doc\\info"

> What is the file name of the latex2e Info file,

  latex2e.info

> and does it have a menu entry in the DIR file in any of the
> directories mentioned in INFOPATH?

Yes, the dir file starts like this:

  This is the file .../info/dir, which contains the
  topmost node of the Info hierarchy, called (dir)Top.
  The first time you invoke Info you start off looking at this node.
  
  File: dir,    Node: Top       This is the top of the INFO tree

    This (the Directory node) gives a menu of major topics.
    Typing "q" exits, "?" lists all Info commands, "d" returns here,
    "h" gives a primer for first-timers,
    "mEmacs<Return>" visits the Emacs manual, etc.

    In Emacs, you can click mouse button 2 on a menu item or cross reference
    to select it.

  * Menu:

  Science
  * Asymptote: (asymptote).       Vector graphics language.
  * Asymptote FAQ: (asy-faq).     FAQ for Asymptote.

  TeX
  * Dvipng: (dvipng).             DVI to Portable Network Graphics (PNG).
  * Dvips: (dvips).               Translating TeX DVI files to PostScript.
  * Eplain: (eplain).             Expanding on plain TeX.
  * EpsPDF: (epspdf).             Portable GUI&cmdline EPS/PS/PDF conversion.
  * Kpathsea: (kpathsea).         File lookup along search paths.
  * LaTeX2e: (latex2e).           LaTeX2e unofficial reference manual.
  [...]

> You are also hitting an ambiguity in commands such as "info foo": the
> Info reader doesn't know whether you mean the file foo.info or the
> menu entry "foo" in the Info directory file DIR.  Use "info -f foo" to
> mean the former.

(async-shell-command "info -f latex2e") returns:

  info: latex2e: No such file or directory

> Bottom line: you mix up a native Windows build of Emacs with MSYS2
> Bash and (presumably) MSYS2 build of the stand-alone Info reader, and
> that adds quite a few factors that could influence the outcome.  In
> particular, the INFOPATH variable gets transformed several times
> before it gets to info.exe: once when you invoke Emacs from Bash, then
> when Emacs calls the shell, then again when the subordinate shell
> calls info.exe.

Yes, this is exactly my setup.  I just don't understand why these two

  (async-shell-command "info -f gnutls")
  (async-shell-command "info gnutls")

work as expected where gnutls.info is in

  C:\msys64\mingw64\share\info

which is part of $INFOPATH and latex2e.texi not which is also part of
$INFOPATH.

Best, Arash



reply via email to

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