From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Tomas Nordin 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 20:51:25 +0200 Message-ID: <87wp9gprde.fsf@fliptop> 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 1494960726 27534 195.159.176.226 (16 May 2017 18:52:06 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 16 May 2017 18:52:06 +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 20:52:03 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 1dAhZi-0006yr-Vg for geh-help-gnu-emacs@m.gmane.org; Tue, 16 May 2017 20:52:03 +0200 Original-Received: from localhost ([::1]:43496 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dAhZm-0001Nw-Ut for geh-help-gnu-emacs@m.gmane.org; Tue, 16 May 2017 14:52:07 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37609) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dAhZI-0001Nr-HX for help-gnu-emacs@gnu.org; Tue, 16 May 2017 14:51:37 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dAhZD-0002Dc-Ll for help-gnu-emacs@gnu.org; Tue, 16 May 2017 14:51:36 -0400 Original-Received: from mout02.posteo.de ([185.67.36.66]:51879) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dAhZD-0002Cq-FF for help-gnu-emacs@gnu.org; Tue, 16 May 2017 14:51:31 -0400 Original-Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id 0914620449 for ; Tue, 16 May 2017 20:51:26 +0200 (CEST) Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 3wS63x6NZ6z109P; Tue, 16 May 2017 20:51:25 +0200 (CEST) In-Reply-To: <0b6f7632-f4c0-47c9-b3fb-b5d554c358c1@googlegroups.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 185.67.36.66 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:113037 Archived-At: > 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. > Here is a suggestion using GNU sed C-x h mark-whole-buffer C-u M-| shell-command-on-region (with prefix to output in buffer) then yank this as the shell command sed -E 's/(.+)\t(.+)/\2\t\1/' and hope there was no tabs in the description. -- Tomas