From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jack Duthen Newsgroups: gmane.emacs.bugs Subject: bug#11025: 23.1; re-search-backward does not find the right beginning of the regexp Date: Fri, 16 Mar 2012 12:40:22 +0100 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1331914819 2421 80.91.229.3 (16 Mar 2012 16:20:19 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 16 Mar 2012 16:20:19 +0000 (UTC) To: 11025@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Mar 16 17:20:18 2012 Return-path: Envelope-to: geb-bug-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 1S8Zt4-00028p-8H for geb-bug-gnu-emacs@m.gmane.org; Fri, 16 Mar 2012 17:20:18 +0100 Original-Received: from localhost ([::1]:51923 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S8Zt3-0000tA-JQ for geb-bug-gnu-emacs@m.gmane.org; Fri, 16 Mar 2012 12:20:17 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:41300) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S8Zsh-0000am-Ox for bug-gnu-emacs@gnu.org; Fri, 16 Mar 2012 12:20:02 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S8Zsb-0006AO-99 for bug-gnu-emacs@gnu.org; Fri, 16 Mar 2012 12:19:55 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:46846) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S8Zsb-0006AH-31 for bug-gnu-emacs@gnu.org; Fri, 16 Mar 2012 12:19:49 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1S8aLq-0005tG-A5 for bug-gnu-emacs@gnu.org; Fri, 16 Mar 2012 12:50:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Jack Duthen Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 16 Mar 2012 16:50:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 11025 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.133191659122604 (code B ref -1); Fri, 16 Mar 2012 16:50:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 16 Mar 2012 16:49:51 +0000 Original-Received: from localhost ([127.0.0.1]:53674 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1S8aLU-0005sE-64 for submit@debbugs.gnu.org; Fri, 16 Mar 2012 12:49:51 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:35240) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1S8W0O-0007y6-JD for submit@debbugs.gnu.org; Fri, 16 Mar 2012 08:11:38 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S8VX3-00028d-BZ for submit@debbugs.gnu.org; Fri, 16 Mar 2012 07:41:23 -0400 Original-Received: from lists.gnu.org ([208.118.235.17]:43484) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S8VX3-00028Y-6E for submit@debbugs.gnu.org; Fri, 16 Mar 2012 07:41:17 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:45054) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S8VWw-0001CM-QS for bug-gnu-emacs@gnu.org; Fri, 16 Mar 2012 07:41:16 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S8VWX-00025D-Fg for bug-gnu-emacs@gnu.org; Fri, 16 Mar 2012 07:41:10 -0400 Original-Received: from mail-yw0-f41.google.com ([209.85.213.41]:49802) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S8VWX-00024t-71 for bug-gnu-emacs@gnu.org; Fri, 16 Mar 2012 07:40:45 -0400 Original-Received: by yhr47 with SMTP id 47so4920205yhr.0 for ; Fri, 16 Mar 2012 04:40:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:from:date:x-google-sender-auth:message-id :subject:to:content-type:content-transfer-encoding; bh=Xj2W7aktBNycTMIPTZpAZAQ9H+w7ZajCFRZ5ir8ZDTo=; b=iSS150MbIguSouAVLPToL3x/qD3SP4mLmu5LFQoHlsqcgZYGURAG/+jXGpSiuMfv2L wWGOPNnvjxoBH7CeWvbvYmxPUmSj5Qds2uhPsNr5XqGx4+aQ4yMuPFoFZNGJIu36q5wx QAZDguLGwEQx5884HBWRY7OtNXGuQRLrgdgXg/tTTtFenm2MVdR9+kc+CjEfh9zHkfNt f3olFAeq6x5FCy260E7CGeUlLl1YWNwWEY/NIpT1XZUxx8VfczghfiwiIPPaz5LTpbsj 6PL0ZsGlIYoo5qqQXMgfGqBI+l07e/r0FITIhWyJszAVbEPuhsdC6FAQy88n5qeoeoG8 qWkg== Original-Received: by 10.60.22.233 with SMTP id h9mr2790250oef.30.1331898042250; Fri, 16 Mar 2012 04:40:42 -0700 (PDT) Original-Received: by 10.182.171.97 with HTTP; Fri, 16 Mar 2012 04:40:22 -0700 (PDT) X-Google-Sender-Auth: _4mc1XdoWyw7wlbEghz2PhjmcNs X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Mailman-Approved-At: Fri, 16 Mar 2012 12:49:38 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-Mailman-Approved-At: Fri, 16 Mar 2012 12:20:15 -0400 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:57826 Archived-At: --text follows this line-- Hello, I'm editing a ".el" file, in emacs-lisp-mode, and I use the standard value of `comment-start-skip': ;;; (insert comment-start-skip) "\(\(^\|[^\\ ]\)\(\\\\\)*\);+ *"=A0 <-- I added the quotes here ;;; Test #1 ;;; (progn (beginning-of-line) (looking-at comment-start-skip)) ;;; Move the point at the end of the previous line and type C-x C-e ;;; It moves the point at the beginning of the line and returns T. Ok. ;;; (progn (previous-line) (re-search-forward comment-start-skip)) ;;; Move the point at the end of the previous line and type C-x C-e ;;; It moves the point on the first "(". Ok. ;;; Thus the string "^;;; " matches the regexp `comment-start-skip'. ;;; (re-search-backward comment-start-skip) ;;; Move the point at the end of the previous line and type C-x C-e ;;; It moves the point just one character AFTER the first semicolon. ;;; I would expect it to move the point at the beginning of the line ;;; since, as shown previously, it matches the regexp and this match ;;; includes the match actually found. ;;; Test #2 ; (setq re1 (concat comment-start-skip "--+\n" comment-start-skip " [^ ].*\= n")) ; (setq re (concat "\\(" re1 "\\)+")) ; Move the point at the end of the next line and type C-x C-e to see the ma= tch ; (progn (forward-char) (and (looking-at re) (re-search-forward re))) ; ---------- ; this yes ; ---------- ; this no ; ---------- ; ; (re-search-backward re) ; Move the point at the end of the previous line and type C-x C-e ; The point moves to the beginning of the line before "this no". ; =3D> Bug In GNU Emacs 23.1.1 (i686-pc-linux-gnu, GTK+ Version 2.22.0) =A0of 2011-03-04 on roseapple, modified by Debian Windowing system distributor `The X.Org Foundation', version 11.0.10900000 configured using `configure=A0 '--build=3Di686-linux-gnu' '--host=3Di686-linux-gnu' '--prefix=3D/usr' '--sharedstatedir=3D/var/lib' '--libexecdir=3D/usr/lib' '--localstatedir=3D/var/lib' '--infodir=3D/usr/share/info' '--mandir=3D/usr/share/man' '--with-pop=3Dyes= ' '--enable-locallisppath=3D/etc/emacs23:/etc/emacs:/usr/local/share/emacs/23= .1/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/23.1/site-li= sp:/usr/share/emacs/site-lisp:/usr/share/emacs/23.1/leim' '--with-x=3Dyes' '--with-x-toolkit=3Dgtk' '--with-toolkit-scroll-bars' 'build_alias=3Di686-linux-gnu' 'host_alias=3Di686-linux-gnu' 'CFLAGS=3D-DDEBIAN -g -O2' 'LDFLAGS=3D-g' 'CPPFLAGS=3D'' Important settings: =A0 value of $LC_ALL: nil =A0 value of $LC_COLLATE: nil =A0 value of $LC_CTYPE: nil =A0 value of $LC_MESSAGES: nil =A0 value of $LC_MONETARY: nil =A0 value of $LC_NUMERIC: nil =A0 value of $LC_TIME: nil =A0 value of $LANG: fr_FR.utf8 =A0 value of $XMODIFIERS: nil =A0 locale-coding-system: utf-8-unix =A0 default-enable-multibyte-characters: t Major mode: Emacs-Lisp Minor modes in effect: =A0 which-function-mode: t =A0 diff-auto-refine-mode: t =A0 eldoc-mode: t =A0 show-paren-mode: t =A0 recentf-mode: t =A0 desktop-save-mode: t =A0 tooltip-mode: t =A0 mouse-wheel-mode: t =A0 menu-bar-mode: t =A0 file-name-shadow-mode: t =A0 global-font-lock-mode: t =A0 font-lock-mode: t =A0 blink-cursor-mode: t =A0 global-auto-composition-mode: t =A0 auto-composition-mode: t =A0 auto-encryption-mode: t =A0 auto-compression-mode: t =A0 column-number-mode: t =A0 line-number-mode: t =A0 transient-mark-mode: t Recent input: Recent messages: /usr/bin/mail is not an executable.=A0 Setting mail-interactive to t. )jack(