From: David Kastrup <dak@gnu.org>
To: rms@gnu.org
Cc: juri@jurta.org, emacs-devel@gnu.org
Subject: Re: Change in emacsclient behavior
Date: Fri, 07 Sep 2007 09:06:28 +0200 [thread overview]
Message-ID: <851wdb7y4r.fsf@lola.goethe.zz> (raw)
In-Reply-To: <E1ITXMU-0002aH-2E@fencepost.gnu.org> (Richard Stallman's message of "Fri\, 07 Sep 2007 02\:30\:38 -0400")
[-- Attachment #1: Type: text/plain, Size: 809 bytes --]
Richard Stallman <rms@gnu.org> writes:
> > 5. Become a pipe for Emacs (which may or may not produce
> > any terminal output).
> >
> > These all seem useful in principle. 5 seems hard and I doubt
> > it is worth implementing.
>
> It would make it possible to configure an Emacsclient invocation
> as a $PAGER command.
>
> Sorry, I do not follow.
Executables like "man" use a pager configurable in $PAGER for their
output. Calling man in an Emacs shell session creates a lot of
garbage due to terminal problems. It would be much nicer if one could
configure something into $PAGER which just sucked up its stdin and
made it available in a separate Emacs buffer in view mode. In fact, I
_have_ something like that configured as a pager, namely the following
executable:
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: emacs-pager --]
[-- Type: text/x-sh, Size: 264 bytes --]
#!/bin/sh
TMP=`mktemp -t emacs-pager.XXXXXX`
trap "rm $TMP* 2>/dev/null" 0
echo '-*- mode: view; auto-revert-interval: 1; mode: auto-revert-tail; view-exit-action: kill-buffer -*-' >"$TMP"
exec 5<&0 <&-
cat "$@" <&5 >>"$TMP" &
eval "${VISUAL:-${EDITOR}}" '"$TMP"'
[-- Attachment #3: Type: text/plain, Size: 403 bytes --]
Now this has several drawbacks: it takes a longer startup time, it
needs a temporary file, and it does not stop the data generating
process when the material will not get read to its end, anyway.
For example (a useless example, agreed),
yes|$PAGER
works well with $PAGER being less and/or more, but redirecting to a
temporary file is not so great.
--
David Kastrup, Kriemhildstr. 15, 44793 Bochum
[-- Attachment #4: Type: text/plain, Size: 142 bytes --]
_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel
next prev parent reply other threads:[~2007-09-07 7:06 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-30 20:50 Change in emacsclient behavior Richard Stallman
2007-08-30 21:04 ` Drew Adams
2007-08-31 18:21 ` Richard Stallman
2007-08-31 18:26 ` Drew Adams
2007-08-30 21:23 ` Eli Zaretskii
2007-08-30 21:41 ` Henrik Enberg
2007-08-31 18:21 ` Richard Stallman
2007-09-01 7:41 ` Eli Zaretskii
2007-09-01 8:26 ` David Kastrup
2007-08-31 6:39 ` Stefan Monnier
2007-08-31 8:06 ` Tassilo Horn
2007-08-31 14:31 ` Stefan Monnier
2007-09-02 18:52 ` Juri Linkov
2007-09-02 19:20 ` David Kastrup
2007-09-02 20:14 ` Juri Linkov
2007-09-02 20:34 ` David Kastrup
2007-09-02 20:44 ` Tom Tromey
2007-09-03 18:26 ` Richard Stallman
2007-09-02 23:20 ` Manoj Srivastava
2007-09-02 19:34 ` Tassilo Horn
2007-09-02 20:14 ` Juri Linkov
2007-09-03 19:15 ` Tassilo Horn
2007-09-03 15:31 ` Jeremy Maitin-Shepard
2007-09-03 18:26 ` Richard Stallman
2007-09-03 20:37 ` Stefan Monnier
2007-09-03 23:46 ` Juri Linkov
2007-09-04 23:08 ` Davis Herring
2007-09-05 20:02 ` Richard Stallman
2007-09-05 20:34 ` David Kastrup
2007-09-07 6:30 ` Richard Stallman
2007-09-07 7:06 ` David Kastrup [this message]
2007-09-08 7:01 ` Richard Stallman
2007-08-31 8:09 ` David Kastrup
2007-08-31 14:29 ` Stefan Monnier
2007-09-03 5:47 ` Edward O'Connor
2007-09-04 0:56 ` Richard Stallman
2007-09-04 5:56 ` David Kastrup
2007-09-04 22:57 ` Richard Stallman
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=851wdb7y4r.fsf@lola.goethe.zz \
--to=dak@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=juri@jurta.org \
--cc=rms@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.