unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Baffled by M-x align/ align-regexp
@ 2008-04-17  9:09 Sivaram Neelakantan
  0 siblings, 0 replies; 3+ messages in thread
From: Sivaram Neelakantan @ 2008-04-17  9:09 UTC (permalink / raw)
  To: help-gnu-emacs

I wanted to align text and so rooted around the manual to find out how
to do it.  Found align but couldn't figure how to get it to align text
the way I wanted.

Say I want to go from 

1 200 3 4
10 11 12 14
999 10 4000 897

to 

1   200 3    4
10  11  12   14
999 10  4000 897

How do I do that?  I tried M-x align, align-regexp with \\( +\\), with
C-u 3 M-x align-regexp \\( +\\) and leaving the rest as
defaults.  Nothing worked. 

Is this the right function to use?  I'd expect,with text too,I'd have
a similar requirement; either right or left justified.

 sivaram
 -- 
Win 32 Emacs-22.2





^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Baffled by M-x align/ align-regexp
       [not found] <mailman.10474.1208423396.18990.help-gnu-emacs@gnu.org>
@ 2008-04-19 10:58 ` Sven Naumann
  2008-04-20 16:13   ` Sivaram Neelakantan
  0 siblings, 1 reply; 3+ messages in thread
From: Sven Naumann @ 2008-04-19 10:58 UTC (permalink / raw)
  To: help-gnu-emacs

Sivaram Neelakantan <nsivaram.net@gmail.com> writes:


> Say I want to go from 
>
> 1 200 3 4
> 10 11 12 14
> 999 10 4000 897
>
> to 
>
> 1   200 3    4
> 10  11  12   14
> 999 10  4000 897
>


C-u M-x align-regexp RET \(\s-*\)SPACE RET 1 RET 0 RET y


Sven


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Baffled by M-x align/ align-regexp
  2008-04-19 10:58 ` Sven Naumann
@ 2008-04-20 16:13   ` Sivaram Neelakantan
  0 siblings, 0 replies; 3+ messages in thread
From: Sivaram Neelakantan @ 2008-04-20 16:13 UTC (permalink / raw)
  To: help-gnu-emacs

Sven Naumann <svenau@gmx.net> writes:

> Sivaram Neelakantan <nsivaram.net@gmail.com> writes:
>
>
>> Say I want to go from 
>>
>> 1 200 3 4
>> 10 11 12 14
>> 999 10 4000 897
>>
>> to 
>>
>> 1   200 3    4
>> 10  11  12   14
>> 999 10  4000 897
>>
>
>
> C-u M-x align-regexp RET \(\s-*\)SPACE RET 1 RET 0 RET y
>
Thank you, that worked.  It also is now answered on the emacswiki link

http://www.emacswiki.org/cgi-bin/wiki/CategoryAlignment


 sivaram
 -- 





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-04-20 16:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-17  9:09 Baffled by M-x align/ align-regexp Sivaram Neelakantan
     [not found] <mailman.10474.1208423396.18990.help-gnu-emacs@gnu.org>
2008-04-19 10:58 ` Sven Naumann
2008-04-20 16:13   ` Sivaram Neelakantan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).