unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Running external info within Emacs
@ 2023-03-30 10:56 Arash Esbati
  2023-03-30 13:17 ` Eli Zaretskii
  0 siblings, 1 reply; 14+ messages in thread
From: Arash Esbati @ 2023-03-30 10:56 UTC (permalink / raw)
  To: emacs-devel

Hi all,

I have an issue which I don't understand when running the external info
within Emacs.  This is on Win10 with Msys2/MinGW64 and Emacs 30
(bfa3500c3c).

I have an entry like this in my .bash_profile:

  export INFOPATH=$INFOPATH:/c/texlive/2023/texmf-dist/doc/info

and when I invoke 'emacs -Q' from a MinGW64 shell and eval:

  (async-shell-command "info dir")

I get:

  File: coreutils.info,  Node: dir invocation,  Next: vdir ...

  10.2 ‘dir’: Briefly list directory contents
  ===========================================

  ‘dir’ is equivalent to ‘ls -C -b’; that is, by default files are listed
  in columns, sorted vertically, and special characters are represented by
  backslash escape sequences.

     *Note ‘ls’: ls invocation.

When I eval:

  (async-shell-command "info latex2e")

I get:

  info: No menu item 'latex2e' in node '(dir)Top'

When I run the command 'info latex2e' in the shell where I started
Emacs, I get:

  Next: About this document,  Up: (dir)

  LaTeX2e: An unofficial reference manual
  ***************************************

  This document is an unofficial reference manual (version of January
  2023) for LaTeX2e, a document preparation system.

Emacs itself finds the manual as well when I hit 'C-h i'.  Any pointer
why the shell-command version doesn't work?

Best, Arash



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Running external info within Emacs
  2023-03-30 10:56 Running external info within Emacs Arash Esbati
@ 2023-03-30 13:17 ` Eli Zaretskii
  2023-03-30 15:00   ` Arash Esbati
  0 siblings, 1 reply; 14+ messages in thread
From: Eli Zaretskii @ 2023-03-30 13:17 UTC (permalink / raw)
  To: Arash Esbati; +Cc: emacs-devel

> From: Arash Esbati <arash@gnu.org>
> Date: Thu, 30 Mar 2023 12:56:32 +0200
> 
> I have an issue which I don't understand when running the external info
> within Emacs.  This is on Win10 with Msys2/MinGW64 and Emacs 30
> (bfa3500c3c).
> 
> I have an entry like this in my .bash_profile:
> 
>   export INFOPATH=$INFOPATH:/c/texlive/2023/texmf-dist/doc/info
> 
> and when I invoke 'emacs -Q' from a MinGW64 shell and eval:
> 
>   (async-shell-command "info dir")
> 
> I get:
> 
>   File: coreutils.info,  Node: dir invocation,  Next: vdir ...
> 
>   10.2 ‘dir’: Briefly list directory contents
>   ===========================================
> 
>   ‘dir’ is equivalent to ‘ls -C -b’; that is, by default files are listed
>   in columns, sorted vertically, and special characters are represented by
>   backslash escape sequences.
> 
>      *Note ‘ls’: ls invocation.
> 
> When I eval:
> 
>   (async-shell-command "info latex2e")
> 
> I get:
> 
>   info: No menu item 'latex2e' in node '(dir)Top'
> 
> When I run the command 'info latex2e' in the shell where I started
> Emacs, I get:
> 
>   Next: About this document,  Up: (dir)
> 
>   LaTeX2e: An unofficial reference manual
>   ***************************************
> 
>   This document is an unofficial reference manual (version of January
>   2023) for LaTeX2e, a document preparation system.
> 
> Emacs itself finds the manual as well when I hit 'C-h i'.  Any pointer
> why the shell-command version doesn't work?

It's hard to say.  What shell is being used to invoke commands via
async-shell-command?  What value of INFOPATH does the stand-alone Info
reader see when it is invoked like that?  What is the file name of the
latex2e Info file, and does it have a menu entry in the DIR file in
any of the directories mentioned in INFOPATH?

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.

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.



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Running external info within Emacs
  2023-03-30 13:17 ` Eli Zaretskii
