From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Nicolas Richard Newsgroups: gmane.emacs.help Subject: Re: regexp on emacs how to... Date: Fri, 05 Sep 2014 14:02:33 +0200 Message-ID: <874mwm46na.fsf@geodiff-mac3.ulb.ac.be> References: <8761h764uv.fsf@geodiff-mac3.ulb.ac.be> <874mwrrudt.fsf@yahoo.fr> <4fcd473a-30bd-4f90-a9cc-d0a20ec52660@googlegroups.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1409918500 17596 80.91.229.3 (5 Sep 2014 12:01:40 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 5 Sep 2014 12:01:40 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Renato Pontefice Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Sep 05 14:01:33 2014 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 1XPsCq-0002G8-9j for geh-help-gnu-emacs@m.gmane.org; Fri, 05 Sep 2014 14:01:32 +0200 Original-Received: from localhost ([::1]:57342 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XPsCp-0002Sf-Sh for geh-help-gnu-emacs@m.gmane.org; Fri, 05 Sep 2014 08:01:31 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50723) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XPsCY-0002Re-Ql for help-gnu-emacs@gnu.org; Fri, 05 Sep 2014 08:01:22 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XPsCQ-0007VK-F3 for help-gnu-emacs@gnu.org; Fri, 05 Sep 2014 08:01:14 -0400 Original-Received: from mxin.ulb.ac.be ([164.15.128.112]:64939) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XPsCQ-0007V9-8Y for help-gnu-emacs@gnu.org; Fri, 05 Sep 2014 08:01:06 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AoQKAJ2kCVSkD4Xx/2dsb2JhbABZhDevbgEBAgIGoF4BgSB3hAQBBXkQCyElDwEEDTwTiC0BAxGqJ4xCAUoNhloBF4V8giKFAoFLEQFQB4RMBZpciTSHSYY5g2M7L4EPgUABAQE Original-Received: from mathsrv4.ulb.ac.be (HELO geodiff-mac3.ulb.ac.be) ([164.15.133.241]) by smtp.ulb.ac.be with ESMTP; 05 Sep 2014 14:00:04 +0200 In-Reply-To: (Renato Pontefice's message of "Thu, 4 Sep 2014 03:48:41 -0700 (PDT)") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.93 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 164.15.128.112 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:99663 Archived-At: Renato Pontefice writes: > Ok, this file (is an example) has not problem, but when I execute the > code, it arrive at the end of file but do not show that is arrived at > the endo of file As I think I have said by email (I should stop using multiple inboxes, I can never remember if I did send my answers), here's a snippet which should do what you want : (while (and (not (eobp)) (search-forward "[-" nil 'move))) (skip-chars-forward "A-Z") (unless (looking-at "-]") (message "Problem found, please fix and hit C-M-c to continue") (recursive-edit)) i.e. I switched to a non-boolean ('move) NOERROR argument to search-forward. HTH, -- Nicolas Richard