all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Tim X <timx@nospam.dev.null>
To: help-gnu-emacs@gnu.org
Subject: Re: stdin/stdout
Date: Wed, 23 Jul 2008 21:03:23 +1000	[thread overview]
Message-ID: <87iquw277o.fsf@lion.rapttech.com.au> (raw)
In-Reply-To: dbf5c8dd-31a8-4a1a-a495-c2651af5f2e7@l64g2000hse.googlegroups.com

"Jack O'Connor" <oconnor663@gmail.com> writes:

> Is there any way in Emacs to read standard input into a buffer or to
> send the contents of a buffer to the standard output (particularly
> both with editing in between)? I'm interested in being able to do
> things like the following:
>
> decrypt file.crypt | emacs | encrypt > file2.crypt
>                      ---or perhaps---
> curl some-website-with-code.com | emacs | python
>                     ---or even just---
> emacs < file.txt > edited_file.txt
>
> Thanks very much for your help.
>
> - Jack O'Connor

Not really answering your question, but ....

For each of the examples you have, emacs has a solution. 

For encryption/decryption, there is crypt++ that will allow you to
encrypt files and decrypt them from within emacs. Note also that emacs
23 comes with support for gnupg built-in.

For your curl example, there is an interface for wget (wget.el) and I
think also curl.

Your last example, I don't really get. Emacs does have a 'script' mode
that will allow you to process files and apply emacs functions to them
(assuming your example is about non-interactive editing/processing of
files. 

The point to note is that emacs is a pretty heavy duty piece of software
that can be a bit slow to start/stop. While batch mode and script mode
does mean you can do stuff non0interactively, in most cases, there are
far beter tools. Most long-term emacs users learn to adjust to a
paradigm where emacs is left running for long periods of time. I usually
have my emacs running for weeks at a time - using things like the emacs
client and server mode, you can leave emacs running and configure your
system to just opo up a frame when an application needs input - for
example, when you run crontab -e etc. 

tim

-- 
tcross (at) rapttech dot com dot au


  reply	other threads:[~2008-07-23 11:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-22 12:49 stdin/stdout Jack O'Connor
2008-07-23 11:03 ` Tim X [this message]
2008-07-25 10:53   ` stdin/stdout Dan Davison

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=87iquw277o.fsf@lion.rapttech.com.au \
    --to=timx@nospam.dev.null \
    --cc=help-gnu-emacs@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.