@ 2023-03-30 15:00   ` Arash Esbati
  2023-03-30 15:56     ` Eli Zaretskii
  0 siblings, 1 reply; 14+ messages in thread
From: Arash Esbati @ 2023-03-30 15:00 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

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.
  \x1f
  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



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Running external info within Emacs
  2023-03-30 15:00   ` Arash Esbati
@ 2023-03-30 15:56     ` Eli Zaretskii
  2023-03-31  6:43       ` Arash Esbati
  0 siblings, 1 reply; 14+ messages in thread
From: Eli Zaretskii @ 2023-03-30 15:56 UTC (permalink / raw)
  To: Arash Esbati; +Cc: emacs-devel

> From: Arash Esbati <arash@gnu.org>
> Cc: emacs-devel@gnu.org
> Date: Thu, 30 Mar 2023 17:00:25 +0200
> 
> '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.
>   \x1f
>   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.
>   [...]

Then this is either a bug in MSYS2 stand-alone Info reader, or
something else is at work here that we don't see.

What happens if you copy latex2e.info to C:\msys64\mingw64\share\info?



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Running external info within Emacs
  2023-03-30 15:56     ` Eli Zaretskii
@ 2023-03-31  6:43       ` Arash Esbati
  2023-03-31  7:10         ` Eli Zaretskii
  0 siblings, 1 reply; 14+ messages in thread
From: Arash Esbati @ 2023-03-31  6:43 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

Eli Zaretskii <eliz@gnu.org> writes:

> Then this is either a bug in MSYS2 stand-alone Info reader, or
> something else is at work here that we don't see.
>
> What happens if you copy latex2e.info to C:\msys64\mingw64\share\info?

No change.  I still see

  (async-shell-command "info latex2e")
  info: No menu item 'latex2e' in node '(dir)Top'

and

  (async-shell-command "info -f latex2e")
  info: latex2e: No such file or directory

Any other idea?  I also tried this with Emacs built from the release
branch, same thing.

Best, Arash



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Running external info within Emacs
  2023-03-31  6:43       ` Arash Esbati
@ 2023-03-31  7:10         ` Eli Zaretskii
  2023-03-31 18:09           ` Arash Esbati
  0 siblings, 1 reply; 14+ messages in thread
From: Eli Zaretskii @ 2023-03-31  7:10 UTC (permalink / raw)
  To: Arash Esbati; +Cc: emacs-devel

> From: Arash Esbati <arash@gnu.org>
> Cc: emacs-devel@gnu.org
> Date: Fri, 31 Mar 2023 08:43:11 +0200
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> > Then this is either a bug in MSYS2 stand-alone Info reader, or
> > something else is at work here that we don't see.
> >
> > What happens if you copy latex2e.info to C:\msys64\mingw64\share\info?
> 
> No change.  I still see
> 
>   (async-shell-command "info latex2e")
>   info: No menu item 'latex2e' in node '(dir)Top'
> 
> and
> 
>   (async-shell-command "info -f latex2e")
>   info: latex2e: No such file or directory
> 
> Any other idea?  I also tried this with Emacs built from the release
> branch, same thing.

What about shell-command? or if you invoke "info latex2e" from
"M-x shell"? same error?

So the issue is that shell commands invoked from Emacs fail when the
same shell commands invoked from the shell work?  And that it happens
_only_ for this one Info file?  Then what is the difference between
this Info file and the other ones?



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Running external info within Emacs
  2023-03-31  7:10         ` Eli Zaretskii
@ 2023-03-31 18:09           ` Arash Esbati
  2023-03-31 19:07             ` Eli Zaretskii
  0 siblings, 1 reply; 14+ messages in thread
