From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: hector Newsgroups: gmane.emacs.help Subject: Re: Is it possible to move a column where column on right is variable width Date: Thu, 18 May 2017 08:17:29 +0200 Message-ID: <20170518061729.GB2833@workstation> References: <0b6f7632-f4c0-47c9-b3fb-b5d554c358c1@googlegroups.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: blaine.gmane.org 1495088386 12074 195.159.176.226 (18 May 2017 06:19:46 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 18 May 2017 06:19:46 +0000 (UTC) User-Agent: Mutt/1.5.20 (2009-06-14) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu May 18 08:19:42 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 1dBEmk-0002xF-1C for geh-help-gnu-emacs@m.gmane.org; Thu, 18 May 2017 08:19:42 +0200 Original-Received: from localhost ([::1]:51966 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dBEmk-0001Pp-5G for geh-help-gnu-emacs@m.gmane.org; Thu, 18 May 2017 02:19:42 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48980) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dBEkn-0000ZV-2q for help-gnu-emacs@gnu.org; Thu, 18 May 2017 02:17:42 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dBEki-0002cE-3E for help-gnu-emacs@gnu.org; Thu, 18 May 2017 02:17:41 -0400 Original-Received: from mail-wm0-x22b.google.com ([2a00:1450:400c:c09::22b]:38652) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dBEkh-0002c2-Sn for help-gnu-emacs@gnu.org; Thu, 18 May 2017 02:17:36 -0400 Original-Received: by mail-wm0-x22b.google.com with SMTP id v15so40085653wmv.1 for ; Wed, 17 May 2017 23:17:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:date:to:subject:message-id:mail-followup-to:references :mime-version:content-disposition:in-reply-to:user-agent; bh=bQ8eZcM/rKoC2rOZK6ds/XzQnxqHZGgDra0gQwoU3DY=; b=RgDSC1oY5WFc4tlrPY6lc4JS9Oz3ZQAJ3G6Crp91gB5UJtdeJRmfCTaPqb7I9CLl1x Nd1Z3Jlp4t7hO11rrLVpgAipuaKsxv3dcWSfyfYQXDtbCWTnAeJMBq6kOVnAshAJmV+s GVMdvpiFNt77dOYdLTN5MFLVMwkuiYULzRygK7xQgjoO//hWm0piz19d5ILgxOBjWQ8c tWLwu6RPFHKNcH9iwX80M25W4cEvozS+DpBOWIhx9LzJlFwlS5yKP0HW9XqorrTZns8U mkHhFu2GrMZ3AGgi4TrgIlJDDxQvCQGoXqFw4cxEijfHnoYCUej2spjUc6a7hk5U49t2 g1vg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:date:to:subject:message-id:mail-followup-to :references:mime-version:content-disposition:in-reply-to:user-agent; bh=bQ8eZcM/rKoC2rOZK6ds/XzQnxqHZGgDra0gQwoU3DY=; b=NONIXiCbZS4Zc4iXtHg68+DZrIm9Rd7fqFpgr7q4FKg8zkIBgBZpa1yxU8mPUqovDQ X49XPdZZPNjKeVVHYI9suI3PnSsmPUtzwjInZY0RqfMKwa+WC4dO+mqJJWRNUfGrqTSR vh8F9q2gGm2xz3lpkY6RRnabzFD5HHs25jgMhmwUXLXdgYkvD1VMzCvqjiO6mP7AC6DF ggsPRs2F2Y2NaBT8cSFFZ2LB41TbmMLHJphdAjHjzPPy+o8I6YM3wNydgUsoKczfRf9E lBVM/LmK48mRhNHZvb0owEBtPBnhes/DGaRJJtM32dMDFRL9e7aTkfhFjelpNEhiw8Qi OCfw== X-Gm-Message-State: AODbwcBfNW+tYsn7hsDK3EXxk2bIQ46XLsUH38FIe08sseIychl1Kh9m e6FYVFudu/77vfz6 X-Received: by 10.28.101.6 with SMTP id z6mr1639498wmb.134.1495088253436; Wed, 17 May 2017 23:17:33 -0700 (PDT) Original-Received: from workstation (static-133-67-61-95.ipcom.comunitel.net. [95.61.67.133]) by smtp.gmail.com with ESMTPSA id y190sm21118255wmy.15.2017.05.17.23.17.32 for (version=TLS1 cipher=AES128-SHA bits=128/128); Wed, 17 May 2017 23:17:32 -0700 (PDT) X-Google-Original-From: hector Mail-Followup-To: help-gnu-emacs@gnu.org Content-Disposition: inline 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:400c:c09::22b 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:113055 Archived-At: On Tue, May 16, 2017 at 09:34:02AM -0700, Angus Comber wrote: > 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 think it is already solved but just another approach. Lately I tend to use macros for a lot of things. It is a way of programming without having to know the syntax. Very easy and very powerful if you don't care much about efficiency. Record this macro: C-SPC ; set mark at the beginning M-x search-forward RET C-q TAB RET ; go past the first TAB C-b ; go backwards C-d ; delete TAB C-w ; kill region (the first field) C-e ; go to end of line C-q TAB ; insert TAB C-y ; yank the first field Then just repeat it for all the lines (apply-macro-to-region-lines) and that's it.