On Wed, May 5, 2021 at 9:35 AM Michael Albinus <[email protected]> wrote: > > Jim Porter <[email protected]> writes: > > > If I run these manually in cmd.exe, the command prompt closes > > immediately. If I'm understanding things correctly, I think that's > > because of the `exit' in the first command and the `exec' in the > > second. If I open a subshell (by running cmd.exe in an existing > > command prompt), the window stays open and I can see the output. I've > > tried a bunch of times, but I'm completely unable to reproduce the > > issue when running in cmd.exe. That suggests to me that the MS Windows > > ssh client is working ok, or at least that any bugs here can be > > avoided if we're careful. > > I've tried all these tests (manual invocation of ssh etc pp) already > yesterday, with the same result as you. It works. > > Interestingly, there's no such problem when using plink, which uses the > same command sequence. That lets me think it is an ssh client problem, > buffering the output or whatever. But I might be wrong.
Indeed, it's hard to say for sure what's going wrong, since I still haven't been able to isolate the bug. I did make a bit of progress though. First, I eliminated the need to use `M-x rgrep' on the Tramp repository. The attached Python script (which just prints the text copied from the previous `M-x rgrep' output one line at a time) also reproduces the issue fairly reliably if invoked via `M-x compile RET python3 test.py RET' over sshx from MS Windows. However, I *don't* see this issue when I run `M-x shell-command RET python3 test.py RET'. I always see the full output. This makes me wonder if the issue is actually in `M-x compile'. I'm not super-familiar with all the differences between how `shell-command' and `compile' invoke a process, but maybe there's some sort of issue with buffering in `compile.el' that's causing this? I'll keep debugging this to see if I can narrow this down further. - Jim
lines = """ ./tramp:1:This is tramp, produced by makeinfo version 6.7 from tramp.texi. ./tramp:15:INFO-DIR-SECTION Emacs network features ./tramp:16:START-INFO-DIR-ENTRY ./tramp:19:END-INFO-DIR-ENTRY ./tramp:109:* Connection caching:: Reusing connection related information. ./tramp:110:* Predefined connection information:: ./tramp:111: Setting own connection related information. ./tramp:327:information is not necessary. ./tramp:349: ⢠GNU texinfo 4.6 ./tramp:391: Info manual. ./tramp:393: ⢠Type âmake installâ to install the TRAMP Lisp files and Info ./tramp:396: ⢠You can remove the byte-compiled Lisp files and the Info manual ./tramp:407: info manual. Just change to directory â~/emacs/tramp/texiâ and ./tramp:409: texinfo-format-buffer <RET>â to generate ./tramp:410: â~/emacs/tramp/info/trampâ. ./tramp:419:â/usr/local/share/emacs/site-lispâ and â/usr/local/infoâ. You can ./tramp:440:directories Lisp and Info files should be installed. ./tramp:442: For example, to put the Lisp files in â$HOME/elispâ and the Info file ./tramp:443:in â$HOME/infoâ, you would type: ./tramp:445: $ ./configure --with-lispdir=$HOME/elisp --infodir=$HOME/info ./tramp:452: --infodir='C:/Program Files/Emacs/share/info' ./tramp:464:âmakeâ, or âmakeinfoâ. ./tramp:468:missing or wrong versions of âtexi2dviâ or âinstall-infoâ. Here you can ./tramp:470:(âtramp.dviâ file for printed output, TRAMP entry in Infoâs âdirâ file), ./tramp:538: If the environment variable âINFOPATHâ is set, add the directory ./tramp:539:â~/emacs/tramp/info/â to it. Else, add the directory to ./tramp:540:âInfo-directory-listâ, as follows: ./tramp:542: (add-to-list 'Info-directory-list "~/emacs/tramp/info/") ./tramp:728:* Connection caching:: Reusing connection related information. ./tramp:729:* Predefined connection information:: ./tramp:730: Setting own connection related information. ./tramp:835: see *note Predefined connection information::. ./tramp:1684: A function which parses â~/.netrcâ and â~/.authinfoâ-style files. ./tramp:1717:users. The default authentication file is â~/.authinfo.gpgâ, but this ./tramp:1741:use your â~/.authinfo.gpgâ authentication file, you must customize ./tramp:1744: (customize-set-variable 'ange-ftp-netrc-filename "~/.authinfo.gpg") ./tramp:1770:File: tramp, Node: Connection caching, Next: Predefined connection information, Prev: Password handling, Up: Configuration ./tramp:1772:5.14 Reusing connection related information ./tramp:1791:related information for that host and creates a new entry. ./tramp:1794:File: tramp, Node: Predefined connection information, Next: Remote programs, Prev: Connection caching, Up: Configuration ./tramp:1796:5.15 Setting own connection related information ./tramp:1914:File: tramp, Node: Remote programs, Next: Remote shell setup, Prev: Predefined connection information, Up: Configuration ./tramp:1989:"remote-shell"; see *note Predefined connection information::. If you ./tramp:2034:authorizing access to local authentication information, such as the ssh ./tramp:2220: connection information::). ./tramp:2235:"mount-point", *note Predefined connection information::. Example: ./tramp:2251:*Note Predefined connection information::. All of them are list of ./tramp:2263:"mount-args", *Note Predefined connection information::. ./tramp:2292: Predefined connection information::). ./tramp:2685:â~/.authinfo.gpgâ authentication file. The user option ./tramp:3042:information::, which must be set to a non-ânilâ value. Example: ./tramp:3099: connection information::) and connection buffers. ./tramp:3341: TRAMPâs mailing list is the place for more advice and information on ./tramp:3354:Page (https://lists.gnu.org/mailman/listinfo/tramp-devel/). ./tramp:3433: caches remote information about hosts and files. Caching is ./tramp:4359: ASCII without markup, Texinfo input format, LaTeX input format, Binary file ./tramp matches ./dir:2:This is the file .../info/dir, which contains the topmost node of the ./dir:3:Info hierarchy. The first time you invoke Info you start off ./dir:6:File: dir Node: Top This is the top of the INFO tree ./dir:8:The Info Directory ./dir:11: The Info Directory is the top-level menu of major Info topics. ./dir:12: Type "d" in Info to return to the Info Directory. Type "q" to exit Info. ./dir:13: Type "?" for a list of Info commands, or "h" to visit an Info tutorial. ./dir:16: In Emacs Info, you can click mouse button 2 on a menu item """.strip().split("\n") for i in lines: print(i)
