unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: dalanicolai <dalanicolai@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: displaying margins leads to Emacs hanging
Date: Fri, 24 Feb 2023 21:41:36 +0200	[thread overview]
Message-ID: <83edqen95b.fsf@gnu.org> (raw)
In-Reply-To: <CACJP=3mPS1oKtpfX41WoaxqsFJWO+ybJqBsq_HQ5pE69Y=Kwyg@mail.gmail.com> (message from dalanicolai on Fri, 24 Feb 2023 20:29:02 +0100)

> 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 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"?



  reply	other threads:[~2023-02-24 19:41 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-24 19:29 displaying margins leads to Emacs hanging dalanicolai
2023-02-24 19:41 ` Eli Zaretskii [this message]
2023-02-24 20:26   ` dalanicolai
2023-02-24 20:29     ` Eli Zaretskii
2023-02-24 20:41       ` dalanicolai
2023-02-24 20:53         ` dalanicolai
2023-02-24 21:19           ` dalanicolai
2023-02-24 21:43             ` dalanicolai
2023-02-25 10:51           ` Eli Zaretskii
2023-02-25 13:17             ` dalanicolai
2023-02-25 13:42               ` Eli Zaretskii
2023-03-06 22:51                 ` dalanicolai
2023-02-24 21:25         ` Eli Zaretskii
2023-02-24 21:41           ` dalanicolai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83edqen95b.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=dalanicolai@gmail.com \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).