From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Arash Esbati Newsgroups: gmane.emacs.devel Subject: Re: Running external info within Emacs Date: Thu, 30 Mar 2023 17:00:25 +0200 Message-ID: <86wn2y5lo6.fsf@gnu.org> References: <864jq2cxsv.fsf@gnu.org> <831ql65qew.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16888"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Mar 30 17:01:10 2023 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1phtm0-0004B4-0L for ged-emacs-devel@m.gmane-mx.org; Thu, 30 Mar 2023 17:01:08 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1phtle-0005ps-PC; Thu, 30 Mar 2023 11:00:46 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1phtld-0005pd-4u for emacs-devel@gnu.org; Thu, 30 Mar 2023 11:00:45 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1phtlc-0001Jp-Sf for emacs-devel@gnu.org; Thu, 30 Mar 2023 11:00:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=ux+zYiLlE7ESCcGLPXn3HtDOtylrLEoyQ0vDUVVzBps=; b=Vnvz9avTGjTLkIX++KK/ KuIenF8nmWhfaJGgmXDICu6KUtdlofwYSSVsg0ikJ80eo711khpSkin4QRuWwSkJMwKBVbk0wGp3s qe0sx1YVJShGpRDUvvjQnKaX6HYtmdFWZ7wm9eOHTBRT49pr8qtMVNURYqWs+btWzGsHx9+DEafbQ 81LLXpHnwuZ2hvIgASsRnOVynFWiD1fSu141f7CknQ4UCwiHKtX3Lxtqaf3kFLGuXmMpBWV+G2ogq 9kLWcpqp2tFhIkNaaFCn92ab7L75FBQRU7RsJAIap4WjDuj5T4RnWqD3ZHIhMSlNkUdngbGSiQpba rglFjhXyMGMMXw==; Original-Received: from p5b326472.dip0.t-ipconnect.de ([91.50.100.114] helo=MUTANT) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1phtlc-0001Xx-74; Thu, 30 Mar 2023 11:00:44 -0400 In-Reply-To: <831ql65qew.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 30 Mar 2023 16:17:59 +0300") X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:304871 Archived-At: Eli Zaretskii 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" 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