From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.devel Subject: Re: narrow-to-here-document Date: 26 Jun 2003 08:12:01 +0200 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: References: <20030620141028.GA1331@math.berkeley.edu> <20030621.012632.74543482.jet@gyve.org> <3EF73468.1030503@yahoo.com> <20030625.151015.68035851.jet@gyve.org> Reply-To: dak@gnu.org NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1056611597 6859 80.91.224.249 (26 Jun 2003 07:13:17 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Thu, 26 Jun 2003 07:13:17 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Thu Jun 26 09:13:13 2003 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19VQwT-0001m1-00 for ; Thu, 26 Jun 2003 09:13:13 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 19VR0s-0007QZ-00 for ; Thu, 26 Jun 2003 09:17:46 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.20) id 19VQve-0001mW-Ad for emacs-devel@quimby.gnus.org; Thu, 26 Jun 2003 03:12:22 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.20) id 19VQvF-0001Cb-NG for emacs-devel@gnu.org; Thu, 26 Jun 2003 03:11:57 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.20) id 19VQv3-0000gt-8y for emacs-devel@gnu.org; Thu, 26 Jun 2003 03:11:45 -0400 Original-Received: from m2.wifi.enstb.org ([193.50.97.163] helo=localhost.localdomain) by monty-python.gnu.org with esmtp (Exim 4.20) id 19VQuv-00009A-10 for emacs-devel@gnu.org; Thu, 26 Jun 2003 03:11:37 -0400 Original-Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by localhost.localdomain (8.12.8/8.12.8) with ESMTP id h5Q6C34f010778; Thu, 26 Jun 2003 08:12:03 +0200 Original-Received: (from dak@localhost) by localhost.localdomain (8.12.8/8.12.8/Submit) id h5Q6C2vW010774; Thu, 26 Jun 2003 08:12:02 +0200 Original-To: Stefan Daschek In-Reply-To: Original-Lines: 31 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Emacs development discussions. List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:15269 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:15269 Stefan Daschek writes: > David Kastrup writes: > > > Actually, what one really would want is to have a > > narrow-to-here-document which is not apparent in the display (leaving > > the context around the here document), and to have hooks that will > > revert the narrowing once the _user_ (as opposed to indentation code > > and the like) tries leaving the narrowed area. We would need some > > functionality inside of Emacs in order to deal with that, probably. > > Well, that sounds a bit like what mmm-mode.el [1] already does (or at > least tries to do). > > [1] http://mmm-mode.sourceforge.net/ AFAIR, it does not narrow, but merely switches major modes. As an example, it won't be useful for a shell script as a here document in a shell script. And indentation and stuff will look beyond the beginning of the language area. Perhaps indentation and brace matching and font locking and filling and other syntactical properties could be made to depend on a text property syntactic-realm or so that needs to be eq for belonging to the same area as point, and maybe could contain a syntax table and a local variable list or so? Just brainstorming, ignore this if it seems too wildly absurd. -- David Kastrup, Kriemhildstr. 15, 44793 Bochum