From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: dalanicolai Newsgroups: gmane.emacs.devel Subject: Re: displaying margins leads to Emacs hanging Date: Fri, 24 Feb 2023 21:26:05 +0100 Message-ID: References: <83edqen95b.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000fe62ef05f577f09e" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="13806"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Feb 24 21:27:01 2023 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pVeej-0003RT-C6 for ged-emacs-devel@m.gmane-mx.org; Fri, 24 Feb 2023 21:27:01 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pVee8-0000qG-30; Fri, 24 Feb 2023 15:26:24 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pVee5-0000pt-MJ for emacs-devel@gnu.org; Fri, 24 Feb 2023 15:26:21 -0500 Original-Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pVee3-0001zo-7s; Fri, 24 Feb 2023 15:26:21 -0500 Original-Received: by mail-wr1-x42c.google.com with SMTP id bt28so346472wrb.8; Fri, 24 Feb 2023 12:26:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=zypJivaH6GRdAhPeTEEVjBDWnt/ainGC8nzFIEZpJeQ=; b=dmxHMMBAQoa0whIBf5pV4JZQSVycH9Y7KT39edoWirRGGK/1/S3J/C8kAQAOyxPViY uWYuMp3FkZuYE2IfIGD12djE2UVhPE7alJlnDwdXpTsb2MEBQsHHZehsOC0+UohrxdPM IenWt+r9yXWTQpXIeYaPuno5UAtaTWjziL4Y0HfTnC4W0lSLLoC/bstBNNtIg+OBTl4G jFr2nCpb/jXulQbjle82nbMn+L0UAD4K7uF6dqvvuZSd8kAq7d/6WWy/ZSlU61YovEIW zbgJgmHTdLwAP66Vy0tvIKpv84crihoY4lmFtwfK9fisJ9sW4HhDXXctXZdgiAd4bRlq L6ww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=zypJivaH6GRdAhPeTEEVjBDWnt/ainGC8nzFIEZpJeQ=; b=1wGcE10yMhIUEvUJUzgskLTIvASsUxJwrNNlRtqvQ5rXR1h4XZILqftVQvy3K7OPE8 Lu5bq6+qWNxTsEx0Y7o924r2hpclRGmm8zU3UQXqDsDN20GSM9slmt1x40w4nx8+4cyk 33Ykq9a+O0k3j/WRhlKKnVIyG+aaCFNHHWAX6gNRlaPLsiw9OmJsXitFHVXbYU/6ipyB BR7pQmm81ifgUmxOcoE+oapn8sdTF5LK0qvUqBu71KyCAGlhNFBrirJC3+GgZe/mUDw5 mEnN5oSQSnO9XUcTyyh3m/yF0yBDab/L3OnxlQ49iDgahkq05YfVH3o+AfUXiYFNn3OL NPmg== X-Gm-Message-State: AO0yUKWBt2GGdbkzC9gY4pcxH/BcjLCf3wzz6VY8lHDZDpD8gQNx+MU5 ongTn3Z3GaNAtpBUkAqr2l/9xL7DHZSv9FbEOyrvc+hU8UBrTR0s X-Google-Smtp-Source: AK7set//LwDOSfVzl7UzJ6RdW3fHsAMl4Iy1hwKts72WuS/KOuB3z7uvnriHQNOqB3MZtqOzLSll/JmlWekXH7YgNtI= X-Received: by 2002:a5d:6a8d:0:b0:2c7:73b:9609 with SMTP id s13-20020a5d6a8d000000b002c7073b9609mr988184wru.2.1677270376668; Fri, 24 Feb 2023 12:26:16 -0800 (PST) In-Reply-To: <83edqen95b.fsf@gnu.org> Received-SPF: pass client-ip=2a00:1450:4864:20::42c; envelope-from=dalanicolai@gmail.com; helo=mail-wr1-x42c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:303763 Archived-At: --000000000000fe62ef05f577f09e Content-Type: text/plain; charset="UTF-8" I have not really looked at it yet, but just as a quick thought: I am not sure if/why I should debug an infloop, because the functionality works perfectly fine when not showing the margins (i.e. when just setting the window margins to nil). So it seems to me its not about an infinite loop. I was saying 'more or less' because it does not really hang, it just takes extremely long to update the buffer text. When waiting long enough, then it seems to continue. Of course, I don't want to waste your time, but I think my instructions for reproducing the error, are very clear and short this time (i.e. take less than/about a minute). I think it would be most informative if you reproduce the error there. That's a huge file. > The file is huge because I've added a lot of data in the file (i.e. the text of the book `An Introduction to Programming in Emacs Lisp`). I've mentioned it exactly at the point where you write 'that file is huge' in your previous message. Of course, I will have a look at etc/DEBUG now, but I hope you can find the minute to reproduce the error following my instruction (I guarantee that the steps for reproducing are very clear and brief). On Fri, 24 Feb 2023 at 20:41, Eli Zaretskii wrote: > > From: dalanicolai > > Date: Fri, 24 Feb 2023 20:29:02 +0100 > > > > I am encountering the problem as described in the subject of this email. > > > > I hope you could enlighten me again about this issue. > > > > Some brief context: > > I am trying to build a kind of swiper/swoop for searching documents. > > I have tried to use Ivy/Vertico (see > https://github.com/minad/consult/issues/625), > > but I think they are not well suited/too heavy for this. So, I concluded > that, > > unfortunately, I have to 'reinvent the wheel'. > > > > Anyway, to reproduce the issue starting from emacs -q, > > please load the attached file and do `M-x baleen` (the file is large > because > > it includes the text of `An Introduction to Programming in Emacs Lisp`). > > That's a huge file. > > > Then type 'ho' and optionally continue typing to narrow down the results. > > Press RET to finish (I am just starting development, so never mind > further > > 'testing' the current functionality. Although of course, suggestions for > > improvements are welcome). > > As you will find, hopefully, things seem to work fine. > > Page numbers are nicely displayed in the margins. > > > > Now, do `M-x baleen2`. This time, the data consists of the contents of > the > > the book `An Introduction to Programming in Emacs Lisp.' Now type e.g. > > 'emacs' to narrow down the results. The page numbers are not displayed > > in the margins, to show that things still work fine. > > > > NOTE the next step should (well, should not of course) make Emacs hang: > > > > Now just uncomment the line > > ;; (set-window-margins nil 4) > > in the function `baleen2` and repeat the last step (`M-x baleen2`). > > Again, try to type 'emacs'. Unfortunately, Emacs more or less hangs. > > > > I have no idea why suddenly Emacs hangs. I was wondering if any of > > you could explain this behavior, and hopefully suggest how to > > prevent it. > > (Of course, if there is no other solution, then I could just display the > > page numbers in the buffer text). > > > > I also have a second question, but I will send it in another mail (with > its > > own subject). > > Did you try yourself to establish where Emacs loops and why? The file > etc/DEBUG includes instructions for how to debug what looks like an > infloop; search for "If the symptom of the bug is that Emacs fails to > respond". > > I notice that you say "more or less hangs". What does this mean, > exactly? Does C-g interrupt the "hang"? > --000000000000fe62ef05f577f09e Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I have not really looked at it yet, but just as a qui= ck thought:
I am not sure if/why I should debug an infloop, becau= se the functionality
works perfectly fine when not showing the ma= rgins (i.e. when just setting
the window margins to nil). So it = seems to me its not about an infinite loop.