From: Arash Esbati @ 2023-03-31 18:09 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

Eli Zaretskii <eliz@gnu.org> writes:

> What about shell-command? or if you invoke "info latex2e" from
> "M-x shell"? same error?

Yes, the same error with both of them.

> So the issue is that shell commands invoked from Emacs fail when the
> same shell commands invoked from the shell work?

Yes, but this is statement applies only to the directories I've added to
$INFOPATH. 'info dir' for example works as expected within Emacs in all
scenarios.

> And that it happens _only_ for this one Info file?  Then what is the
> difference between this Info file and the other ones?

Nope, I moved my Emacs directory, adjusted $INFOPATH and did in the
shell:

  $ info emacs
  $ info elisp
  $ info gnus

They all work. Within Emacs, no avail, no matter what I try.

Best, Arash



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Running external info within Emacs
  2023-03-31 18:09           ` Arash Esbati
@ 2023-03-31 19:07             ` Eli Zaretskii
  2023-04-01 10:51               ` Arash Esbati
  0 siblings, 1 reply; 14+ messages in thread
From: Eli Zaretskii @ 2023-03-31 19:07 UTC (permalink / raw)
  To: Arash Esbati; +Cc: emacs-devel

> From: Arash Esbati <arash@gnu.org>
> Cc: emacs-devel@gnu.org
> Date: Fri, 31 Mar 2023 20:09:40 +0200
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> > And that it happens _only_ for this one Info file?  Then what is the
> > difference between this Info file and the other ones?
> 
> Nope, I moved my Emacs directory, adjusted $INFOPATH and did in the
> shell:
> 
>   $ info emacs
>   $ info elisp
>   $ info gnus
> 
> They all work. Within Emacs, no avail, no matter what I try.

So inside Emacs, the only command that works is "info dir", and all
the other "info FOO" commands, where FOO ≠ dir, fail?



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Running external info within Emacs
  2023-03-31 19:07             ` Eli Zaretskii
@ 2023-04-01 10:51               ` Arash Esbati
  2023-04-01 11:37                 ` Eli Zaretskii
  0 siblings, 1 reply; 14+ messages in thread
From: Arash Esbati @ 2023-04-01 10:51 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

Eli Zaretskii <eliz@gnu.org> writes:

> So inside Emacs, the only command that works is "info dir", and all
> the other "info FOO" commands, where FOO ≠ dir, fail?

I think I have a pointer: Eval'ing (getenv "INFOPATH") in scratch gives
(linebreaks added for legibility):

  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;
  C:\\emacs\\share\\info

Now I eval (async-shell-command "info -x 2 latex2e") for debug infos:

  info: inaccessible directory C not added to INFOPATH
  info: inaccessible directory \msys64\mingw64\local\info;C not added to INFOPATH
  info: inaccessible directory \msys64\mingw64\share\info;C not added to INFOPATH
  info: inaccessible directory \msys64\usr\local\info;C not added to INFOPATH
  info: inaccessible directory \msys64\usr\share\info;C not added to INFOPATH
  info: inaccessible directory \msys64\usr\info;C not added to INFOPATH
  info: inaccessible directory \msys64\share\info;C not added to INFOPATH
  info: inaccessible directory \texlive\2023\texmf-dist\doc\info;C not added to INFOPATH
  info: inaccessible directory \emacs\share\info not added to INFOPATH
  info: adding /usr/share/info to INFOPATH
  info: found file /usr/share/info/dir
  info: looking for file "latex2e"
  info: looking for file latex2e in /usr/share/info
  info: closing -
  info: No menu item 'latex2e' in node '(dir)Top'

info seems to see the Windows style paths and chokes.  If I change
"INFOPATH" to unix style and run the command like this:

  (with-environment-variables (("INFOPATH"
                                "\
  /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:\
  /C/emacs/share/info"))
    (async-shell-command "info -x 2 latex2e"))

