From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Arthur Miller Newsgroups: gmane.emacs.bugs Subject: bug#50646: 28.0.50; narrow-to-defun sometimes narrows to wrong defun Date: Sun, 19 Sep 2021 22:02:44 +0200 Message-ID: References: <3a6fa91859db00e5c382752ddedfbdd0@webmail.orcon.net.nz> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19161"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: 50646@debbugs.gnu.org To: Phil Sainty Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Sep 19 22:04:12 2021 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 1mS32p-0004lX-Jd for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 19 Sep 2021 22:04:12 +0200 Original-Received: from localhost ([::1]:50644 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mS32n-00018R-OG for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 19 Sep 2021 16:04:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44388) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mS31j-0000RJ-NQ for bug-gnu-emacs@gnu.org; Sun, 19 Sep 2021 16:03:08 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:56720) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mS31h-0005kH-ST for bug-gnu-emacs@gnu.org; Sun, 19 Sep 2021 16:03:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mS31h-00048e-OY for bug-gnu-emacs@gnu.org; Sun, 19 Sep 2021 16:03:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Arthur Miller Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 19 Sep 2021 20:03:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50646 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 50646-submit@debbugs.gnu.org id=B50646.163208177615897 (code B ref 50646); Sun, 19 Sep 2021 20:03:01 +0000 Original-Received: (at 50646) by debbugs.gnu.org; 19 Sep 2021 20:02:56 +0000 Original-Received: from localhost ([127.0.0.1]:40033 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mS31c-00048L-50 for submit@debbugs.gnu.org; Sun, 19 Sep 2021 16:02:56 -0400 Original-Received: from mail-oln040092066098.outbound.protection.outlook.com ([40.92.66.98]:35720 helo=EUR01-VE1-obe.outbound.protection.outlook.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mS31Y-000484-FZ for 50646@debbugs.gnu.org; Sun, 19 Sep 2021 16:02:54 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WKjUHuBcBpOuxWDiNTiXcxdPJ6LynW0iP6KODzvuEpvp1b0rtt/BwP8URZwD9J6hyE9MgAkP4OcAmNsm8BC/9c1gKAtS5OB7N3bOfh+6QnkWQust65SM+xwzGQebsYJ4NR4mUzzOMKsMLS+tQ0ybJ1l7kRk/wPXOxuVaB+NGbYziJI7v796f2mPo2jyLUgspbnIdkzG8t/q738V2vZ+bVOZHb5Xq2zah5MP6gNz6T/92mM1EMXrrgApwDwskhrP8Jf61TC30Dgk1KWRFeBfOMsHEubz8SFbBSLoWOxx8DTc0nKIPUkVSxf49TOOZyzYusEsHV+75AwWbz4AKPnouXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=AW7HB1RW+H1Jn6sjxBcWI07gXyHHkFjXLUAE0zrccn8=; b=BcizXtsPjqpCEYN9GiALemrg1Bty0fflIsYXRtUjvQ9529KADgrkCRt23kTk1ifNrluh57/Z+Lsx7z/QcBdszGUHdtP/MKBpwG3qTynFalOdaKH2/LTc6a06yNfVOma5Rs1loWibydeYBmHUQFC8QrHXBLBPB0gVf4BJ76M7Nsz87P8SAL8EhrARL1KjfFI5FTT5cRH6TNe5ddqLLga6cOVg+dr3bhDU2fxmlG4NW84m0FVKEiJY8Gnz7FHWCWdw812I4pMPA7sc2Yd6tbmDdXqKtVWmjvamNVAIYZXGePhsMelX4yHLe07/45dUzr/2Xcaz3hks9AtWKWKoQUv5yA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=live.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=AW7HB1RW+H1Jn6sjxBcWI07gXyHHkFjXLUAE0zrccn8=; b=FBZp/PExHDVHEZLU4sH1QKTKzm+IQypifsO4ufu590oS+AaHf9mvod/eMsRyOXW01GLdlngski7mE+/ylRPqWcH1Ag/RWe9G6w1F0MQplVFTDI34Di3jDsie8zHORVkY6pOKqO61KvK/69EMamZaB6jF2Z223z8zxZ+OSIGFQbYY1r6pJ82+9+2fWCAnW69ji1+TSvBVauRrXsfvbngw6faeogAV+7RRUShm6xf1jEYEKWu19tMoorKhV9ZcMlTdUG1bYt84+50DZCyu3r7sfoo/hpDe9pxuWFJSEUT/kZijzFvFCpGRn8K+nKG/ekBre/4F5oQlixjJbZUVxGCEnA== Original-Received: from AM9PR09MB4977.eurprd09.prod.outlook.com (2603:10a6:20b:304::20) by AM9PR09MB5075.eurprd09.prod.outlook.com (2603:10a6:20b:30f::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4523.16; Sun, 19 Sep 2021 20:02:45 +0000 Original-Received: from AM9PR09MB4977.eurprd09.prod.outlook.com ([fe80::c55c:ece5:bed2:a9dc]) by AM9PR09MB4977.eurprd09.prod.outlook.com ([fe80::c55c:ece5:bed2:a9dc%9]) with mapi id 15.20.4523.018; Sun, 19 Sep 2021 20:02:45 +0000 In-Reply-To: (Phil Sainty's message of "Sun, 19 Sep 2021 22:56:03 +1200") X-TMN: [BTo1ZBCwsSJgyPSqm3DUzUJOqdJJU437] X-ClientProxiedBy: AS9PR06CA0017.eurprd06.prod.outlook.com (2603:10a6:20b:462::13) To AM9PR09MB4977.eurprd09.prod.outlook.com (2603:10a6:20b:304::20) X-Microsoft-Original-Message-ID: <87wnnccp0b.fsf@live.com> X-MS-Exchange-MessageSentRepresentingType: 1 Original-Received: from pascal.homepc (81.232.177.30) by AS9PR06CA0017.eurprd06.prod.outlook.com (2603:10a6:20b:462::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4523.14 via Frontend Transport; Sun, 19 Sep 2021 20:02:45 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 9e4f84ef-53db-4118-28f8-08d97ba8725c X-MS-TrafficTypeDiagnostic: AM9PR09MB5075: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Zwoj6UrtewUbnD8dGw3MFRCkU8PxCVbruIC04EhC91WpPRleGpXsQzZ0SFbyxayZzIriH+IlIYeDIXElhDmJAF/gscp/Kg5Q2ORdpcRw/kodrXzdHFS7i6RJ42aDC7esmZeKc7ZDsuW1zxjEBizbQvEn7QwhtPEaSS2hl4Tg9esh+MFqPZL+noGvO/aFQAO7UknlFl1htUXiJ2xjnrUOZqaeiIchUl0cdGcB5iDW375Mz51LTd2WPwli/SMFcv9EvholGrPKdDtP7iNKWfaDZuL/MoT/TcU5vGO26I1oAEXFN1pWmqlRYW+HUvUyXIWGQHrpvS6zNWO6+41pWfD9z+CNSSCEKyqqt4k73/HupZLjbhLlH7M7N7iBFi/53yuBJpbSPEQGzhubYTxyMKXW2RbRQFT52LQZQ88WuoF6oGe+FkXeAhOZYQVVV4uOUkyV X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: v8X/huhoVIbgh6cHHm//RRv9oKOM3dWJX2slXh5dFL98SYdngff9x//+uN0JssFedbGO74im7FPmbjO0GlvH4LmA/sUh8WGZ7eKhtUVMR95rwAXLupcyMn8YHcW45hUg9T+PbM3tG+MpcUgMGVkZZw== X-OriginatorOrg: sct-15-20-3174-20-msonline-outlook-72e6e.templateTenant X-MS-Exchange-CrossTenant-Network-Message-Id: 9e4f84ef-53db-4118-28f8-08d97ba8725c X-MS-Exchange-CrossTenant-AuthSource: AM9PR09MB4977.eurprd09.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Sep 2021 20:02:45.5738 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9PR09MB5075 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:214784 Archived-At: Phil Sainty writes: > On 2021-09-19 18:36, Arthur Miller wrote: >> My question is though, why it happens only with 'when'? I haven't >> found any other form to show same behaviour. There probably are >> some, I just haven't found them by manually testing. > > Now that you've narrowed this down to a code conversion issue, that > part was simple to debug (by comparing the buffer in its literal and > non-literal forms), and the reason is that subr.el contains multi-byte > characters. This included a documentation bug, as the docstring for > `setq-local' had this paragraph in the source: > > The second VALUE is not computed until after the first VARIABLE > is set, and so on; each VALUE can use the new value of variables > set earlier in the =E2=80=98setq-local=E2=80=99. The return value of= the > =E2=80=98setq-local=E2=80=99 form is the value of the last VALUE. > > Note the incorrect unicode quote characters. > > I've just pushed a fix for that, but there's also a more intentional > INVERTED EXCLAMATION MARK unicode character in one of the comments, > though, and I've left this alone. > > ;; =C2=A1Beware! when I tried to edebug this code, Emacs got into a w= eird state > ;; where all the keys were unbound (i.e. it somehow got triggered > ;; within read-key, apparently). I had to kill it. > > In short, you don't want to be making assumptions about the encoding > of elisp files. > > Tangentially, the commit message related to those quote characters > says "expand the doc string by taking some text from `setq'", so I > believe those fancy unicode quote characters were accidentally copied > and pasted from a *Help* buffer rendering of the `setq' docstring. > I think it's a good idea to set `text-quoting-style' to 'grave to > ensure that can never happen. > > > -Phil Hi, sorry for the later answers, but it was busy day for me today. I just answered you in other, so I won't repeat here. Yes, I realized mysel= f what is going on today; I didn't do any testing and such, I such sent mail,= when I saw myself I used 'literal' version there. Anyway, thanks, and I see from the responses between you and Eli that it resulted in some updates to manual and you fixing erronous characters in subr.el, so my goofy misstake at least brought something good :). Anyway, thanks for the help and good job!