From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Tom Tromey Newsgroups: gmane.emacs.devel Subject: Re: [Emacs-diffs] scratch/widen-less a4ba846: Replace prog-widen with consolidating widen calls Date: Sat, 02 Dec 2017 07:02:02 -0700 Message-ID: <87indp5iud.fsf@tromey.com> References: <20171129233237.27462.23351@vcs0.savannah.gnu.org> <20171129233238.504B5204F1@vcs0.savannah.gnu.org> <5d668ce5-1482-a3d4-c01b-7d996a532567@yandex.ru> <20171130214621.GA22157@ACM> <27985594-3bb4-ce88-8928-2ccfeac13eae@yandex.ru> <20171201154913.GB3840@ACM> <20171201224504.GH3840@ACM> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1512223375 24949 195.159.176.226 (2 Dec 2017 14:02:55 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 2 Dec 2017 14:02:55 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.90 (gnu/linux) Cc: Alan Mackenzie , emacs-devel@gnu.org, Tom Tromey , Vitalie Spinu , Dmitry Gutov To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Dec 02 15:02:51 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 1eL8NW-00066F-Af for ged-emacs-devel@m.gmane.org; Sat, 02 Dec 2017 15:02:50 +0100 Original-Received: from localhost ([::1]:35774 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eL8Nb-0001Bo-5b for ged-emacs-devel@m.gmane.org; Sat, 02 Dec 2017 09:02:55 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54790) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eL8Mt-0001BX-Kz for emacs-devel@gnu.org; Sat, 02 Dec 2017 09:02:12 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eL8Mp-0006at-NN for emacs-devel@gnu.org; Sat, 02 Dec 2017 09:02:11 -0500 Original-Received: from gateway24.websitewelcome.com ([192.185.50.71]:13710) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eL8Mp-0006aV-DA for emacs-devel@gnu.org; Sat, 02 Dec 2017 09:02:07 -0500 Original-Received: from cm15.websitewelcome.com (cm15.websitewelcome.com [100.42.49.9]) by gateway24.websitewelcome.com (Postfix) with ESMTP id 6E2DF5BC0A6 for ; Sat, 2 Dec 2017 08:02:05 -0600 (CST) Original-Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id L8MmeVm1MR0LfL8MmeRqfT; Sat, 02 Dec 2017 08:02:05 -0600 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; 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=NklQL7/uFvnxjrme4juEMI+C+rwi/vqQKNR1ByEqiV4=; b=Y0X1Pl+FFvEANVj8fOl1r5c01U l28S83kTUdA32TEh+8tGAydtih3BKnV1/n2TnDj2t8UwM1QjZQRFRePc1yDuJxDiMlcHSMuBj7r5t BR/yOCSIITaeTeBaMzHRt7uun; Original-Received: from 71-218-90-63.hlrn.qwest.net ([71.218.90.63]:49802 helo=pokyo) by box5379.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89) (envelope-from ) id 1eL8Mm-001JGX-2N; Sat, 02 Dec 2017 08:02:04 -0600 X-Attribution: Tom In-Reply-To: (Stefan Monnier's message of "Fri, 01 Dec 2017 21:53:49 -0500") X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - box5379.bluehost.com X-AntiAbuse: Original Domain - gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tromey.com X-BWhitelist: no X-Source-IP: 71.218.90.63 X-Source-L: No X-Exim-ID: 1eL8Mm-001JGX-2N X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 71-218-90-63.hlrn.qwest.net (pokyo) [71.218.90.63]:49802 X-Source-Auth: tom+tromey.com X-Email-Count: 4 X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 192.185.50.71 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:220620 Archived-At: >>>>> "Stefan" == Stefan Monnier writes: Stefan> Right. And use of narrowing is the way that makes this adaption Stefan> simplest (in many cases it becomes trivial. See for example how easy Stefan> it's been to implement mhtml-mode). It doesn't much matter to me whether narrowing or some other approach is used. Narrowing was simpler at the time -- and, I tend to think, will always be simpler, because the various buffer primitives already respect it, so you don't need to pass extra information around. It has the same sort of utility as dynamic binding in this way, just like RMS pointed out in that Emacs paper back in the beginning. However - if something else is more desirable somehow, that's also fine with me. Stefan> I don't know of any MMM solution which provides a satisfactory user Stefan> experience and at the same time works for all major modes, Stefan> without any need to tweak them at all, no matter how twisted is the Stefan> major mode's code. Yes, I completely agree here. Some changes will be needed. If you look through the mhtml development process, there were a few tweaks needed here and there, at least one of which (a syntax change in sgml mode IIRC) was quite unexpected. I haven't really appreciated until recently that maybe some people were looking for a solution that required no changes. Better, I think, to accept that some changes are needed; maybe work to keep the changes reasonably small and specified; but then just update the interesting modes (maybe all modes) and move on. Also, there's still some unanswered questions in mhtml mode. For example, the way it captures sub-mode buffer-locals could really be improved. Maybe by applying .dir-locals from all the modes; maybe by having something like the mode hook but for sub-modes -- I'm not sure. Tom