From: Kevin Rodgers <kevin.rodgers@ihs.com>
Subject: Re: align.el: how to align space delimited text tables?
Date: Fri, 20 Dec 2002 10:36:00 -0700 [thread overview]
Message-ID: <3E035500.6090200@ihs.com> (raw)
In-Reply-To: wc3bs3hsp9d.fsf@gamma.cis.ohio-state.edu
Benjamin Rutt wrote:
> I have a buffer in text-mode that I'd like to align using align.el.
> Here are the contents:
>
> max 4096 cs 70 ap_mp 9 t 55% np 63 ap 63
> max 6291.456 cs 70 ap_mp 9 t 55% np 63 ap 63
> max 8192 cs 70 ap_mp 9 t 55% np 63 ap 63
>
> I'd like to align the fields to the following:
>
> max 4096 cs 70 ap_mp 9 t 55% np 63 ap 63
> max 6291.456 cs 70 ap_mp 9 t 55% np 63 ap 63
> max 8192 cs 70 ap_mp 9 t 55% np 63 ap 63
>
> Anyone have a good recipe for this?
1. Mark the region (C-x h if the text is the entire contents of the buffer,
or the buffer has already been narrowed to the text).
2. Replace the region:
C-u M-|
awk '{printf("%s %-8s %s %s %s %s %s %s %s %s %s %s\n", C-q C-j
$1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12)}' RET
--
<a href="mailto:<kevin.rodgers@ihs.com>">Kevin Rodgers</a>
next prev parent reply other threads:[~2002-12-20 17:36 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-12-19 20:54 align.el: how to align space delimited text tables? Benjamin Rutt
2002-12-19 22:31 ` John Wiegley
2002-12-20 1:18 ` Miles Bader
[not found] ` <mailman.448.1040347168.19936.help-gnu-emacs@gnu.org>
2002-12-20 2:18 ` Benjamin Lewis
2002-12-20 8:34 ` John Wiegley
2002-12-20 17:36 ` Kevin Rodgers [this message]
-- strict thread matches above, loose matches on Subject: below --
2002-12-20 9:29 Victor Kirk
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=3E035500.6090200@ihs.com \
--to=kevin.rodgers@ihs.com \
/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.