From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lennart Borgman Newsgroups: gmane.emacs.devel Subject: Re: Islands and streams Date: Tue, 23 Nov 2010 23:42:33 +0100 Message-ID: References: <201011201200.06827.bruno@clisp.org> <20101122193824.GA2745@muc.de> <87fwus4cpv.fsf@lola.goethe.zz> <20101123222325.GA3315@muc.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1290552191 27193 80.91.229.12 (23 Nov 2010 22:43:11 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 23 Nov 2010 22:43:11 +0000 (UTC) Cc: David Kastrup , emacs-devel@gnu.org To: Alan Mackenzie Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Nov 23 23:43:07 2010 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PL1Zo-00053Q-H7 for ged-emacs-devel@m.gmane.org; Tue, 23 Nov 2010 23:43:05 +0100 Original-Received: from localhost ([127.0.0.1]:52631 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PL1Zn-0006zl-RB for ged-emacs-devel@m.gmane.org; Tue, 23 Nov 2010 17:43:03 -0500 Original-Received: from [140.186.70.92] (port=55132 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PL1Zh-0006zP-FI for emacs-devel@gnu.org; Tue, 23 Nov 2010 17:42:58 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PL1Zf-0003DF-8Q for emacs-devel@gnu.org; Tue, 23 Nov 2010 17:42:57 -0500 Original-Received: from mail-ey0-f169.google.com ([209.85.215.169]:49138) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PL1Zf-0003Cq-3m; Tue, 23 Nov 2010 17:42:55 -0500 Original-Received: by eydd26 with SMTP id d26so11095923eyd.0 for ; Tue, 23 Nov 2010 14:42:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=Gc/1k3FDyfcqsvEq9S0KNcon6gHSL9MA3qVqZftMukU=; b=MY3LQC3rlOCohtOb96G3b8XjzY/vaURtO0RwRwinC8p2ZThCd8Ba4t2VKHosiGiUMB afcBYPNtPyI8aADo67tOU9jBMuCt2RQ4K96U9LbLnL5x9RpHha7Npyk9ghmM2h2NcZoF +9uyXOLjFs4ATAXjuvayvaINHBr3YrHjLcw+k= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; b=ADIPiBEwuFLGS6oUPvvH6TgYrESxysvSL59bTJme2qoh9auaUQOb/SSXMb+dqnwdb3 MhpdAWXW5F5nbK0lIUWA98lE3p0/k9VmkR55z5CxgufX4Erp3l1AO/BdyyPiZqRpP16C +TwHHvKIUgWE9Hctcz4WxjR9peJkqOw9oDWSY= Original-Received: by 10.213.34.142 with SMTP id l14mr2469115ebd.84.1290552173827; Tue, 23 Nov 2010 14:42:53 -0800 (PST) Original-Received: by 10.213.34.199 with HTTP; Tue, 23 Nov 2010 14:42:33 -0800 (PST) In-Reply-To: <20101123222325.GA3315@muc.de> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:133097 Archived-At: On Tue, Nov 23, 2010 at 11:23 PM, Alan Mackenzie wrote: > Evening, David! > > On Tue, Nov 23, 2010 at 10:21:32AM +0100, David Kastrup wrote: >> Alan Mackenzie writes: > >> > Emacs's syntax and movement routines should be enhanced to handle >> > "islands". =C2=A0An @dfn{island} is a contiguous region of text where = a >> > major mode different from the surrounding text's is in force. =C2=A0It= might >> > be feasible to mark an island with syntax-table text props, it might n= ot. >> > Islands can be nested. > >> > Movement commands normally don't recognise islands as anything unusual= , >> > and just move into/out of them. =C2=A0By binding variable "respect-isl= ands" to >> > non-nil, any movement command would skip over any islands it encounter= ed, >> > and such commands could not move point out of an island. > >> > Several islands with the same major mode can by chained together as a >> > @dfn{stream}. =C2=A0When respect-islands is non-nil, movement commands= can >> > jump over the "ocean" to the next/previous island in the chain. > >> > Some other Emacs features, such as font locking, would need enhancemen= t. > >> [...] > >> > What do people think (other than the obvious, that I should implement = it >> > myself ;-)? > >> That it is an excessively bad idea. =C2=A0Lots of Elisp code relies on >> (=3D (1+ (point)) (save-excursion (forward-char) (point))) >> and similar equivalences. =C2=A0For this reason, "intangible" regions ha= ve >> never worked reliably, and only in very limited contexts. =C2=A0Also for= this >> reason, multibyte support was quite unreliable and unpredictable until >> buffer positions were made to correspond to character positions instead >> of byte counts. > > That's a good point. =C2=A0But by default, the new feature would not be > enabled. =C2=A0Only when a major mode binds `respect-islands' would it co= me > into effect, and presumably the major mode would know what it was doing. Maybe I am misunderstanding something here. What I proposed was low level changes that makes chunks in other major modes look like they were just filled with spaces. Is not this the same as you propose, Alan? Is there any problems with such a change? (Other than implementing it. ;-)