🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.emacs.bug
Article #1803

regexps unnatural feature in Emacs-18.55

#1803
From: Shinichirou Sugou
Date: Sat, 30 Dec 1989 04:55
50 lines
1574 bytes
Hello.

The following two functions both succeed.

    (re-search-backward "\\`^")
    (re-search-backward "^\\`")

In the combination of "\\'" and "$",

    (re-search-forward "\\'$")

succeeds, but

    (re-search-forward "$\\'")

fails.

I think this feature being unnatural since it is not symmetric.

[Proposal]

(1) It seems that beginning-of-buffer/end-of-buffer points far away than
    beginning-of-line/end-of-line.  So, following two functions must succeed

       (re-search-backward "\\`^")
       (re-search-forward  "$\\'")

    while following fail.

       (re-search-backward "^\\`")
       (re-search-forward  "\\'$")

(2) Or, every function must succeed.

       (re-search-backward "\\`^")
       (re-search-backward "^\\`")
       (re-search-forward  "$\\'")
       (re-search-forward  "\\'$")

Thank you.

CAUTION: (1) Reply-command in the mail system may NOT generate my address
             correctly.  Please use the following address instead.

               shin%sgtp.apple.juice.or.jp@uunet.uu.net

         (2) I have no relation to Apple Computer Inc. :-)

---
S.Sugou
Technical Details
Message-ID: <8912300455.AA02145@sgtp.apple.juice.or.jp>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!sgtp.apple.juice.or.jp!shin

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!sgtp.apple.juice.or.jp!shin
From: shin@sgtp.apple.juice.or.jp (Shinichirou Sugou)
Newsgroups: gnu.emacs.bug
Subject: regexps unnatural feature in Emacs-18.55
Message-ID: <8912300455.AA02145@sgtp.apple.juice.or.jp>
Date: 30 Dec 89 04:55:02 GMT
Sender: daemon@tut.cis.ohio-state.edu
Distribution: gnu
Organization: GNUs Not Usenet
Lines: 50