From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Larry Denenberg Newsgroups: gmane.emacs.bugs Subject: bug#7593: 24.0.50; No response from 'occur' (infinite loop when regexp matches empty string?) Date: Wed, 08 Dec 2010 13:53:36 -0500 Message-ID: <21977.1291834416@vegas.jjd.com> NNTP-Posting-Host: lo.gmane.org X-Trace: dough.gmane.org 1291905535 4312 80.91.229.12 (9 Dec 2010 14:38:55 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 9 Dec 2010 14:38:55 +0000 (UTC) Cc: larry@denenberg.com To: 7593@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Dec 09 15:38:50 2010 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PQhdt-0004P2-Fx for geb-bug-gnu-emacs@m.gmane.org; Thu, 09 Dec 2010 15:38:45 +0100 Original-Received: from localhost ([127.0.0.1]:59080 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PQhds-0002Qq-Cx for geb-bug-gnu-emacs@m.gmane.org; Thu, 09 Dec 2010 09:38:44 -0500 Original-Received: from [140.186.70.92] (port=35295 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PQPUD-0002m2-8n for bug-gnu-emacs@gnu.org; Wed, 08 Dec 2010 14:15:35 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PQPUB-0007eO-P2 for bug-gnu-emacs@gnu.org; Wed, 08 Dec 2010 14:15:33 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:58508) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PQPUB-0007eH-L2 for bug-gnu-emacs@gnu.org; Wed, 08 Dec 2010 14:15:31 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1PQPDG-0000pa-11; Wed, 08 Dec 2010 13:58:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Larry Denenberg Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 08 Dec 2010 18:58:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 7593 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.12918346583156 (code B ref -1); Wed, 08 Dec 2010 18:58:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 8 Dec 2010 18:57:38 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PQPCr-0000oq-AE for submit@debbugs.gnu.org; Wed, 08 Dec 2010 13:57:38 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PQP3d-0000YZ-3J for submit@debbugs.gnu.org; Wed, 08 Dec 2010 13:48:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PQP9O-0003YA-4z for submit@debbugs.gnu.org; Wed, 08 Dec 2010 13:54:03 -0500 Original-Received: from lists.gnu.org ([199.232.76.165]:52819) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PQP9O-0003Y5-1R for submit@debbugs.gnu.org; Wed, 08 Dec 2010 13:54:02 -0500 Original-Received: from [140.186.70.92] (port=55736 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PQP9M-0007Wr-4m for bug-gnu-emacs@gnu.org; Wed, 08 Dec 2010 13:54:01 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PQP9B-0003UJ-PL for bug-gnu-emacs@gnu.org; Wed, 08 Dec 2010 13:53:59 -0500 Original-Received: from smtp2go.com ([207.58.142.213]:38954) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PQP9B-0003Tc-LH for bug-gnu-emacs@gnu.org; Wed, 08 Dec 2010 13:53:49 -0500 Original-Received: from [140.247.179.41] (helo=vegas.jjd.com) by smtp2go.com with esmtp (Exim 4.69) (envelope-from ) id 1PQP97-0003CN-1h; Wed, 08 Dec 2010 18:53:45 +0000 X-Mailer: MH-E 8.1; nmh 1.3; GNU Emacs 24.0.50 X-SMTP2Go-MailScanner-Information: Please contact support@smtp2go.com for more information X-SMTP2Go-MailScanner-ID: 1PQP97-0003CN-1h X-SMTP2Go-MailScanner: Found to be clean X-SMTP2Go-MailScanner-From: larry@denenberg.com X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Mailman-Approved-At: Wed, 08 Dec 2010 13:57:36 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Wed, 08 Dec 2010 13:58:02 -0500 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Mailman-Approved-At: Wed, 08 Dec 2010 14:39:10 -0500 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: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:42341 Archived-At: This bug manifests in all versions of GNU emacs that I have. The facts: 1) Start with 'emacs -nw -Q'. We see buffer *scratch* containing the initial greeting ';; This buffer is for notes . . .'. 2) Enter 'M-x occur'. We're now in the minibuffer with prompt 'List lines matching regexp:'. 3) Enter 'a*'. Emacs stops responding. I believe the problem is in function occur-engine (file replace.el), specifically the section labelled 'Highlight the matches'. ;; Highlight the matches (let ((len (length curstring)) (start 0)) (while (and (< start len) (string-match regexp curstring start)) (add-text-properties (match-beginning 0) (match-end 0) (append `(occur-match t) (when match-face ;; Use `face' rather than `font-lock-face' here ;; so as to override faces copied from the buffer. `(face ,match-face))) curstring) (setq start (match-end 0)))) When the given regexp matches a null string, the final line of code here does not change variable start, so we loop infinitely. /Larry Denenberg larry@denenberg.com http://larry.denenberg.com/ In GNU Emacs 24.0.50.1 (i386-apple-darwin9.8.0, NS apple-appkit-949.54) of 2010-08-10 on braeburn.aquamacs.org - Aquamacs Distribution 2.1dev Windowing system distributor `Apple', version 10.3.1038 configured using `configure '--with-ns' '--without-x' 'CFLAGS=-arch i386 -arch ppc' 'LDFLAGS=-arch i386 -arch ppc'' 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: nil value of $XMODIFIERS: nil locale-coding-system: nil default enable-multibyte-characters: t Major mode: Info Minor modes in effect: TeX-PDF-mode: t TeX-source-correlate-mode: t display-time-mode: t savehist-mode: t smart-frame-positioning-mode: t aquamacs-autoface-mode: t recentf-mode: t osx-key-mode: t show-paren-mode: t delete-selection-mode: t pc-selection-mode: t cua-mode: t tooltip-mode: t mouse-wheel-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-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 Load-path shadows: /Users/larry/Emacs/mh-e-8.1/emacs/lisp/mh-e/mh-xface hides /Applications/Aquamacs.app/Contents/Resources/lisp/mh-e/mh-xface /Users/larry/Emacs/mh-e-8.1/emacs/lisp/mh-e/mh-utils hides /Applications/Aquamacs.app/Contents/Resources/lisp/mh-e/mh-utils /Users/larry/Emacs/mh-e-8.1/emacs/lisp/mh-e/mh-tool-bar hides /Applications/Aquamacs.app/Contents/Resources/lisp/mh-e/mh-tool-bar /Users/larry/Emacs/mh-e-8.1/emacs/lisp/mh-e/mh-thread hides /Applications/Aquamacs.app/Contents/Resources/lisp/mh-e/mh-thread /Users/larry/Emacs/mh-e-8.1/emacs/lisp/mh-e/mh-speed hides /Applications/Aquamacs.app/Contents/Resources/lisp/mh-e/mh-speed /Users/larry/Emacs/mh-e-8.1/emacs/lisp/mh-e/mh-show hides /Applications/Aquamacs.app/Contents/Resources/lisp/mh-e/mh-show /Users/larry/Emacs/mh-e-8.1/emacs/lisp/mh-e/mh-seq hides /Applications/Aquamacs.app/Contents/Resources/lisp/mh-e/mh-seq /Users/larry/Emacs/mh-e-8.1/emacs/lisp/mh-e/mh-search hides /Applications/Aquamacs.app/Contents/Resources/lisp/mh-e/mh-search /Users/larry/Emacs/mh-e-8.1/emacs/lisp/mh-e/mh-scan hides /Applications/Aquamacs.app/Contents/Resources/lisp/mh-e/mh-scan /Users/larry/Emacs/mh-e-8.1/emacs/lisp/mh-e/mh-print hides /Applications/Aquamacs.app/Contents/Resources/lisp/mh-e/mh-print /Users/larry/Emacs/mh-e-8.1/emacs/lisp/mh-e/mh-mime hides /Applications/Aquamacs.app/Contents/Resources/lisp/mh-e/mh-mime /Users/larry/Emacs/mh-e-8.1/emacs/lisp/mh-e/mh-loaddefs hides /Applications/Aquamacs.app/Contents/Resources/lisp/mh-e/mh-loaddefs /Users/larry/Emacs/mh-e-8.1/emacs/lisp/mh-e/mh-limit hides /Applications/Aquamacs.app/Contents/Resources/lisp/mh-e/mh-limit /Users/larry/Emacs/mh-e-8.1/emacs/lisp/mh-e/mh-letter hides /Applications/Aquamacs.app/Contents/Resources/lisp/mh-e/mh-letter /Users/larry/Emacs/mh-e-8.1/emacs/lisp/mh-e/mh-junk hides /Applications/Aquamacs.app/Contents/Resources/lisp/mh-e/mh-junk /Users/larry/Emacs/mh-e-8.1/emacs/lisp/mh-e/mh-inc hides /Applications/Aquamacs.app/Contents/Resources/lisp/mh-e/mh-inc /Users/larry/Emacs/mh-e-8.1/emacs/lisp/mh-e/mh-identity hides /Applications/Aquamacs.app/Contents/Resources/lisp/mh-e/mh-identity /Users/larry/Emacs/mh-e-8.1/emacs/lisp/mh-e/mh-gnus hides /Applications/Aquamacs.app/Contents/Resources/lisp/mh-e/mh-gnus /Users/larry/Emacs/mh-e-8.1/emacs/lisp/mh-e/mh-funcs hides /Applications/Aquamacs.app/Contents/Resources/lisp/mh-e/mh-funcs /Users/larry/Emacs/mh-e-8.1/emacs/lisp/mh-e/mh-folder hides /Applications/Aquamacs.app/Contents/Resources/lisp/mh-e/mh-folder /Users/larry/Emacs/mh-e-8.1/emacs/lisp/mh-e/mh-e hides /Applications/Aquamacs.app/Contents/Resources/lisp/mh-e/mh-e /Users/larry/Emacs/mh-e-8.1/emacs/lisp/mh-e/mh-compat hides /Applications/Aquamacs.app/Contents/Resources/lisp/mh-e/mh-compat /Users/larry/Emacs/mh-e-8.1/emacs/lisp/mh-e/mh-comp hides /Applications/Aquamacs.app/Contents/Resources/lisp/mh-e/mh-comp /Users/larry/Emacs/mh-e-8.1/emacs/lisp/mh-e/mh-buffers hides /Applications/Aquamacs.app/Contents/Resources/lisp/mh-e/mh-buffers /Users/larry/Emacs/mh-e-8.1/emacs/lisp/mh-e/mh-alias hides /Applications/Aquamacs.app/Contents/Resources/lisp/mh-e/mh-alias /Users/larry/Emacs/mh-e-8.1/emacs/lisp/mh-e/mh-acros hides /Applications/Aquamacs.app/Contents/Resources/lisp/mh-e/mh-acros /Users/larry/Emacs/Bin/hebrew hides /Applications/Aquamacs.app/Contents/Resources/lisp/language/hebrew Features: (shadow emacsbug thai-util thai-word lao-util flyspell ispell cua-rect rect utf-7 compile comint ring find-func sort mule-util info mh-limit browse-url flow-fill cperl-mode dabbrev mh-thread multi-isearch mh-funcs mh-search mh-alias multi-prompt crm qp mail-extr mh-identity mh-letter mh-comp smiley mh-mime mh-gnus mh-show goto-addr gnus-cite gnus-art mm-uu mml2015 pgg pgg-parse pgg-def epg-config mm-view smime password-cache dig gnus-sum nnoo gnus-group gnus-undo nnmail mail-source format-spec gnus-start gnus-spec gnus-int message rfc822 mml mml-sec mm-decode mm-bodies mm-encode gmm-utils mailheader gnus-win gnus-range gnus gnus-ems nnheader mh-inc hl-line mh-tool-bar mh-seq mh-xface mh-utils mh-folder which-func imenu mh-scan mh-e mh-compat mailabbrev mh-acros mh-buffers mh-loaddefs time-stamp newcomment texmathp preview prv-emacs reftex-vcr reftex-dcr reftex-auc reftex reftex-vars bib-cite tex-fold tex-bar tex-buf toolbar-x noutline outline font-latex latex tex-style tex latexenc ebuff-menu electric url-http tls url-auth mail-parse rfc2231 rfc2047 rfc2045 ietf-drums url-gw url-cache url url-proxy url-privacy url-expand url-methods url-history url-cookie url-util url-parse auth-source gnus-util url-vars mm-util mail-prsvr mailcap mail-utils time-date package quail help-mode jka-compr time edmacro kmacro load-emacs-plugins aquamacs-mode-defaults auctex-config server preview-latex tex-site auto-loads smart-dnd aquamacs-aux savehist mouse-sel one-buffer-one-frame smart-frame-positioning drews_init color-theme-autoloads view saveplace visual-line aquamacs-bug aquamacs-autoface-mode aquamacs-editing sendmail recentf tree-widget cus-edit osxkeys emulate-mac-keyboard-mode frame-cmds strings misc-fns thingatpt+ thingatpt frame-fns avoid aquamacs-mac-fontsets fit-frame aquamacs-frame-setup aquamacs-tabbar tabbar-window cl cl-19 tabbar warnings cus-start cus-load load-emacs-pre-plugins aquamacs-site-start filladapt aquamacs-redo check-for-updates aquamacs-menu osx_defaults aquamacs-tool-bar aquamacs mac-extra-functions aquamacs-tools aquamacs-macros parse-time timezone paren delsel pc-select cua-base wid-edit regexp-opt advice advice-preload byte-opt bytecomp byte-compile debug help-fns image-file disp-table easy-mmode tooltip ediff-hook vc-hooks lisp-float-type mwheel ns-win easymenu tool-bar dnd fontset image fringe lisp-mode register page menu-bar rfn-eshadow timer select scroll-bar mldrag mouse jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev loaddefs button minibuffer faces cus-face files text-properties overlay md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process ns multi-tty emacs)