maechler@CRYPTO.BELLCORE.COM (Martin Maechler) (06/21/91)
Many people use to complain about the default way that cmushell handles Unix "more". The same applies to simple 'shell' (but this is not a big concern for me since I do nto use it. :-)) needing the extra return and producing all the "^G" "^M" and what not. I usually tell people "You don't need more within emacs", and this is 95 % true, since we can visit-file, have M-x manual-entry, dired, etc. AND last but not least can jump back to the beginning of a long output (via C-r <prompt>). But the remaining 5 % are still here: Shell scripts and other UNIX programs utilities that pipe to more (" | more "). Most "modern" Unix programs/scripts use $PAGER instead of 'more' if it is defined. Some places I know, they use "less" which is even worse: It aborts if run within cmushell. As a first remedy, I would like to do the equivalent of "PAGER=cat; export PAGER" whenever the cmushell is loaded, i.e. in 'cmushell-mode-hook. I can figure out a way to do this in my .cshrc (or its korn-shell equivalent). But, it would be nice if there was a 'cmushell-pager variable that by default may even be set to "cat" instead of "more". What we would really like, of course, is a PAGER somewhere between "cat" and more, to protect us from real long "cat"s. Is this is a known / solved problem ? Thank you for any hints/help: Martin Maechler, Bellcore 2M-343, 445 South St., Morristown, NJ 07962-1910, USA maechler@bellcore.com, Tel: (201) 829-4837(w) 993-0944(h), Fax (201) 829-4391.
maechler@crypto.bellcore.com (Martin Maechler) (06/27/91)
Thank you again, Jason, for your help about emacsclient. Concerning my request for a PAGER: 'emacsclient' really does NOT do the job: You can say emacsclient file but you can NOT cat ... | sed ... | awk ... .... | emacsclient the latter being the real important use of a PAGER different from more. I am not a proficient C-programmer, but I think $EMACS/etc/emacsclient.c could be modified quite easily such as to read from stdin instead of a file argument when no file argument is provided. Could anyone do and post this ? It would be a neat improvement that may even go into version 19 ? Martin Maechler, Bellcore 2M-343, 445 South St., Morristown, NJ 07962-1910, USA maechler@bellcore.com, Tel: (201) 829-4837(w) 993-0944(h), Fax (201) 829-4391.