Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: utzoo!mnetor!seismo!gatech!bloom-beacon!bu-cs!m2c!ulowell!wanginst!ardis
From: ardis@wanginst.EDU (Mark A. Ardis)
Newsgroups: comp.emacs
Subject: Re: interactive recursive narrowing
Message-ID: <1293@wanginst.EDU>
Date: Mon, 6-Jul-87 11:00:38 EDT
Article-I.D.: wanginst.1293
Posted: Mon Jul  6 11:00:38 1987
Date-Received: Tue, 7-Jul-87 06:03:09 EDT
References: <8707021017.AA21039@EDDIE.MIT.EDU>
Organization: Wang Institute, Tyngsboro, Ma.  01879
Lines: 34
Summary: Solution with recursive-edit.

In article <8707021017.AA21039@EDDIE.MIT.EDU>, MANSFIEL@EMBL.BITNET (Niall Mansfield) writes:
> 
> The standard GNU Emacs "narrow-to-region" and "widen" allow
> for only one-or-none narrowing - i.e. you're narrowed or
> not.
> 
> Often I would have found it helpful to have recursive
> narrowing.  Is there any way to do this?

Try this:

;;; recursive-narrow.el -- recursive narrowing
;;; Mark A. Ardis, July 6, 1987

(defun recursive-narrow (start stop)
  "Narrow to the region between START and STOP, invoke recursive-edit
   to allow further editing, then widen to the previous restriction."
  (interactive "r")
					; Local Variables
  (let ()
					; Body
    (save-restriction
      (narrow-to-region start stop)
      (recursive-edit)
      (widen)
      ) ; save-restriction
    ) ; let
  ) ; defun recursive-narrow

;;; end of recursive-narrow.el
-- 
Mark A. Ardis                           ardis%wanginst@CSNet-Relay (CSNet)
Wang Institute of Graduate Studies      ...!decvax!wanginst!ardis (UUCP)
72 Tyng Road, Tyngsboro, MA 01879-2099  (617) 649-9731