all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Dieter Wilhelm <dieter@duenenhof-wilhelm.de>
Cc: "Johan Bockgård" <bojohan+news@dd.chalmers.se>
Subject: C-M-r and C-M-s asymmetric [was: C - marking code between braces]
Date: Tue, 12 Dec 2006 23:49:17 +0100	[thread overview]
Message-ID: <87hcw0buhe.fsf_-_@hans.local.net> (raw)
In-Reply-To: <yoij64cisnjy.fsf@gamma02.me.chalmers.se> (Johan Bockgård's message of "Mon\, 11 Dec 2006 12\:02\:25 +0100")

bojohan+news@dd.chalmers.se (Johan Bockgård) writes:

> Dieter Wilhelm <dieter@duenenhof-wilhelm.de> writes:
>
>> Another idea for one level could be
>>
>> C-M-r [^{}]+
>> C-M-s
>>
>> but to my astonishment C-M-r does not skip to the char behind {!
>
> I think the key is here:
>
> ,----[ C-h f search-backward-regexp RET ]
> | [...]
> | Search backward from point for match for regular expression REGEXP.
> | Set point to the beginning of the match, and return point.
> | The match found is the one starting last in the buffer
> | and yet ending before the origin of the search.
> | [...]
> `----

Sorry Johan, I don't get it, the behaviour might be consistent with
the description above but the fact is that + should be greedy.  Please
search with C-M-s for "o.*o" in the following line

hans otto otto otto hans

When you C-M-r wouldn't you expect to find the same matches?  This is
clearly not the case and I can't imagine why.

-- 
    Best wishes

    H. Dieter Wilhelm
    Darmstadt, Germany

      reply	other threads:[~2006-12-12 22:49 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-07  9:43 C - marking code between braces Pawel
2006-12-07 16:36 ` Peter Dyballa
2006-12-07 22:28 ` Kevin Rodgers
2006-12-08  9:33   ` Pawel
2006-12-11  2:32   ` Dieter Wilhelm
     [not found]   ` <mailman.1734.1165804380.2155.help-gnu-emacs@gnu.org>
2006-12-11 11:02     ` Johan Bockgård
2006-12-12 22:49       ` Dieter Wilhelm [this message]

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=87hcw0buhe.fsf_-_@hans.local.net \
    --to=dieter@duenenhof-wilhelm.de \
    --cc=bojohan+news@dd.chalmers.se \
    /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.