[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Inserting output from a program into a buffer
From: |
Tim Landscheidt |
Subject: |
Re: Inserting output from a program into a buffer |
Date: |
Sun, 21 Feb 2010 16:08:45 +0000 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) |
Tim Johnson <tim@johnsons-web.com> wrote:
> [...]
>>> Consider the following text:
>>> [[10:00 11:27][14:43 14:57]] ;; ^output here
> [...]
>> Not exactly what you require, but
>> C-u M-x shell-command-on-region RET will /replace/ the re-
>> gion with the output of the shell-command operated on the
>> original region.
> Thanks for the reply. I had found that command, but unfortunately
> replacing the region is the last thing I want to do. The end game is a
> "time card", as you might guess from the data structure and the data
> structure needs to remain intact.
If the pattern is nothing fancy, you can always try C-M-%
with a replacement argument along the lines of
\1 ;; \,(shell-command-to-string (concat "echo \"" \1 "\" | your-command"))
I just tested it with bc. Beware of the newline at the end
of the shell output, though.
Tim
- Re: Inserting output from a program into a buffer, (continued)
- Re: Inserting output from a program into a buffer, Tim Johnson, 2010/02/21
- Re: Inserting output from a program into a buffer, Pascal J. Bourguignon, 2010/02/21
- Re: Inserting output from a program into a buffer, Tim Johnson, 2010/02/22
- Re: Inserting output from a program into a buffer, Pascal J. Bourguignon, 2010/02/22
- Re: Inserting output from a program into a buffer, Tim Johnson, 2010/02/22
- Re: Inserting output from a program into a buffer, Pascal J. Bourguignon, 2010/02/22
- Re: Inserting output from a program into a buffer, Tim Johnson, 2010/02/22
- Re: Inserting output from a program into a buffer, jpkotta, 2010/02/22
- Re: Inserting output from a program into a buffer, Tim X, 2010/02/22
- Re: Inserting output from a program into a buffer, tomas, 2010/02/21
- Re: Inserting output from a program into a buffer,
Tim Landscheidt <=
Re: Inserting output from a program into a buffer, Pascal J. Bourguignon, 2010/02/21