all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Arash Esbati <arash@gnu.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: Running external info within Emacs
Date: Sat, 01 Apr 2023 12:51:06 +0200	[thread overview]
Message-ID: <86o7o77u5h.fsf@gnu.org> (raw)
In-Reply-To: <83h6u020zi.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 31 Mar 2023 22:07:45 +0300")

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



  reply	other threads:[~2023-04-01 10:51 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86o7o77u5h.fsf@gnu.org \
    --to=arash@gnu.org \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.