bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#17267: 24.3.50; 100% cpu usage of emacs when copy some lines to org


From: Jingtao Xu
Subject: bug#17267: 24.3.50; 100% cpu usage of emacs when copy some lines to org buffer
Date: Wed, 16 Apr 2014 14:18:18 +0800

I create test files /tmp/test.el and /tmp/test.diff,see them in attach.

Then I start emacs with -q and create a empty file /tmp/test.org,and
press M-x then invoke function "my-changes",it fails with error
"line-move: Args out of range: 160, 160".
But If I invoke this function in buffer test.el,it runs fine.

Of course it's not a bug of 100% cpu usage,but It also works fine in
my old emacs whether I invoke this command in buffer test.org or not.

Hope this help you indicate the issue position.
Thanks.

With Best Regards.
jingtao.


-------------------------------------------------------------------------------------------------------------------------

On Tue, Apr 15, 2014 at 5:30 PM, Eli Zaretskii <eliz@gnu.org> wrote:
>> From: Jingtao Xu <jingtaozf@gmail.com>
>> 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.

Attachment: test.diff
Description: Text document

Attachment: test.el
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]