From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Subhan Michael Tindall Newsgroups: gmane.emacs.help Subject: Find first line FOLLOWING a sequence of matches Date: Tue, 28 Apr 2015 16:53:58 +0000 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1430240375 30107 80.91.229.3 (28 Apr 2015 16:59:35 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 28 Apr 2015 16:59:35 +0000 (UTC) To: "'help-gnu-emacs@gnu.org'" Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Apr 28 18:59:34 2015 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Yn8r4-0002f6-Po for geh-help-gnu-emacs@m.gmane.org; Tue, 28 Apr 2015 18:59:30 +0200 Original-Received: from localhost ([::1]:35060 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yn8r4-0000PG-49 for geh-help-gnu-emacs@m.gmane.org; Tue, 28 Apr 2015 12:59:30 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49119) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yn8m7-0007Cp-Hu for help-gnu-emacs@gnu.org; Tue, 28 Apr 2015 12:54:25 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yn8m4-0001ln-8c for help-gnu-emacs@gnu.org; Tue, 28 Apr 2015 12:54:23 -0400 Original-Received: from outbound.familycareinc.org ([207.170.205.147]:21789) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yn8m3-0001l9-UD for help-gnu-emacs@gnu.org; Tue, 28 Apr 2015 12:54:20 -0400 X-IronPort-AV: E=Sophos;i="5.11,664,1422950400"; d="scan'208,217";a="2998435" Original-Received: from fcmailsvr3.familycareinc.org ([10.0.1.3]) by fcspamapp1.familycareinc.org with ESMTP; 28 Apr 2015 09:54:17 -0700 Original-Received: from FCMAILSVR3.familycareinc.org (10.0.1.3) by fcmailsvr3.familycareinc.org (10.0.1.3) with Microsoft SMTP Server (TLS) id 15.0.995.29; Tue, 28 Apr 2015 09:53:59 -0700 Original-Received: from FCMAILSVR3.familycareinc.org ([fe80::5cb2:1190:1d40:d51e]) by fcmailsvr3.familycareinc.org ([fe80::5cb2:1190:1d40:d51e%18]) with mapi id 15.00.0995.028; Tue, 28 Apr 2015 09:53:59 -0700 Thread-Topic: Find first line FOLLOWING a sequence of matches Thread-Index: AdCB0opyxHV9EXh9ReW5pj14W6v6dA== Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.0.1.170] X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 207.170.205.147 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 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-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:104037 Archived-At: Table like this: (abbreviated) |a|b|c| |a|d|e| |a|z|| |m|b|c| |m|c|d| |ab|c|d| First col is relevant (actual table is MUCH bigger) I'm looking to write a macro to convert this table (on an occasionally rec= urring basis) To something like: ,* a |a|b|c| |a|d|e| |a|z|| ,* m |m|b|c| |m|c|d| ,* ab |ab|c|d| The entries in first column are always strings of characters, no internal w= hitespace Looking for a way to search for the LAST match for a given element With that I should be able to macro-ize my keystrokes and save some time, o= r better yet come up with something to fully process the file EG: Insert ,* a header Search for a in column 1 Find the last a in the block Move down a line Copy m & insert ,* m header Search for m in column 1 Thousands of lines, hundreds of blocks, don't make me export this to excel = and do it there! This message is intended for the sole use of the individual and entity to w= hich it is addressed and may contain information that is privileged, confid= ential and exempt from disclosure under applicable law. If you are not the = intended addressee, nor authorized to receive for the intended addressee, y= ou are hereby notified that you may not use, copy, disclose or distribute t= o anyone the message or any information contained in the message. If you ha= ve received this message in error, please immediately advise the sender by = reply email and delete the message. Thank you.