help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Find first line FOLLOWING a sequence of matches


From: Bob Proulx
Subject: Re: Find first line FOLLOWING a sequence of matches
Date: Tue, 28 Apr 2015 22:37:00 -0600
User-agent: Mutt/1.5.23 (2014-03-12)

Subhan Michael Tindall wrote:
> Looking for a way to search for the LAST match for a given element

As a quick hint looking for the last item is the same as a
search backward from the bottom up.  The last item is the first one
found in reverse.  Does that help?

> With that I should be able to macro-ize my keystrokes and save some
> time, or 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

Jump to the bottom of the file.  Search upward with one of the search
backward commands.  Perhaps search-backward-regexp?  That will locate
the last item.  Then move to the beginning of line.  Then next line.
That should do what you need.

> Move down a line
> Copy m & insert ,* m header
> Search for m in column 1
> <repeat>

Seems like you should be able to macro-ize that process easily.

Bob

> This message is intended for the sole use of the individual and
> entity to which it is addressed and may contain information that is
> privileged, confidential and exempt from disclosure under applicable
> law. If you are not the intended addressee, nor authorized to
> receive for the intended addressee, you are hereby notified that you
> may not use, copy, disclose or distribute to anyone the message or
> any information contained in the message. If you have received this
> message in error, please immediately advise the sender by reply
> email and delete the message.  Thank you.

READ CAREFULLY.  By reading this email, you agree, on behalf of your
employer, to release me from all obligations and waivers arising from
any and all NON-NEGOTIATED agreements, licences, terms-of-service,
shrinkwrap, clickwrap, browsewrap, confidentiality, non-disclosure,
non-compete and acceptable use policies ("BOGUS AGREEMENTS") that I
have entered into with your employer, its partners, licensors, agents
and assigns, in perpetuity, without prejudice to my ongoing rights and
privileges.  You further represent that you have the authority to
release me from any BOGUS AGREEMENTS on behalf of your employer.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]