From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#17267: 24.3.50; 100% cpu usage of emacs when copy some lines to org buffer Date: Tue, 15 Apr 2014 12:30:21 +0300 Message-ID: <83vbubj5xu.fsf@gnu.org> References: Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1397554299 12693 80.91.229.3 (15 Apr 2014 09:31:39 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 15 Apr 2014 09:31:39 +0000 (UTC) Cc: 17267@debbugs.gnu.org To: Jingtao Xu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Apr 15 11:31:24 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WZzi5-0003v6-MB for geb-bug-gnu-emacs@m.gmane.org; Tue, 15 Apr 2014 11:31:21 +0200 Original-Received: from localhost ([::1]:47795 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WZzi5-0004XS-BL for geb-bug-gnu-emacs@m.gmane.org; Tue, 15 Apr 2014 05:31:21 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45307) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WZzhu-0004EW-Tn for bug-gnu-emacs@gnu.org; Tue, 15 Apr 2014 05:31:18 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WZzhn-0002Rp-4V for bug-gnu-emacs@gnu.org; Tue, 15 Apr 2014 05:31:10 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:40481) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WZzhn-0002Rh-1e for bug-gnu-emacs@gnu.org; Tue, 15 Apr 2014 05:31:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1WZzhm-0007Fq-4E for bug-gnu-emacs@gnu.org; Tue, 15 Apr 2014 05:31:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 15 Apr 2014 09:31:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17267 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 17267-submit@debbugs.gnu.org id=B17267.139755422525221 (code B ref 17267); Tue, 15 Apr 2014 09:31:02 +0000 Original-Received: (at 17267) by debbugs.gnu.org; 15 Apr 2014 09:30:25 +0000 Original-Received: from localhost ([127.0.0.1]:48638 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WZzhA-0006Xe-6y for submit@debbugs.gnu.org; Tue, 15 Apr 2014 05:30:24 -0400 Original-Received: from mtaout25.012.net.il ([80.179.55.181]:59906) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WZzh7-0006MY-Cn for 17267@debbugs.gnu.org; Tue, 15 Apr 2014 05:30:22 -0400 Original-Received: from conversion-daemon.mtaout25.012.net.il by mtaout25.012.net.il (HyperSendmail v2007.08) id <0N4200M00EP2MX00@mtaout25.012.net.il> for 17267@debbugs.gnu.org; Tue, 15 Apr 2014 12:28:27 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout25.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0N4200HMTFNFRD90@mtaout25.012.net.il>; Tue, 15 Apr 2014 12:28:27 +0300 (IDT) In-reply-to: X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 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: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:88025 Archived-At: > From: Jingtao Xu > Date: Tue, 15 Apr 2014 15:46:13 +0800 > > > I wrote one elisp function to collect the code changes of a svn diff file: > ============================================================================================= > (defun my-svn-codes-changes (&optional proj) > (interactive) > (if (null proj) > (setf proj (my-select-project))) > (with-current-buffer (find-file-noselect (my-path proj (concat (my-p-id proj) ".diff"))) > (fundamental-mode) > (goto-char (point-min)) > (let (result-list cur-file cur-file-changes) > (while (search-forward "Index: " nil t) > (setf cur-file (buffer-substring-no-properties (point) (line-end-position))) > (next-line 3) > ;;(loop repeat 3 do (next-line)) > (let ((start-pos (line-beginning-position)) > (end-pos (point-max))) > (when (search-forward "Index: " nil t) > (previous-line) > (setf end-pos (line-end-position))) > (setf cur-file-changes (buffer-substring-no-properties start-pos end-pos)) > (push (cons cur-file cur-file-changes) result-list) > (goto-char end-pos))) > (reverse result-list)))) > ============================================================================================= > It works fine in emacs 24.3.1,but in emacs 24.3.50,it will enter into an infinite loop and never return. > > I debugged emacs source code and find the infinite loop seems to happen in c function handle_stop,of file xdisp.c. > emacs nerver return from this function,and in handle_stop,when it call function handle_invisible_prop,it will > return HANDLED_RECOMPUTE_PROPS. Sorry, I don't see any obvious relation between the above function and the part of xdisp.c where you see the infloop. Is it possible for you to construct a reproducible recipe for this bug, starting with "emacs -Q", including any external files necessary for reproducing the bug? If so, please post the recipe and the files here. Thanks.