From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.devel Subject: Re: A vision for multiple major modes: some design notes Date: Sat, 23 Apr 2016 17:14:51 +0000 Message-ID: <20160423171451.GC4624@acm.fritz.box> References: <20160420194450.GA3457@acm.fritz.box> <8360vb6o7u.fsf@gnu.org> <20160421221943.GE1775@acm.fritz.box> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1461431710 29988 80.91.229.3 (23 Apr 2016 17:15:10 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 23 Apr 2016 17:15:10 +0000 (UTC) Cc: emacs-devel@gnu.org To: Andy Moreton Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Apr 23 19:15:02 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1au194-00033X-7z for ged-emacs-devel@m.gmane.org; Sat, 23 Apr 2016 19:15:02 +0200 Original-Received: from localhost ([::1]:53025 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1au193-0008D7-Bq for ged-emacs-devel@m.gmane.org; Sat, 23 Apr 2016 13:15:01 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38541) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1au18z-00089t-FF for emacs-devel@gnu.org; Sat, 23 Apr 2016 13:14:58 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1au18u-0002fo-FL for emacs-devel@gnu.org; Sat, 23 Apr 2016 13:14:57 -0400 Original-Received: from mail.muc.de ([193.149.48.3]:37619) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1au18u-0002fi-6N for emacs-devel@gnu.org; Sat, 23 Apr 2016 13:14:52 -0400 Original-Received: (qmail 64528 invoked by uid 3782); 23 Apr 2016 17:14:51 -0000 Original-Received: from acm.muc.de (p579E8F13.dip0.t-ipconnect.de [87.158.143.19]) by colin.muc.de (tmda-ofmipd) with ESMTP; Sat, 23 Apr 2016 19:14:50 +0200 Original-Received: (qmail 5182 invoked by uid 1000); 23 Apr 2016 17:14:51 -0000 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) 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 X-Received-From: 193.149.48.3 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:203217 Archived-At: Hello, Andy. On Fri, Apr 22, 2016 at 02:42:07PM +0100, Andy Moreton wrote: > On Thu 21 Apr 2016, Alan Mackenzie wrote: [ .... ] > Care will be needed to allow more than one island chain using the same > inner mode, where the chains represent unrelated documents that are > independently embedded in the larger document. This is built into the fabric of the mechanism, and shouldn't present a problem. > >> > o - `scan-lists', `scan-sexps', etc. will treat a "foreign" island as > >> > whitespace, much as they do comments. They will also treat as whitespace > >> > the gap between two islands in a chain. > >> Why whitespace? why not some new category? By overloading whitespace, > >> you make things harder on the underlying infrastructure, like regexp > >> search and matching. > > I think it's clear that the "foreign" island's syntax has no interaction > > with the current island. If we treat it as whitespace, that should > > minimise the amount of adapting we need to do to existing major modes. > There may be some interaction. The language used for the enclosing text > (using the super mode) may require quoting and escaping to be performed > on the content embedded in it. This means that the textual > representation of the content in the island chain may depend on what it > is embedded into. Good point! Thanks. > The inner mode for the island chain will either need to be aware of this > quoting and escaping syntax (belonging to the super mode), or the text > in the island chain will need to be unescaped and unquoted for the inner > mode to make sense of it. Umm. Yes, that could happen. Hopefully it won't be a big problem in practice. > AndyM -- Alan Mackenzie (Nuremberg, Germany).