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.bugs Subject: bug#72759: 31.0.50; Emacs hangs with open-paren-in-column-0-is-defun-start set to nil Date: Thu, 22 Aug 2024 16:54:24 +0300 Message-ID: <86msl4slwv.fsf@gnu.org> References: <868qwou8pv.fsf@gnu.org> <861q2gu56u.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="5462"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 72759@debbugs.gnu.org To: Eshel Yaron Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Aug 22 15:55:51 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1sh8Hy-00012i-9R for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 22 Aug 2024 15:55:46 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sh8HW-0003C7-Q9; Thu, 22 Aug 2024 09:55:18 -0400 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 1sh8HV-000386-7J for bug-gnu-emacs@gnu.org; Thu, 22 Aug 2024 09:55:17 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sh8HU-0002oD-Uv for bug-gnu-emacs@gnu.org; Thu, 22 Aug 2024 09:55:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=References:In-Reply-To:From:Date:To:Subject; bh=rMekOrIEoaQQI6Nu6pPmoWjy/4JV7/7RQZ05AwP4Ssw=; b=u3cbfL0LFPIgynYaHGV5GIeXYuPS4ZF5CvJYa6dUXQB714QqTImPVrgv0z6E56dhLy/pzY8N7DyHLdcD507mBac/VR1+AbO2SrN0uWKoriXWnyrO3YWOGb4Tz1ZzhVXKd+oC6ezaa/KYdLlmVX2Cp7lvU1BzMqngrZ/31DyonTbz9+kq+QzSwU5KvYVbQoUwjVkyJRR6b33ABqwHS8WkD7aI3/gZCOhfRqYSXwnJBMf2IGcH692m3YyYaIfbIfE14izYhBRytZpXSrQb/elNAFptPrCbnlmRzHNoLuYaj9vnpiBehgH3N0I2N+a674F+T9LbEPfzqlbTPzKbDOrZZA==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sh8IE-0003KC-Ie for bug-gnu-emacs@gnu.org; Thu, 22 Aug 2024 09:56:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 22 Aug 2024 13:56:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 72759 X-GNU-PR-Package: emacs Original-Received: via spool by 72759-submit@debbugs.gnu.org id=B72759.172433492311873 (code B ref 72759); Thu, 22 Aug 2024 13:56:02 +0000 Original-Received: (at 72759) by debbugs.gnu.org; 22 Aug 2024 13:55:23 +0000 Original-Received: from localhost ([127.0.0.1]:37295 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sh8Ha-00035L-Kc for submit@debbugs.gnu.org; Thu, 22 Aug 2024 09:55:23 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:33652) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sh8HY-00033C-7n for 72759@debbugs.gnu.org; Thu, 22 Aug 2024 09:55:21 -0400 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 1sh8Gi-0002Z4-F6; Thu, 22 Aug 2024 09:54:28 -0400 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=rMekOrIEoaQQI6Nu6pPmoWjy/4JV7/7RQZ05AwP4Ssw=; b=MCMfwVoeHYHQ S7PJ9ayGv/MWKoFD6CNAsvQFN5JLzQmIFPK6HAed/Ejmb0TsoH5PBSiowOdQhvRo3XFGsT+ioFBN5 PnIhZuWLJ6vgIVxj9UU25eTvQTWUJ3II8CGCMAuBrGCCYFx/vDk2ejEZcfNf0p6W4ZbFXow/pWw77 4l7uPD603bRuovjjopDP8VRYIlspvS1iHPfJla00bpm7DdH7dJjzIDLxScLcDr3d0BGs9T5MSGwW6 4JRwJxWsSjrCTdbdvu1wsjC03aBoZuqOCnwPfljM67rEWFl22sZhST+0/2fkVIW9Ve9VuyC9lTybT pIGqcjFGv1cTyf1z64Ok0w==; In-Reply-To: (message from Eshel Yaron on Thu, 22 Aug 2024 14:37:01 +0200) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:290539 Archived-At: > From: Eshel Yaron > Cc: 72759@debbugs.gnu.org > Date: Thu, 22 Aug 2024 14:37:01 +0200 > > Eli Zaretskii writes: > > > Would it make sense to have checkdoc-next-docstring bind > > open-paren-in-column-0-is-defun-start to a non-nil value? > > Not entirely: the difference in behavior of beginning-of-defun is > unexpected, and may prove problematic in other cases as well, so it > would be best to fix the root cause IMO. Namely, in > beginning-of-defun-raw, the fallback cond clause fails to move forward > over an sexp that does starts after the beginning of the line. How do you propose to fix the root cause, when Emacs fails to correctly identify the beginning of a defun? Suppose we'd want to fix the condition of this loop: >> (while (and (not (setq found (checkdoc--next-docstring))) >> (beginning-of-defun -1))) so it doesn't infloop -- how would you go about that, when beginning-of-defun doesn't move and you are not at BOB? > You should also be able to see this in effect with C-- C-M-a at the > beginning of a line whose contents is " (foo)". The results vary > depending on the value of open-paren-in-column-0-is-defun-start. Exactly! When beginning-of-defun is confused, what are its callers supposed to do? They don't know better where the beginning of the previous defun is. Or what am I missing?