From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Scott Frazer Newsgroups: gmane.emacs.help Subject: Re: Fancier align-regexp? Date: Tue, 13 Jan 2009 09:57:09 -0500 Organization: Ye 'Ol Disorganized NNTPCache groupie Message-ID: <1231858629.815474@sj-nntpcache-2.cisco.com> References: <3e3b99bf-a2ad-43a8-8a56-de3f47c0455a@f40g2000pri.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1231861706 30804 80.91.229.12 (13 Jan 2009 15:48:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 13 Jan 2009 15:48:26 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Jan 13 16:49:37 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1LMlVr-0004w9-H1 for geh-help-gnu-emacs@m.gmane.org; Tue, 13 Jan 2009 16:49:07 +0100 Original-Received: from localhost ([127.0.0.1]:60906 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LMlUb-0002rd-55 for geh-help-gnu-emacs@m.gmane.org; Tue, 13 Jan 2009 10:47:49 -0500 Original-Path: news.stanford.edu!newsfeed.stanford.edu!postnews.google.com!news2.google.com!npeer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!post01.iad.highwinds-media.com!newsfe13.iad.POSTED!7564ea0f!not-for-mail User-Agent: Thunderbird 2.0.0.19 (Windows/20081209) Original-Newsgroups: gnu.emacs.help In-Reply-To: <3e3b99bf-a2ad-43a8-8a56-de3f47c0455a@f40g2000pri.googlegroups.com> Cache-Post-Path: sj-nntpcache-2.cisco.com!unknown@scfrazer-wxp.cisco.com X-Cache: nntpcache 3.0.2 (see http://www.nntpcache.com/) Original-Lines: 35 Original-X-Complaints-To: newsadmin@cisco.com Original-NNTP-Posting-Date: Tue, 13 Jan 2009 14:57:09 UTC Original-Xref: news.stanford.edu gnu.emacs.help:165967 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:61296 Archived-At: jrwats wrote: > Input: > Lorem ipsum dolor: sit amet > consectetur: adipiscing elit. Etiam > sed purus: Vestibulum > ante: ipsum > primis in: faucibus > > You'll have to paste the following into emacs I'm afraid (or set your > browser to monospace font?) to get this to look 1/2 decent. > > I want (the colons aligned with the words preceding them "following" > the colon to the aligned point) > Internet IP Address: 67.170.74.92 > Subnet Mask: 255.255.252.0 > Default Gateway: 67.170.72.1 > DNS1: 68.87.69.146 > DNS2: 68.87.85.98 > DNS3: 68.87.78.130 > > > calling align-regexp on ":" doesn't work obviously and puts the spaces > between the words preceding the colon: > rem ipsum dolor : sit amet > consectetur : adipiscing elit. Etiam > sed purus : Vestibulum > ante : ipsum > primis in : faucibus > > I know align-regexp has a fancier method to use with a prefix arg, but > I'm not smart enough for it. Is it possible to accomplish this with > align-regexp? A macro? > C-u M-x align-regexp \(\s-*.+\): -1 1 n