From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.devel Subject: Re: [Emacs-diffs] scratch/widen-less a4ba846: Replace prog-widen with consolidating widen calls Date: Tue, 5 Dec 2017 00:57:40 +0200 Message-ID: <50c2ac7c-f8ea-81b6-aeab-492c1e35826e@yandex.ru> References: <20171129233237.27462.23351@vcs0.savannah.gnu.org> <5d668ce5-1482-a3d4-c01b-7d996a532567@yandex.ru> <20171130214621.GA22157@ACM> <27985594-3bb4-ce88-8928-2ccfeac13eae@yandex.ru> <20171201154913.GB3840@ACM> <1e542021-e389-cca4-6acd-349efddb2652@yandex.ru> <20171201223529.GG3840@ACM> <4a94ec5c-efdd-50f1-ff4d-277f5f45c2df@yandex.ru> <83lgil1qme.fsf@gnu.org> <83d13x1j2s.fsf@gnu.org> <34abea95-c7f7-e8fa-8407-8c2fd2a4cfe1@yandex.ru> <83y3mkzw1n.fsf@gnu.org> <83mv2zzv7z.fsf@gnu.org> <643908a3-bec8-3ac1-38f7-4e73611478ef@yandex.ru> <83k1y3zq2n.fsf@gnu.org> <83tvx6xzgl.fsf@gnu.org> <83fu8qxwil.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1512428276 9892 195.159.176.226 (4 Dec 2017 22:57:56 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 4 Dec 2017 22:57:56 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:57.0) Gecko/20100101 Thunderbird/57.0 Cc: acm@muc.de, tom@tromey.com, spinuvit@gmail.com, emacs-devel@gnu.org To: Eli Zaretskii , Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Dec 04 23:57:52 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eLzgM-0002Bd-4I for ged-emacs-devel@m.gmane.org; Mon, 04 Dec 2017 23:57:50 +0100 Original-Received: from localhost ([::1]:45616 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eLzgT-0000MQ-EY for ged-emacs-devel@m.gmane.org; Mon, 04 Dec 2017 17:57:57 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46234) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eLzgK-0000ML-I6 for emacs-devel@gnu.org; Mon, 04 Dec 2017 17:57:49 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eLzgG-0003k1-Lw for emacs-devel@gnu.org; Mon, 04 Dec 2017 17:57:48 -0500 Original-Received: from mail-wr0-x244.google.com ([2a00:1450:400c:c0c::244]:37831) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eLzgG-0003jn-Ec; Mon, 04 Dec 2017 17:57:44 -0500 Original-Received: by mail-wr0-x244.google.com with SMTP id k61so19070636wrc.4; Mon, 04 Dec 2017 14:57:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=pQ5gB1rsNoK2SSwYMsWXden7oIvQAJZ1bisEisoObIA=; b=RBP7GHqfw4oV0uST5XGhXi8SKBAD4EsrVxiGBc71AbNU/oazYxm9zF9CuckALhY+FG Iv+exUGA8vo9wPLtqqPZ0IQ5fby5enqW7Ejng/qy4Vgop86SM2qiv+7+jOCmJ/R1sfGD AaFTVfHlsM65XlqeyV5IwuCHRp6dvAu4O7E2KSW1oO7E7dgbY3xgj/mnXXoOKfe57EXa A5by3wVkTMaIoOv89vmNHP3668xGSQkynMtMENqDGmtCy9ZyTv85vQFvDlx6Eo3OTo2n LIA/DQH97aPDqKAm52d5ke1T1CMpbTR63KcaktRmlhvvHt50iomDrpdV/uTRgK6SSLtt cFzA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=pQ5gB1rsNoK2SSwYMsWXden7oIvQAJZ1bisEisoObIA=; b=ZjI+vFDlkEY4ld2WCnEOkmrucTteBcd3y1YursIZtPhCjNJz6FMjIznyOoedUP8qXE JcffRDoI5ZYAh+pZiy3uLLJUc1EldWuPq5B/rP5GFhdPbdSZ8zqH8p0P+Hsn8C5g19Db iecmcXtSWoCdDzqdM2fHAKG0bMNplXIWTuXk0qM6hwXdzVFO1zx5NQUfenwTA+Qc1hQA yQDMs8q5JJStpiNl0yCG36XOZ6/ajLp5q+Wimnis9PsMGMwhPV9nVGtwu1XWROzccNsq hN22lxJfq5IX4ynC0TZc+kf2inm8ucG9PMfk1ZPGP0YRVr1vWNz5QFebQJZiMwO+3tlV f49w== X-Gm-Message-State: AJaThX7ZL6cj1XevFfAdlDZY8yS68YGCo7GCXf8ZjTukhny6GW0P+5tT FrbLqI68xL3VC+cfz4vm9CI7C8nC X-Google-Smtp-Source: AGs4zMac9v0+5LKCDQ+m8LERV1t37r/uZ6tWMU73RN1ToMBbDBrSYyiA+pCj2GIGe3d/ZkoeFOt/pA== X-Received: by 10.223.139.196 with SMTP id w4mr13591680wra.51.1512428262966; Mon, 04 Dec 2017 14:57:42 -0800 (PST) Original-Received: from [192.168.1.3] ([185.105.174.193]) by smtp.googlemail.com with ESMTPSA id q74sm4883687wmg.22.2017.12.04.14.57.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 04 Dec 2017 14:57:42 -0800 (PST) In-Reply-To: <83fu8qxwil.fsf@gnu.org> Content-Language: en-US X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c0c::244 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:220725 Archived-At: On 12/4/17 6:56 PM, Eli Zaretskii wrote: >> His proposal is reworking prog-indentation-context. >> CC-mode doesn't support prog-indentation-context, so it's no surprise >> that it doesn't support this replacement= and I don't see why suddenly >> we should first get CC-mode to support it before the replacement can >> be installed. > > Not "first", "together with", or at least "soon enough after". That still doesn't follow. >> Apparently, this has not been enough motivation for the last decade, so >> I'm not holding my breath. > > Well, Alan just said he will try to make that happen, so I _am_ > holding my breath. That's wonderful. But I'm still not going to hold my breath regarding the time estimates. It might turn out to be fairly time-consuming. >> There isn't any. PREV-CHUNK is probably a good idea somewhere in some >> cases, but we haven't found those cases yet. > > But it's already in Emacs. So the question IMO is "is it such a bad > idea that we need to get rid of it right away?" It's pointless: PREV-CHUNK must be followed/used by a major mode. The majority of the important major modes are inside Emacs (the ones used by ANTLR are, at least). So there won't be any real benefit to keeping it in. On the other hand, we might get a better idea how to solve that problem in a different way, during the next release cycle. > AFAIU, prog-indentation-context could support a way to nest > restrictions, because prev-chunk could be a function. Nobody really knows how to use this. >> You mean we should provide patches for those codes using >> prog-indentation-context? Doesn't Dmitry's branch already do that? > > Not for ANTLR whose latest versions are maintained outside Emacs, > AFAIU. The diff will be like 4 lines. I can submit it whenever, wherever you want. >>> I don't see the incompatibilities. Basically, you replaced prog-widen >>> with widen, >> >> Actually, no. > > Again, I might be missing something, but "git diff" says I'm right. Not really. There is one place where it looks like prog-widen is replaced by widen, but it's inside a function that's not part of the indentation engine (python-indent-guess-indent-offset, despite what its name suggests, is called from the major mode function, not through indent-line-function). The other places, inside indentation engines, feature the removals of prog-widen and (in one case) widen calls.