unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
  • [parent not found: <jwvfxsvbgg5.fsf-monnier+emacs@gnu.org>]
  • * regexp does not work as documented
    @ 2008-05-06  1:30 Bruno Haible
      2015-12-29 17:48 ` bug#192: " Bruno Haible
      0 siblings, 1 reply; 20+ messages in thread
    From: Bruno Haible @ 2008-05-06  1:30 UTC (permalink / raw)
      To: bug-gnu-emacs
    
    [-- Attachment #1: Type: text/plain, Size: 2640 bytes --]
    
    The regular expression (as an Emacs string)
      "^msgstr\\(\\[[0-9]\\]\\)?.*\n\\(\".*\n\\)*"
    is supposed to search for a line starting with "msgstr" and an optional
    digit inside brackets, followed by as many lines starting with a double-quote
    as possible. The Emacs documentation says:
    
      "The matcher processes a `*' construct by matching, immediately, as
       many repetitions as can be found."
    
    This is apparently not the case with the above regexp.
    
    ----------------------------------------------------------------------------
    
    To reproduce:
    
    $ emacs fr.po                or   $ emacs -nw fr.po
    Leave the cursor at the beginning of the file.
    M-x highlight-regexp
    Regexp to highlight (enter this with Ctrl-Q Ctrl-J for each of the two
    newlines):
    
    ^msgstr\(\[[0-9]\]\)?.*
    \(".*
    \)*
    
    Highlight using face: hi-yellow
    
    Then move around in the buffer and look which lines are highlighted.
    
    In the first match already, only 5 out of 11 lines are highlighted. Then,
    line 300 (in emacs 22) or line 335 (in emacs 21) are not highlighted either.
    
    
    The attached screenshots were produced with emacs-22.2.1
    (on i686-pc-linux-gnu) and with emacs-21.2.1 (on powerpc-apple-darwin7.9.0).
    
    ----------------------------------------------------------------------------
    
    In GNU Emacs 22.2.1 (i686-pc-linux-gnu, X toolkit, Xaw3d scroll bars)
     of 2008-05-01 on linuix
    Windowing system distributor `The XFree86 Project, Inc', version 11.0.40300001
    configured using `configure  '--prefix=/packages/gnu''
    
    Important settings:
      value of $LC_ALL: nil
      value of $LC_COLLATE: POSIX
      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: de_DE.UTF-8
      locale-coding-system: utf-8
      default-enable-multibyte-characters: t
    
    Major mode: Lisp Interaction
    
    Minor modes in effect:
      tooltip-mode: t
      tool-bar-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
      unify-8859-on-encoding-mode: t
      utf-translate-cjk-mode: t
      auto-compression-mode: t
      line-number-mode: t
    
    Recent input:
    <help-echo> <help-echo> <help-echo> <help-echo> <help-echo> 
    <help-echo> <help-echo> <help-echo> <help-echo> <help-echo> 
    <help-echo> <help-echo> <menu-bar> <help-menu> <send-emacs-bug-report>
    
    Recent messages:
    ("emacs")
    Loading cl-indent...done
    Loading derived...done
    For information about GNU Emacs and the GNU system, type C-h C-a.
    Loading emacsbug...
    Loading regexp-opt...done
    Loading emacsbug...done
    
    PS: Where is the bug tracker? I don't see it at https://savannah.gnu.org/projects/emacs
    
    [-- Attachment #2: emacs21-1.png --]
    [-- Type: image/png, Size: 18408 bytes --]
    
    [-- Attachment #3: emacs22-2.png --]
    [-- Type: image/png, Size: 19671 bytes --]
    
    [-- Attachment #4: emacs21-2.png --]
    [-- Type: image/png, Size: 20154 bytes --]
    
    [-- Attachment #5: emacs22-1.png --]
    [-- Type: image/png, Size: 18243 bytes --]
    
    [-- Attachment #6: fr.po.gz --]
    [-- Type: application/x-gzip, Size: 44518 bytes --]
    
    ^ permalink raw reply	[flat|nested] 20+ messages in thread

    end of thread, other threads:[~2015-12-29 17:48 UTC | newest]
    
    Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
    -- links below jump to the message on this page --
         [not found] <87k5i8ukq8.fsf@stupidchicken.com>
         [not found] ` <200805061335.11379.bruno@clisp.org>
         [not found]   ` <48204B3D.6000500@gmx.at>
    2008-05-10 19:18     ` bug#192: regexp does not work as documented David Koppelman
         [not found]     ` <yg5skwqc6ho.fsf@nested.ece.lsu.edu>
    2008-05-10 20:13       ` David Koppelman
         [not found]       ` <yg5bq3ddij2.fsf@nested.ece.lsu.edu>
    2008-05-11  7:40         ` martin rudalics
         [not found]         ` <4826A303.3030002@gmx.at>
    2008-05-11 14:27           ` Chong Yidong
         [not found]           ` <87abiwoqzd.fsf@stupidchicken.com>
    2008-05-11 15:36             ` David Koppelman
         [not found]             ` <yg57ie0df8u.fsf@nested.ece.lsu.edu>
    2008-05-11 18:44               ` Stefan Monnier
         [not found]               ` <jwv4p94r8vp.fsf-monnier+emacsbugreports@gnu.org>
    2008-05-11 19:09                 ` David Koppelman
         [not found]                 ` <yg5tzh4bqtw.fsf@nested.ece.lsu.edu>
    2008-05-12  1:28                   ` Stefan Monnier
         [not found]                   ` <jwvr6c8pbd6.fsf-monnier+emacsbugreports@gnu.org>
    2008-05-12 15:03                     ` David Koppelman
         [not found]                     ` <yg5d4nra7jb.fsf@nested.ece.lsu.edu>
    2008-05-12 16:29                       ` Stefan Monnier
         [not found]                       ` <jwvzlqvmr6g.fsf-monnier+emacsbugreports@gnu.org>
    2008-05-12 17:04                         ` David Koppelman
    2008-05-11 18:44             ` Stefan Monnier
         [not found]             ` <jwv8wygrbss.fsf-monnier+emacsbugreports@gnu.org>
    2008-05-11 20:03               ` Thomas Lord
         [not found]               ` <482750F4.2050102@emf.net>
    2008-05-12  1:43                 ` Stefan Monnier
         [not found]                 ` <jwvlk2gpas3.fsf-monnier+emacsbugreports@gnu.org>
    2008-05-12  3:30                   ` Thomas Lord
         [not found]                   ` <4827B9B8.30406@emf.net>
    2008-05-12 13:43                     ` Stefan Monnier
         [not found]                     ` <jwvfxsnpryp.fsf-monnier+emacsbugreports@gnu.org>
    2008-05-12 15:55                       ` Thomas Lord
         [not found]                       ` <48286862.6040105@emf.net>
    2008-05-12 16:18                         ` tomas
         [not found]   ` <jwvfxsvbgg5.fsf-monnier+emacs@gnu.org>
    2008-05-10 20:04     ` Bruno Haible
    2008-05-06  1:30 Bruno Haible
    2015-12-29 17:48 ` bug#192: " Bruno Haible
    

    Code repositories for project(s) associated with this public inbox
    
    	https://git.savannah.gnu.org/cgit/emacs.git
    
    This is a public inbox, see mirroring instructions
    for how to clone and mirror all data and code used for this inbox;
    as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).