unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#30676: Please make smie-config-guess interruptible
@ 2018-03-02 13:16 Reuben Thomas
  2018-03-02 22:41 ` Noam Postavsky
  0 siblings, 1 reply; 9+ messages in thread
From: Reuben Thomas @ 2018-03-02 13:16 UTC (permalink / raw)
  To: 30676

It would be nice if one could run smie-config-guess without having to
worry about it locking up Emacs on large buffers. If it were possible
to interrupt it with C-g, that would make it friendlier.

-- 
https://rrt.sc3d.org





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#30676: Please make smie-config-guess interruptible
  2018-03-02 13:16 bug#30676: Please make smie-config-guess interruptible Reuben Thomas
@ 2018-03-02 22:41 ` Noam Postavsky
  2018-03-02 23:07   ` Reuben Thomas
  0 siblings, 1 reply; 9+ messages in thread
From: Noam Postavsky @ 2018-03-02 22:41 UTC (permalink / raw)
  To: Reuben Thomas; +Cc: 30676

tags 30676 + unreproducible
quit

Reuben Thomas <rrt@sc3d.org> writes:

> It would be nice if one could run smie-config-guess without having to
> worry about it locking up Emacs on large buffers. If it were possible
> to interrupt it with C-g, that would make it friendlier.

C-g interrupts just fine for me; since it written in lisp, I can't see
why it should be otherwise.





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#30676: Please make smie-config-guess interruptible
  2018-03-02 22:41 ` Noam Postavsky
@ 2018-03-02 23:07   ` Reuben Thomas
  2018-03-02 23:22     ` Noam Postavsky
  0 siblings, 1 reply; 9+ messages in thread
From: Reuben Thomas @ 2018-03-02 23:07 UTC (permalink / raw)
  To: Noam Postavsky; +Cc: 30676

On 2 March 2018 at 22:41, Noam Postavsky <npostavs@gmail.com> wrote:
> tags 30676 + unreproducible
> quit
>
> Reuben Thomas <rrt@sc3d.org> writes:
>
>> It would be nice if one could run smie-config-guess without having to
>> worry about it locking up Emacs on large buffers. If it were possible
>> to interrupt it with C-g, that would make it friendlier.
>
> C-g interrupts just fine for me; since it written in lisp, I can't see
> why it should be otherwise.

Indeed, I was a bit surprised, but I ran it on my ~/.bash_history
(about 10Mb, 900,000 lines) and however many times I pressed C-g, it
just sat there slowly counting through the "Analyzing" progress meter,
and Emacs taking 100% CPU.

-- 
https://rrt.sc3d.org





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#30676: Please make smie-config-guess interruptible
  2018-03-02 23:07   ` Reuben Thomas
@ 2018-03-02 23:22     ` Noam Postavsky
  2018-03-02 23:28       ` Reuben Thomas
  0 siblings, 1 reply; 9+ messages in thread
From: Noam Postavsky @ 2018-03-02 23:22 UTC (permalink / raw)
  To: Reuben Thomas; +Cc: 30676

Reuben Thomas <rrt@sc3d.org> writes:

> On 2 March 2018 at 22:41, Noam Postavsky <npostavs@gmail.com> wrote:

>>> It would be nice if one could run smie-config-guess without having to
>>> worry about it locking up Emacs on large buffers. If it were possible
>>> to interrupt it with C-g, that would make it friendlier.
>>
>> C-g interrupts just fine for me; since it written in lisp, I can't see
>> why it should be otherwise.
>
> Indeed, I was a bit surprised, but I ran it on my ~/.bash_history
> (about 10Mb, 900,000 lines) and however many times I pressed C-g, it
> just sat there slowly counting through the "Analyzing" progress meter,
> and Emacs taking 100% CPU.

I just checked again, with a file produced by re-catting my
~/.bash_history until it's 900,000 lines (I got ~13MB), C-g still works
fine here.





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#30676: Please make smie-config-guess interruptible
  2018-03-02 23:22     ` Noam Postavsky
@ 2018-03-02 23:28       ` Reuben Thomas
  2018-03-02 23:47         ` Noam Postavsky
  0 siblings, 1 reply; 9+ messages in thread
From: Reuben Thomas @ 2018-03-02 23:28 UTC (permalink / raw)
  To: Noam Postavsky; +Cc: 30676

On 2 March 2018 at 23:22, Noam Postavsky <npostavs@gmail.com> wrote:
> Reuben Thomas <rrt@sc3d.org> writes:
>
>> On 2 March 2018 at 22:41, Noam Postavsky <npostavs@gmail.com> wrote:
>
>>>> It would be nice if one could run smie-config-guess without having to
>>>> worry about it locking up Emacs on large buffers. If it were possible
>>>> to interrupt it with C-g, that would make it friendlier.
>>>
>>> C-g interrupts just fine for me; since it written in lisp, I can't see
>>> why it should be otherwise.
>>
>> Indeed, I was a bit surprised, but I ran it on my ~/.bash_history
>> (about 10Mb, 900,000 lines) and however many times I pressed C-g, it
>> just sat there slowly counting through the "Analyzing" progress meter,
>> and Emacs taking 100% CPU.
>
> I just checked again, with a file produced by re-catting my
> ~/.bash_history until it's 900,000 lines (I got ~13MB), C-g still works
> fine here.