I get:

  info: inaccessible directory /C/msys64/mingw64/local/info not added to INFOPATH
  info: adding /C/msys64/mingw64/share/info to INFOPATH
  info: adding /C/msys64/usr/local/info to INFOPATH
  info: adding /C/msys64/usr/share/info to INFOPATH
  info: inaccessible directory /C/msys64/usr/info not added to INFOPATH
  info: inaccessible directory /C/msys64/share/info not added to INFOPATH
  info: adding /C/texlive/2023/texmf-dist/doc/info to INFOPATH
  info: adding /C/emacs/share/info to INFOPATH
  info: duplicate directory /usr/share/info not added to INFOPATH
  info: found file /C/msys64/usr/share/info/dir
  info: found file /C/texlive/2023/texmf-dist/doc/info/dir
  info: found file /C/emacs/share/info/dir
  info: looking for file "latex2e"
  info: looking for file latex2e in /C/msys64/mingw64/share/info
  info: looking for file latex2e in /C/msys64/usr/local/info
  info: looking for file latex2e in /C/msys64/usr/share/info
  info: looking for file latex2e in /C/texlive/2023/texmf-dist/doc/info
  info: found file /C/texlive/2023/texmf-dist/doc/info/latex2e.info
  info: writing node (latex2e.info)Top...
  info: writing node (latex2e.info)About this document...
  [...]
  File: latex2e.info,  Node: Top,  Next: About this document,  Up: (dir)

and it works.  So your first idea about "INFOPATH transformation several
times" was correct.  Is there a fix for this?  WDYT?  I can of course
(setenv "INFOPATH" "...") in my init file, but that's not my first
choice.

