From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Kaushal Modi Newsgroups: gmane.emacs.help Subject: Re: Is it possible to move a column where column on right is variable width Date: Tue, 16 May 2017 17:38:21 +0000 Message-ID: References: <0b6f7632-f4c0-47c9-b3fb-b5d554c358c1@googlegroups.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-Trace: blaine.gmane.org 1494956377 23949 195.159.176.226 (16 May 2017 17:39:37 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 16 May 2017 17:39:37 +0000 (UTC) To: Angus Comber , help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue May 16 19:39:32 2017 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dAgRX-000662-HJ for geh-help-gnu-emacs@m.gmane.org; Tue, 16 May 2017 19:39:31 +0200 Original-Received: from localhost ([::1]:43339 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dAgRd-00061K-5u for geh-help-gnu-emacs@m.gmane.org; Tue, 16 May 2017 13:39:37 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48228) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dAgQd-0005cl-N1 for help-gnu-emacs@gnu.org; Tue, 16 May 2017 13:38:36 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dAgQc-0006dU-9a for help-gnu-emacs@gnu.org; Tue, 16 May 2017 13:38:35 -0400 Original-Received: from mail-lf0-x22f.google.com ([2a00:1450:4010:c07::22f]:33736) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dAgQc-0006d3-1i for help-gnu-emacs@gnu.org; Tue, 16 May 2017 13:38:34 -0400 Original-Received: by mail-lf0-x22f.google.com with SMTP id m18so16100268lfj.0 for ; Tue, 16 May 2017 10:38:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=3j2X59I9sw8FeWdExCw3J8uTJfpwy7r9ZVWPZFfeLZ4=; b=I1qAVU1Yboqp7g7Sks9JtKx+MWECEduRjCePWrVGPI/wlzWL2mYG7KuHHVgdHIhc6U inTwBnQKTXUNt7xn1Ltnv21tIvwIDlCxhdMFLcDYmYznpQEhkHiXZrw+PlKDzsvxfFG9 UL+8ASMf3eOABhwmk3vJHIIQ7MGXcUI7bIUQpIG249/7AANVAb+TjKvJ6lOH+/YcW2i6 arZdg1bvmMmXOI02sOp98MSmWiw6/0O9JyvlzDTmbX4knpSxpmWRCBHhFhqMtWEuoibI QVTpK46M61ziScncGiyl9bhezDcyoevEU2igR8FcgGd5N2sOpfPMKiZ6gF5i9jnKZlzU 6Kag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=3j2X59I9sw8FeWdExCw3J8uTJfpwy7r9ZVWPZFfeLZ4=; b=isfjh3Ov2ry0s6i9WSZVNkqXiB5CqUwI31qu5OWybwkNORyL6+UByTC07rlW3Ay1Yh ZDR8lT9SRn/s1AmNq7cVcsI5BsbHyECWEh3vavvR+zEOtGwTqdaO8gxX6MUK8QD/ig5w HPxgLni0BAJwh+R1JmZdISIeJqVl7B9r0qdrOaTZEg0zzgCWXcyZs6Tf0EBUYrvVOPcX fj3kf2OHD2JbNuqpnxGVkFEzChIhSpbn/GTwxqPPLWJmHCAtMh97EwJ55as+bx1ChvJR nfQShMcPTEgDzmzj8XizrJieDz3gLEUy3TxuFRoSF2jGbF7vmskJVHs9PKV8zQpo1tDG 7OwA== X-Gm-Message-State: AODbwcCNrgmQN35P8MgpOeq4kA60ahTjmCTrUAvtb7I1nT1BQM8MX/Na BxDsNZTl9mePKfryL+Vd6Pa2iQyK/g== X-Received: by 10.46.84.94 with SMTP id y30mr3764584ljd.114.1494956312475; Tue, 16 May 2017 10:38:32 -0700 (PDT) In-Reply-To: <0b6f7632-f4c0-47c9-b3fb-b5d554c358c1@googlegroups.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4010:c07::22f X-Content-Filtered-By: Mailman/MimeDel 2.1.21 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:113036 Archived-At: On Tue, May 16, 2017 at 12:35 PM Angus Comber wrote: > I downloaded a file, LSE.txt from this link: > > http://www.eoddata.com/Data/symbollist.aspx?e=LSE I cannot access that site without a login, but I used the below data snippet of yours. > which is of the form: > > symbolDescription > > the description is pretty free form. Here are some examples: > > 06GG.L BARCLAYS BANK PLC UNDATED FLTG RATE PRIM CAP NOTES'2'USD > 06GL.L NATIONAL GRID GAS 8.75% BDS 27/6/25 GBP(VAR) > 07OZ.L HAMMERSON PLC 6.875% BDS 31/3/20 GBP(VAR) > > Is there any way to do what I want? > As the Description portion of the data is not of equal width, using rectanges gets tricky. A simple query-replace-regexp works in this case. 1. M-x query-replace-regexp (or C-M-%) 2. Enter this in the first field: ^\([^[:space:]]+\)[[:space:]]+\(.+\) and hit return. 3. Enter this in the next field: \2 \1 (or, \2 C-q TAB \1) and hit return 4. Hit ! to execute that search/replace for all hits. -- Kaushal Modi