From: Jack Duthen <duthen.mac.01@gmail.com>
To: 11025@debbugs.gnu.org
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 [thread overview]
Message-ID: <CALGVPOrTzE_8Qsd+G_vcxdr80K9qyRFwvZtC2C5H1b2yP1hSPw@mail.gmail.com> (raw)
--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)
"\(\(^\|[^\\
]\)\(\\\\\)*\);+ *" <-- 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 match
; (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".
; => Bug
In GNU Emacs 23.1.1 (i686-pc-linux-gnu, GTK+ Version 2.22.0)
of 2011-03-04 on roseapple, modified by Debian
Windowing system distributor `The X.Org Foundation', version 11.0.10900000
configured using `configure '--build=i686-linux-gnu'
'--host=i686-linux-gnu' '--prefix=/usr' '--sharedstatedir=/var/lib'
'--libexecdir=/usr/lib' '--localstatedir=/var/lib'
'--infodir=/usr/share/info' '--mandir=/usr/share/man' '--with-pop=yes'
'--enable-locallisppath=/etc/emacs23:/etc/emacs:/usr/local/share/emacs/23.1/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/23.1/site-lisp:/usr/share/emacs/site-lisp:/usr/share/emacs/23.1/leim'
'--with-x=yes' '--with-x-toolkit=gtk' '--with-toolkit-scroll-bars'
'build_alias=i686-linux-gnu' 'host_alias=i686-linux-gnu'
'CFLAGS=-DDEBIAN -g -O2' 'LDFLAGS=-g' 'CPPFLAGS=''
Important settings:
value of $LC_ALL: nil
value of $LC_COLLATE: nil
value of $LC_CTYPE: nil
value of $LC_MESSAGES: nil
value of $LC_MONETARY: nil
value of $LC_NUMERIC: nil
value of $LC_TIME: nil
value of $LANG: fr_FR.utf8
value of $XMODIFIERS: nil
locale-coding-system: utf-8-unix
default-enable-multibyte-characters: t
Major mode: Emacs-Lisp
Minor modes in effect:
which-function-mode: t
diff-auto-refine-mode: t
eldoc-mode: t
show-paren-mode: t
recentf-mode: t
desktop-save-mode: t
tooltip-mode: t
mouse-wheel-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
blink-cursor-mode: t
global-auto-composition-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
column-number-mode: t
line-number-mode: t
transient-mark-mode: t
Recent input:
<menu-bar> <help-menu> <send-emacs-bug-report>
Recent messages:
/usr/bin/mail is not an executable. Setting mail-interactive to t.
)jack(
reply other threads:[~2012-03-16 11:40 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CALGVPOrTzE_8Qsd+G_vcxdr80K9qyRFwvZtC2C5H1b2yP1hSPw@mail.gmail.com \
--to=duthen.mac.01@gmail.com \
--cc=11025@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.