From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: displaying margins leads to Emacs hanging Date: Fri, 24 Feb 2023 21:41:36 +0200 Message-ID: <83edqen95b.fsf@gnu.org> References: Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23553"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: dalanicolai Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Feb 24 20:42:20 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 1pVdxU-0005uc-4Z for ged-emacs-devel@m.gmane-mx.org; Fri, 24 Feb 2023 20:42:20 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pVdwp-000121-Fk; Fri, 24 Feb 2023 14:41:39 -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 1pVdwn-0000xX-Gz for emacs-devel@gnu.org; Fri, 24 Feb 2023 14:41:37 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pVdwn-0000y9-87; Fri, 24 Feb 2023 14:41:37 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=VfbhNhb5eiKJgQY2HZRnaain5Jgj5gavo6lgol2vkfA=; b=kmS3hNMc4ZqQ KKHNG+k0rDka+OumcaWArREwGt3e/HU1/n+Ts+gHm0U83PcxPL9Fn1lyXnj3FrQP+geZj8xUe61B0 mChH3x+gtcnV1d+RLGsdi9BuKRJbCGiwzsKsXF/5W1wSwLzyXUEqPqyhs8kJ7cXxwPbY2bGIjfQHk EHna2GDHldm8IFnK2ZpJVrTI51xLmr/Vbby83m61Yyp/GF+uRhpBuC7EVWy2vT5tEibQCsmdnPq/z Ye7Fbfv+ech8JcpdE1bQcn9SzbN7K+oMD4IY16/uDgrz9hfF9gmTLFrmFqeVVmqAdjQo+w2rHIa8O QFDxxVNVdCEc+gyGnIrTrQ==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pVdwm-0004ng-Ln; Fri, 24 Feb 2023 14:41:37 -0500 In-Reply-To: (message from dalanicolai on Fri, 24 Feb 2023 20:29:02 +0100) 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:303757 Archived-At: > 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"?