And I reproduced your result with emasc -Q.

I'm puzzled as to how something in my setup could be making it
uninterruptible, but clearly it's not an Emacs bug; do please close
this, and sorry for the noise: I should have thought of an emacs -Q
test before writing the original report.

If I run smie-config-guess manually with my setup, then I can
interrupt it. The problem arose when I ran it as part of
dtrt-indent-mode (3rd-party code that I maintain):
https://github.com/jscheid/dtrt-indent

But now I can't reproduce the problem, whereas I could several times
earlier today. Oh well. Sorry again.

-- 
https://rrt.sc3d.org





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#30676: Please make smie-config-guess interruptible
  2018-03-02 23:28       ` Reuben Thomas
@ 2018-03-02 23:47         ` Noam Postavsky
  2018-03-02 23:51           ` Reuben Thomas
  0 siblings, 1 reply; 9+ messages in thread
From: Noam Postavsky @ 2018-03-02 23:47 UTC (permalink / raw)
  To: Reuben Thomas; +Cc: 30676

close 30676 
quit

Reuben Thomas <rrt@sc3d.org> writes:

>> I just checked again, with a file produced by re-catting my
>> ~/.bash_history until it's 900,000 lines (I got ~13MB), C-g still works
>> fine here.
>
> And I reproduced your result with emasc -Q.
>
> I'm puzzled as to how something in my setup could be making it
> uninterruptible

Do you have anything that's setting `inhibit-quit'?





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#30676: Please make smie-config-guess interruptible
  2018-03-02 23:47         ` Noam Postavsky
@ 2018-03-02 23:51           ` Reuben Thomas
  2018-03-03  8:25             ` Michael Albinus
  0 siblings, 1 reply; 9+ messages in thread
From: Reuben Thomas @ 2018-03-02 23:51 UTC (permalink / raw)
  To: Noam Postavsky; +Cc: 30676

On 2 March 2018 at 23:47, Noam Postavsky <npostavs@gmail.com> wrote:
>
> Do you have anything that's setting `inhibit-quit'?

Not in my own init code, but I see that org-mode and magit and helm do
in various places. So if one of those is somehow leaking…but they all
seem to be let bindings, so surely shouldn't be causing a global
problem…

-- 
https://rrt.sc3d.org





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#30676: Please make smie-config-guess interruptible
  2018-03-02 23:51           ` Reuben Thomas
@ 2018-03-03  8:25             ` Michael Albinus
  2018-03-03  8:28               ` Reuben Thomas
  0 siblings, 1 reply; 9+ messages in thread
From: Michael Albinus @ 2018-03-03  8:25 UTC (permalink / raw)
  To: Reuben Thomas; +Cc: 30676, Noam Postavsky

Reuben Thomas <rrt@sc3d.org> writes:

>> Do you have anything that's setting `inhibit-quit'?
>
> Not in my own init code, but I see that org-mode and magit and helm do
> in various places. So if one of those is somehow leaking…but they all
> seem to be let bindings, so surely shouldn't be causing a global
> problem…

Maybe a timer function which was called from inside such a let-form?

Best regards, Michael.





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#30676: Please make smie-config-guess interruptible
  2018-03-03  8:25             ` Michael Albinus
@ 2018-03-03  8:28               ` Reuben Thomas
  0 siblings, 0 replies; 9+ messages in thread
From: Reuben Thomas @ 2018-03-03  8:28 UTC (permalink / raw)
  To: Michael Albinus; +Cc: 30676, Noam Postavsky

On 3 March 2018 at 08:25, Michael Albinus <michael.albinus@gmx.de> wrote:
> Reuben Thomas <rrt@sc3d.org> writes:
>
>>> Do you have anything that's setting `inhibit-quit'?
>>
>> Not in my own init code, but I see that org-mode and magit and helm do
>> in various places. So if one of those is somehow leaking…but they all
>> seem to be let bindings, so surely shouldn't be causing a global
>> problem…
>
> Maybe a timer function which was called from inside such a let-form?

Thanks for the hint. I'll try to keep it in mind if I come across the
problem again.

-- 
https://rrt.sc3d.org





^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2018-03-03  8:28 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-02 13:16 bug#30676: Please make smie-config-guess interruptible Reuben Thomas
2018-03-02 22:41 ` Noam Postavsky
2018-03-02 23:07   ` Reuben Thomas
2018-03-02 23:22     ` Noam Postavsky
2018-03-02 23:28       ` Reuben Thomas
2018-03-02 23:47         ` Noam Postavsky
2018-03-02 23:51           ` Reuben Thomas
2018-03-03  8:25             ` Michael Albinus
2018-03-03  8:28               ` Reuben Thomas

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).