From: Kaushal Modi <kaushal.modi@gmail.com>
To: Angus Comber <anguscomber@gmail.com>, help-gnu-emacs@gnu.org
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 [thread overview]
Message-ID: <CAFyQvY3fyQD0uPmxS6bc7_a4wYN-NnPh2jkmJRqoibPf62LiXg@mail.gmail.com> (raw)
In-Reply-To: <0b6f7632-f4c0-47c9-b3fb-b5d554c358c1@googlegroups.com>
On Tue, May 16, 2017 at 12:35 PM Angus Comber <anguscomber@gmail.com> 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:
>
> symbol<tab>Description
>
> 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
next prev parent reply other threads:[~2017-05-16 17:38 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-16 16:34 Is it possible to move a column where column on right is variable width Angus Comber
2017-05-16 17:38 ` Kaushal Modi [this message]
2017-05-16 19:11 ` Joost Kremers
2017-05-16 19:23 ` Emanuel Berg
2017-05-16 19:32 ` Kaushal Modi
2017-05-16 18:51 ` Tomas Nordin
2017-05-16 19:14 ` Emanuel Berg
2017-05-16 21:56 ` Tomas Nordin
2017-05-17 1:17 ` Skip Montanaro
2017-05-17 2:05 ` Ben Bacarisse
2017-05-17 6:22 ` Loris Bennett
2017-05-18 6:17 ` hector
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAFyQvY3fyQD0uPmxS6bc7_a4wYN-NnPh2jkmJRqoibPf62LiXg@mail.gmail.com \
--to=kaushal.modi@gmail.com \
--cc=anguscomber@gmail.com \
--cc=help-gnu-emacs@gnu.org \
/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.
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).