From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#40563: 28.0.50; Narrow to defun in python buffer Date: Mon, 26 Oct 2020 14:57:15 +0100 Message-ID: <87pn55145g.fsf@gnus.org> References: <87sgh9my8y.fsf@fliptop.i-did-not-set--mail-host-address--so-tickle-me> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18117"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: 40563@debbugs.gnu.org To: Tomas Nordin Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Oct 26 15:08:58 2020 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 1kX3BC-0004aQ-0X for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 26 Oct 2020 15:08:58 +0100 Original-Received: from localhost ([::1]:53892 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kX3BA-0000Wk-S3 for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 26 Oct 2020 10:08:56 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41154) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kX30c-0004Me-7X for bug-gnu-emacs@gnu.org; Mon, 26 Oct 2020 09:58:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:57338) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kX30b-0002el-Tx for bug-gnu-emacs@gnu.org; Mon, 26 Oct 2020 09:58:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kX30b-0003N1-Rq for bug-gnu-emacs@gnu.org; Mon, 26 Oct 2020 09:58:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 26 Oct 2020 13:58:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 40563 X-GNU-PR-Package: emacs Original-Received: via spool by 40563-submit@debbugs.gnu.org id=B40563.160372064912914 (code B ref 40563); Mon, 26 Oct 2020 13:58:01 +0000 Original-Received: (at 40563) by debbugs.gnu.org; 26 Oct 2020 13:57:29 +0000 Original-Received: from localhost ([127.0.0.1]:40651 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kX304-0003ME-V4 for submit@debbugs.gnu.org; Mon, 26 Oct 2020 09:57:29 -0400 Original-Received: from quimby.gnus.org ([95.216.78.240]:42980) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kX302-0003M1-Uy for 40563@debbugs.gnu.org; Mon, 26 Oct 2020 09:57:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=B3GZDoP/0relwixP5XZ0bxbocARsMIkJD3N8NUs55qM=; b=Q9C6imgr1zGz8xCWiak36Ic6zx mFGkglA6q3lDd0ORA+WjNuQc6oJay3a2sjxcyGAVyXog5yYCofScfTt+Z8qcygvBrsCvA2vE8/W3W 2LKwEjXSZabgliviGeGH2TU4eZzVFOrLYLKifQ9do9eGwgFQJ1msghqcydCNFMXyRrGI=; Original-Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kX2zs-0001WL-96; Mon, 26 Oct 2020 14:57:20 +0100 X-Now-Playing: Contriva's _If you had stayed..._: "presentiment" In-Reply-To: <87sgh9my8y.fsf@fliptop.i-did-not-set--mail-host-address--so-tickle-me> (Tomas Nordin's message of "Sun, 12 Apr 2020 00:52:13 +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" Xref: news.gmane.io gmane.emacs.bugs:191577 Archived-At: Tomas Nordin writes: > I then noticed that placing point just below the class definition and > then narrow works as expected. But I think the recipe way should work as > well. And even if not, this behavior is confusing. This bug is still present on the trunk. The problem is most easily reproduced by calling the (python-nav--beginning-of-defun) function directly. If point is on the first line, then this function won't do the right thing: def a1(self): pass Because it starts off checking whether it is, indeed, on the first line before trying to get to the start of the first line in the function. This seems like such a basic problem that I wondered whether it's a newly introduced bug, but it's been there for... at least a decade, apparently? Doesn't anybody use python-mode? It looks easy enough to fix, but I'm just wondering whether there's something obvious here I'm not seeing. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no