From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.devel Subject: Re: [Emacs-diffs] scratch/widen-less a4ba846: Replace prog-widen with consolidating widen calls Date: Mon, 4 Dec 2017 15:52:38 +0000 Message-ID: <20171204155238.GA5101@ACM> References: <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> <20171203185946.GC5531@ACM> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: blaine.gmane.org 1512403181 17843 195.159.176.226 (4 Dec 2017 15:59:41 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 4 Dec 2017 15:59:41 +0000 (UTC) User-Agent: Mutt/1.7.2 (2016-11-26) Cc: Eli Zaretskii , tom@tromey.com, monnier@iro.umontreal.ca, spinuvit@gmail.com, emacs-devel@gnu.org To: Dmitry Gutov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Dec 04 16:59:35 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 1eLt9a-0004Ch-U0 for ged-emacs-devel@m.gmane.org; Mon, 04 Dec 2017 16:59:35 +0100 Original-Received: from localhost ([::1]:43842 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eLt9g-00065y-Cm for ged-emacs-devel@m.gmane.org; Mon, 04 Dec 2017 10:59:40 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38946) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eLt8s-00064m-L9 for emacs-devel@gnu.org; Mon, 04 Dec 2017 10:58:51 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eLt8q-0000K3-1E for emacs-devel@gnu.org; Mon, 04 Dec 2017 10:58:50 -0500 Original-Received: from colin.muc.de ([193.149.48.1]:40567 helo=mail.muc.de) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1eLt8p-0000Jf-LQ for emacs-devel@gnu.org; Mon, 04 Dec 2017 10:58:47 -0500 Original-Received: (qmail 37809 invoked by uid 3782); 4 Dec 2017 15:58:46 -0000 Original-Received: from acm.muc.de (p548C7AC7.dip0.t-ipconnect.de [84.140.122.199]) by colin.muc.de (tmda-ofmipd) with ESMTP; Mon, 04 Dec 2017 16:58:44 +0100 Original-Received: (qmail 7794 invoked by uid 1000); 4 Dec 2017 15:52:38 -0000 Content-Disposition: inline In-Reply-To: X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de X-detected-operating-system: by eggs.gnu.org: FreeBSD 9.x [fuzzy] X-Received-From: 193.149.48.1 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:220698 Archived-At: Hello, Dmitry. On Mon, Dec 04, 2017 at 00:37:51 +0000, Dmitry Gutov wrote: > On 12/3/17 6:59 PM, Alan Mackenzie wrote: [ .... ] > You've never worked on a mixed-mode package, though. So yes, I > personally have a reason to assume that I have a better knowledge of the > problem area. OK. > But I never said that CC Mode must support it. Any chance you could give me some basic details of how to get into this MMM mode? Like which git branch (? scratch/widen-less ?) can I find the code in, and where is the best documentation to get started. > > You mentioned today, I think, that writing an MMM is hard. Well, CC > > Mode is hard, too. There are 30 calls to `widen' in CC Mode and 47 to > > `narrow-to-region'. They are all there for a reason. It will be > > grinding tedious work to sort out the whys and to remove them. > Still, that sounds manageable. And there's no hurry at all, as far as > I'm concerned. That's a good job! I've no idea how long it will take to make MMM and CC Mode work with eachother. > Anyway, I don't see how it [ a new region, distinct from THE region ] > would be qualitatively better. The problem of being able to function > in a restricted area of a buffer will still be there. I don't see that at the moment either, but perhaps that will become evident. > > Last February, I suggested extensions to the syntax code ("syntactic > > islands") which would allow operations such as parse-partial-sexp to > > work essentially without restriction in buffers with several syntax > > tables. How about exploring this possibility? > Please go ahead and explore. I've done my part with my proposal (which > was intentionally small and thus required small changes everywhere but > CC Mode). > > Believe it or not, I am in favour of CC Mode working in an MMM mode. > You just don't want the protocol we are proposing. Did you participate > in the prog-indentation-context discussion when it was proposed, by the way? Not much, if at all. I found those discussions to be lacking the context I would have needed to understand them. > >> I have a rough understanding of the issue, but since I haven't reached a > >> working state, I don't know how many pitfalls there are left. > > Neither do I. But RMS's "new region" and my "syntax islands" may be a > > more satisfactory way of resolving them. > May be, or may not. We'd need to see the code. That's fair. But the "syntax islands" proposal would be a lot of work, which I don't want to commit to before I see some sort of undertaking to take it seriously. [ .... ] > There are several ways to skin that cat. That's the second cat in as many days, here! -- Alan Mackenzie (Nuremberg, Germany).