From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: "Loris Bennett" Newsgroups: gmane.emacs.help Subject: Re: Is it possible to move a column where column on right is variable width Date: Wed, 17 May 2017 08:22:49 +0200 Organization: Freie Universitaet Berlin Message-ID: <8737c4vw7a.fsf@fu-berlin.de> References: <0b6f7632-f4c0-47c9-b3fb-b5d554c358c1@googlegroups.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1495002328 17438 195.159.176.226 (17 May 2017 06:25:28 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 17 May 2017 06:25:28 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed May 17 08:25:24 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 1dAsOh-0004Nu-Sp for geh-help-gnu-emacs@m.gmane.org; Wed, 17 May 2017 08:25:23 +0200 Original-Received: from localhost ([::1]:45673 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dAsOl-00038H-LF for geh-help-gnu-emacs@m.gmane.org; Wed, 17 May 2017 02:25:27 -0400 Original-Path: usenet.stanford.edu!fu-berlin.de!uni-berlin.de!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 46 Original-X-Trace: news.uni-berlin.de SrwjHzUsy0JYckbWSQOqBAfHqGhpQ1DG847Lrbqd/NSFa3 Cancel-Lock: sha1:6rlFnefsHFd2nU9A7GtPJtEUKIU= Original-Xref: usenet.stanford.edu gnu.emacs.help:219121 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:113046 Archived-At: Angus Comber writes: > I downloaded a file, LSE.txt from this link: > > http://www.eoddata.com/Data/symbollist.aspx?e=LSE > > 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) > > What I would like to do is swap so it displays: > DescriptionSymbol. > > I tried using rectangles, eg: > > set mark at top left buffer, C-space select area, ie selected area is > all of Symbols column Then c-x r k to remove the symbols from 1st > column and save to the rectangle kill ring. then I replace $ with > tab. > > Then I navigate to the end of the first line and try c-x r y - but > that inserts the symbols into the middle of the Descriptions. > > Is there any way to do what I want? You could convert to a an Org mode table, reorder the columns and, if needed, convert back to plain(er) text: 1. M-x orgtbl-mode 2. Highlight the lines 3. Do C-c | (or M-x orgtbl-create-or-convert-from-region) 4. With the cursor in the left-hand column, do M- 5. Replace the |-symbols Cheers, Loris -- This signature is currently under construction.