Best, Arash



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Running external info within Emacs
  2023-04-01 10:51               ` Arash Esbati
@ 2023-04-01 11:37                 ` Eli Zaretskii
  2023-04-01 14:45                   ` Arash Esbati
  0 siblings, 1 reply; 14+ messages in thread
From: Eli Zaretskii @ 2023-04-01 11:37 UTC (permalink / raw)
  To: Arash Esbati; +Cc: emacs-devel

> From: Arash Esbati <arash@gnu.org>
> Cc: emacs-devel@gnu.org
> Date: Sat, 01 Apr 2023 12:51:06 +0200
> 
> Now I eval (async-shell-command "info -x 2 latex2e") for debug infos:
> 
>   info: inaccessible directory C not added to INFOPATH
>   info: inaccessible directory \msys64\mingw64\local\info;C not added to INFOPATH
>   info: inaccessible directory \msys64\mingw64\share\info;C not added to INFOPATH
>   info: inaccessible directory \msys64\usr\local\info;C not added to INFOPATH
>   info: inaccessible directory \msys64\usr\share\info;C not added to INFOPATH
>   info: inaccessible directory \msys64\usr\info;C not added to INFOPATH
>   info: inaccessible directory \msys64\share\info;C not added to INFOPATH
>   info: inaccessible directory \texlive\2023\texmf-dist\doc\info;C not added to INFOPATH
>   info: inaccessible directory \emacs\share\info not added to INFOPATH
>   info: adding /usr/share/info to INFOPATH
>   info: found file /usr/share/info/dir
>   info: looking for file "latex2e"
>   info: looking for file latex2e in /usr/share/info
>   info: closing -
>   info: No menu item 'latex2e' in node '(dir)Top'
> 
> info seems to see the Windows style paths and chokes.  If I change
> "INFOPATH" to unix style and run the command like this:
> 
>   (with-environment-variables (("INFOPATH"
>                                 "\
>   /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:\
>   /C/emacs/share/info"))
>     (async-shell-command "info -x 2 latex2e"))
> 
> I get:
> 
>   info: inaccessible directory /C/msys64/mingw64/local/info not added to INFOPATH
>   info: adding /C/msys64/mingw64/share/info to INFOPATH
>   info: adding /C/msys64/usr/local/info to INFOPATH
>   info: adding /C/msys64/usr/share/info to INFOPATH
>   info: inaccessible directory /C/msys64/usr/info not added to INFOPATH
>   info: inaccessible directory /C/msys64/share/info not added to INFOPATH
>   info: adding /C/texlive/2023/texmf-dist/doc/info to INFOPATH
>   info: adding /C/emacs/share/info to INFOPATH
>   info: duplicate directory /usr/share/info not added to INFOPATH
>   info: found file /C/msys64/usr/share/info/dir
>   info: found file /C/texlive/2023/texmf-dist/doc/info/dir
>   info: found file /C/emacs/share/info/dir
>   info: looking for file "latex2e"
>   info: looking for file latex2e in /C/msys64/mingw64/share/info
>   info: looking for file latex2e in /C/msys64/usr/local/info
>   info: looking for file latex2e in /C/msys64/usr/share/info
>   info: looking for file latex2e in /C/texlive/2023/texmf-dist/doc/info
>   info: found file /C/texlive/2023/texmf-dist/doc/info/latex2e.info
>   info: writing node (latex2e.info)Top...
>   info: writing node (latex2e.info)About this document...
>   [...]
>   File: latex2e.info,  Node: Top,  Next: About this document,  Up: (dir)
> 
> and it works.  So your first idea about "INFOPATH transformation several
> times" was correct.  Is there a fix for this?  WDYT?

Isn't this an MSYS2 bug?  Shouldn't MSYS2 Bash convert INFOPATH to the
MSYS /c/foo/bar format?  Or is that handling reserved only for PATH?

IOW, I'd take this up with MSYS2 folks.

Another alternative is to keep all the Info files in a single
/usr/share/info directory, in which case you will not need to set
INFOPATH at all.  Why do you need so many distinct directories with
Info files?

Btw, any reason why you use the MSYS port of Info?  A native port is
available, and you could even produce it by yourself if my 32-bit port
doesn't suit you for some reason.  (I was wondering for a long time
why the MSYS2/MinGW64 project doesn't provide a native Windows build
of Texinfo, since the upstream project supports such a build since
about forever.)



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Running external info within Emacs
  2023-04-01 11:37                 ` Eli Zaretskii
@ 2023-04-01 14:45                   ` Arash Esbati
  2023-04-01 15:34                     ` Eli Zaretskii
  0 siblings, 1 reply; 14+ messages in thread
From: Arash Esbati @ 2023-04-01 14:45 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

Eli Zaretskii <eliz@gnu.org> writes:

> Isn't this an MSYS2 bug?  Shouldn't MSYS2 Bash convert INFOPATH to the
> MSYS /c/foo/bar format?  Or is that handling reserved only for PATH?

That's the question.  Until now, I thought that the Msys2 conversion
magic applies to all sort of paths, not only what one has in $PATH.

> IOW, I'd take this up with MSYS2 folks.

Yes, I will ask there.

> Another alternative is to keep all the Info files in a single
> /usr/share/info directory, in which case you will not need to set
> INFOPATH at all.  Why do you need so many distinct directories with
> Info files?

I only added 2 directories for TeXlive and Emacs, the others are
predefined by Msys2 itself.

> Btw, any reason why you use the MSYS port of Info?

Convenience, and until now, I had no problems with MSYS ports.

> A native port is available, and you could even produce it by yourself
> if my 32-bit port doesn't suit you for some reason.  (I was wondering
> for a long time why the MSYS2/MinGW64 project doesn't provide a native
> Windows build of Texinfo, since the upstream project supports such a
> build since about forever.)

Using your port will be complicated, I think.  Your tarball contains
libiconv-2.dll and libintl-8.dll which are both part of MinGW64 as well
under /ming64/bin.  Not tested, but that I'm afraid that will trouble in
$PATH in terms of who comes first.

Again, many thanks for your time.

