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: narrow-to-page: when page-delimiter spans lines, exclude if from narrowed bit. Date: Tue, 6 Sep 2005 08:39:10 +0000 (GMT) Message-ID: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Trace: sea.gmane.org 1125997198 21406 80.91.229.2 (6 Sep 2005 08:59:58 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 6 Sep 2005 08:59:58 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Sep 06 10:59:56 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1ECZIb-0002Nk-Nk for ged-emacs-devel@m.gmane.org; Tue, 06 Sep 2005 10:59:26 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ECZN5-0001IQ-NK for ged-emacs-devel@m.gmane.org; Tue, 06 Sep 2005 05:04:03 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1ECYzu-00035m-IX for emacs-devel@gnu.org; Tue, 06 Sep 2005 04:40:06 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1ECYzs-00035K-79 for emacs-devel@gnu.org; Tue, 06 Sep 2005 04:40:04 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ECYzq-00035E-N6 for emacs-devel@gnu.org; Tue, 06 Sep 2005 04:40:03 -0400 Original-Received: from [193.149.49.134] (helo=acm.acm) by monty-python.gnu.org with esmtp (Exim 4.34) id 1ECYz9-0001kR-Ch for emacs-devel@gnu.org; Tue, 06 Sep 2005 04:39:21 -0400 Original-Received: from localhost (root@localhost) by acm.acm (8.8.8/8.8.8) with SMTP id IAA00572 for ; Tue, 6 Sep 2005 08:39:11 GMT X-Sender: root@acm.acm Original-To: emacs-devel@gnu.org 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:42651 Archived-At: Hi, Emacs! Normally in narrow-to-page, when page-delimiter is something nice and simple like "^^L", the delimiter at the end of the page is excluded from the region narrowed to. A change made in version 1.8 was intended to handle multi-line delimiters, but this change wasn't completed. Currently, when the page delimiter spans line breaks, only the last line of the delimiter gets excluded. The following patch fixes this. 2005-09-06 Alan Mackenzie * page.el (narrow-to-page): Exclude _entire_ multi-line delimiter from the region narrowed to. *** page.el Mon Sep 5 12:44:15 2005 --- page-1.19.acm.el Tue Sep 6 08:10:14 2005 *************** *** 112,118 **** (save-excursion (goto-char (match-beginning 0)) ; was (beginning-of-line) (looking-at page-delimiter))) ! (beginning-of-line)) (narrow-to-region (point) (progn ;; Find the top of the page. --- 112,118 ---- (save-excursion (goto-char (match-beginning 0)) ; was (beginning-of-line) (looking-at page-delimiter))) ! (goto-char (match-beginning 0))) ; was (beginning-of-line) (narrow-to-region (point) (progn ;; Find the top of the page. -- Alan Mackenzie (Munich, Germany)