From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.bugs Subject: bug#41897: 28.0.50; JavaScript comment filling with mhtml-mode Date: Fri, 26 Jun 2020 16:31:46 +0000 Message-ID: <20200626163146.GA9041@ACM> References: <20200620171827.7855.qmail@mail.muc.de> <87d05ta8z9.fsf@simenheg@gmail.com> <20200622191750.GA11506@ACM> <20200623083613.GA6957@ACM> <20200623162837.GB6957@ACM> <10235ec5-17c3-c281-b5ed-2c65a07bd02f@yandex.ru> <20200623191713.GC6957@ACM> <87sgeieujr.fsf@tromey.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="29326"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Simen =?UTF-8?Q?Heggest=C3=B8yl?= , 41897@debbugs.gnu.org, Dmitry Gutov To: Tom Tromey Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jun 26 18:38:20 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 1jorMq-0007WT-92 for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 26 Jun 2020 18:38:20 +0200 Original-Received: from localhost ([::1]:60702 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jorMp-0004Ig-A6 for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 26 Jun 2020 12:38:19 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55140) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jorGl-0002bS-Eb for bug-gnu-emacs@gnu.org; Fri, 26 Jun 2020 12:32:05 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:59676) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jorGk-0004Df-3e for bug-gnu-emacs@gnu.org; Fri, 26 Jun 2020 12:32:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jorGk-0008Ty-06 for bug-gnu-emacs@gnu.org; Fri, 26 Jun 2020 12:32:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 26 Jun 2020 16:32:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41897 X-GNU-PR-Package: emacs Original-Received: via spool by 41897-submit@debbugs.gnu.org id=B41897.159318911832595 (code B ref 41897); Fri, 26 Jun 2020 16:32:01 +0000 Original-Received: (at 41897) by debbugs.gnu.org; 26 Jun 2020 16:31:58 +0000 Original-Received: from localhost ([127.0.0.1]:42989 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jorGg-0008Tf-JD for submit@debbugs.gnu.org; Fri, 26 Jun 2020 12:31:58 -0400 Original-Received: from colin.muc.de ([193.149.48.1]:63085 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1jorGb-0008TJ-PH for 41897@debbugs.gnu.org; Fri, 26 Jun 2020 12:31:57 -0400 Original-Received: (qmail 20810 invoked by uid 3782); 26 Jun 2020 16:31:46 -0000 Original-Received: from acm.muc.de (p4fe15a5a.dip0.t-ipconnect.de [79.225.90.90]) by localhost.muc.de (tmda-ofmipd) with ESMTP; Fri, 26 Jun 2020 18:31:45 +0200 Original-Received: (qmail 9505 invoked by uid 1000); 26 Jun 2020 16:31:46 -0000 Content-Disposition: inline In-Reply-To: <87sgeieujr.fsf@tromey.com> X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de 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:182411 Archived-At: Hello, Tom. On Thu, Jun 25, 2020 at 14:53:44 -0600, Tom Tromey wrote: > >>>>> "Alan" == Alan Mackenzie writes: > Alan> Having several major modes in a single buffer has always been problematic > Alan> in Emacs. Personally, I think there needs to be amendments in the > Alan> low-level C code to support it properly, but I'm not able to do this work > Alan> on my own, and there doesn't seem to be enough enthusiasm on other > Alan> people's part to help out. > mhtml-mode was a stab at making this work. It does require some more > changes in Emacs (there's another bug open about font-lock that requires > some changes to the font-lock code, but there are also a few more I > could list), but I didn't come across anything requiring C changes. > What changes are you thinking of? In 2016, I came up with a preliminary, but detailed, design for "islands" which would make several major modes per buffer natively and naturally supported, without awkward workarounds. This included "island-local" variables to supplement buffer-local variables. All this would be implemented at the C level and would obviate the awkward pre/post-command-hook functions currently used by mhtml-mode for swapping in and out the buffer local variables. The post to emacs-devel which started the discussion was: Subject: A vision for multiple major modes: some design notes To: emacs-devel@gnu.org, Dmitry Gutov Date: Wed, 20 Apr 2016 19:44:50 +0000 Although interest was expressed, in the end there was nobody else jumping up shouting "hey, that's great! Can I help?" (not that I specifically asked for help), so the idea didn't advance beyond that preliminary design. I still think that parts of it could be helpful in mmm-mode (or its successor). > Dmitry> TBH I'm not sure if mhtml-mode does the save-and-restore dance which > Dmitry> would be necessary for this. mmm-mode does, though. > It does. Whatever happened to the idea of pulling mmm into Emacs core? > Maybe we could get rid of mhtml-mode. > Tom -- Alan Mackenzie (Nuremberg, Germany).