Best, Arash



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Running external info within Emacs
  2023-04-01 14:45                   ` Arash Esbati
@ 2023-04-01 15:34                     ` Eli Zaretskii
  2023-04-02 17:04                       ` Arash Esbati
  0 siblings, 1 reply; 14+ messages in thread
From: Eli Zaretskii @ 2023-04-01 15:34 UTC (permalink / raw)
  To: Arash Esbati; +Cc: emacs-devel

> From: Arash Esbati <arash@gnu.org>
> Cc: emacs-devel@gnu.org
> Date: Sat, 01 Apr 2023 16:45:07 +0200
> 
> > A native port is available, and you could even produce it by yourself
> > if my 32-bit port doesn't suit you for some reason.  (I was wondering
> > for a long time why the MSYS2/MinGW64 project doesn't provide a native
> > Windows build of Texinfo, since the upstream project supports such a
> > build since about forever.)
> 
> Using your port will be complicated, I think.  Your tarball contains
> libiconv-2.dll and libintl-8.dll which are both part of MinGW64 as well
> under /ming64/bin.  Not tested, but that I'm afraid that will trouble in
> $PATH in terms of who comes first.

Put the programs, with the dependency DLLs, in a separate directory.
Windows always prefers the DLLs that live in the same directory as the
executable that loads them, so if the DLLs are together with the .exe,
the order of PATH shouldn't matter.



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Running external info within Emacs
  2023-04-01 15:34                     ` Eli Zaretskii
@ 2023-04-02 17:04                       ` Arash Esbati
  2023-04-02 17:14                         ` Eli Zaretskii
  0 siblings, 1 reply; 14+ messages in thread
From: Arash Esbati @ 2023-04-02 17:04 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

Eli Zaretskii <eliz@gnu.org> writes:

> Put the programs, with the dependency DLLs, in a separate directory.
> Windows always prefers the DLLs that live in the same directory as the
> executable that loads them, so if the DLLs are together with the .exe,
> the order of PATH shouldn't matter.

Following the motto: If you want something done, do it yourself, I built
a native version of texinfo myself.  The process was quite smooth, and
it seems to work as expected.  So using the native version was the
solution here.

Best, Arash



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Running external info within Emacs
  2023-04-02 17:04                       ` Arash Esbati
@ 2023-04-02 17:14                         ` Eli Zaretskii
  0 siblings, 0 replies; 14+ messages in thread
From: Eli Zaretskii @ 2023-04-02 17:14 UTC (permalink / raw)
  To: Arash Esbati; +Cc: emacs-devel

> From: Arash Esbati <arash@gnu.org>
> Cc: emacs-devel@gnu.org
> Date: Sun, 02 Apr 2023 19:04:22 +0200
> 
> Following the motto: If you want something done, do it yourself, I built
> a native version of texinfo myself.  The process was quite smooth, and
> it seems to work as expected.  So using the native version was the
> solution here.

Sure.  Like I said: the upstream project supports this since at least
10 years ago.  Which is why I find it strange that MSYS2 folks don't
release a native package.



^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2023-04-02 17:14 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-30 10:56 Running external info within Emacs Arash Esbati
2023-03-30 13:17 ` Eli Zaretskii
2023-03-30 15:00   ` Arash Esbati
2023-03-30 15:56     ` Eli Zaretskii
2023-03-31  6:43       ` Arash Esbati
2023-03-31  7:10         ` Eli Zaretskii
2023-03-31 18:09           ` Arash Esbati
2023-03-31 19:07             ` Eli Zaretskii
2023-04-01 10:51               ` Arash Esbati
2023-04-01 11:37                 ` Eli Zaretskii
2023-04-01 14:45                   ` Arash Esbati
2023-04-01 15:34                     ` Eli Zaretskii
2023-04-02 17:04                       ` Arash Esbati
2023-04-02 17:14                         ` Eli Zaretskii

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).