I was = saying 'more or less' because it does not really hang, it just take= s
extremely long to update the buffer text. When waiting long eno= ugh,
then it seems to continue.

Of cours= e, I don't want to waste your time, but I think my instructions
for reproducing the error, are very clear and short this time (i.e. take= less
than/about a minute). I think it would be most informative = if you reproduce the
error there.

That's a huge file.

The file is huge because I've added = a lot of data in the file (i.e. the text
=C2=A0of the book `An Introduction to Programming in Emacs Lisp`).<= /div>
I've mentioned it exactly at the poi= nt where you write 'that file is huge'
in your previous message.

Of course, I will hav= e a look at etc/DEBUG now, but I hope you can find
the minute to reproduce the error following my instructio= n (I guarantee
that the steps for= reproducing are very clear and brief).

On Fri, 24 Feb 2023= at 20:41, Eli Zaretskii <eliz@gnu.org> wrote:
&g= t; From: dalanicolai <dalanicolai@gmail.com>
> Date: Fri, 24 Feb 2023 20:29:02 +0100
>
> I am encountering the problem as described in the subject of this emai= l.
>
> I hope you could enlighten me again about this issue.
>
> Some brief context:
> I am trying to build a kind of swiper/swoop for searching documents. > I have tried to use Ivy/Vertico (see https://github.= com/minad/consult/issues/625),
> but I think they are not well suited/too heavy for this. So, I conclud= ed that,
> unfortunately, I have to 'reinvent the wheel'.
>
> Anyway, to reproduce the issue starting from emacs -q,
> please load the attached file and do `M-x baleen` (the file is large b= ecause
> it includes the text of `An Introduction to Programming in Emacs Lisp`= ).

That's a huge file.

> Then type 'ho' and optionally continue typing to narrow down t= he results.
> Press RET to finish (I am just starting development, so never mind fur= ther
> 'testing' the current functionality. Although of course, sugge= stions for
> improvements are welcome).
> As you will find, hopefully, things seem to work fine.
> Page numbers are nicely displayed in the margins.
>
> Now, do `M-x baleen2`. This time, the data consists of the contents of= the
> the book `An Introduction to Programming in Emacs Lisp.' Now type = e.g.
> 'emacs' to narrow down the results. The page numbers are not d= isplayed
> in the margins, to show that things still work fine.
>
> NOTE the next step should (well, should not of course) make Emacs hang= :
>
> Now just uncomment the line
>=C2=A0 =C2=A0;; (set-window-margins nil 4)
> in the function `baleen2` and repeat the last step (`M-x baleen2`). > Again, try to type 'emacs'. Unfortunately, Emacs more or less = hangs.
>
> I have no idea why suddenly Emacs hangs. I was wondering if any of
> you could explain this behavior, and hopefully suggest how to
> prevent it.
> (Of course, if there is no other solution, then I could just display t= he
> page numbers in the buffer text).
>
> I also have a second question, but I will send it in another mail (wit= h its
> own subject).

Did you try yourself to establish where Emacs loops and why?=C2=A0 The file=
etc/DEBUG includes instructions for how to debug what looks like an
infloop; search for "If the symptom of the bug is that Emacs fails to<= br> respond".

I notice that you say "more or less hangs".=C2=A0 What does this = mean,
exactly?=C2=A0 Does C-g interrupt the "hang"?
--000000000000fe62ef05f577f09e--