From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Peter Heslin Newsgroups: gmane.emacs.devel Subject: Re: outline-minor-mode with text before first heading Date: Fri, 22 Oct 2004 21:53:33 +0100 Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Message-ID: <20041022205333.GA10059@heslin.eclipse.co.uk> References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="EeQfGwPcQSOJBaQU" X-Trace: sea.gmane.org 1098478520 7025 80.91.229.6 (22 Oct 2004 20:55:20 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 22 Oct 2004 20:55:20 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Oct 22 22:55:13 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CL6RN-0005Go-00 for ; Fri, 22 Oct 2004 22:55:13 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CL6Ys-0007oM-Ry for ged-emacs-devel@m.gmane.org; Fri, 22 Oct 2004 17:02:58 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CL6Yi-0007oH-9X for emacs-devel@gnu.org; Fri, 22 Oct 2004 17:02:48 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CL6Yh-0007o1-Of for emacs-devel@gnu.org; Fri, 22 Oct 2004 17:02:47 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CL6Yh-0007nr-La for emacs-devel@gnu.org; Fri, 22 Oct 2004 17:02:47 -0400 Original-Received: from [212.104.129.139] (helo=mra04.ex.eclipse.net.uk) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CL6Qs-0001LR-3Y; Fri, 22 Oct 2004 16:54:42 -0400 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by mra04.ex.eclipse.net.uk (Postfix) with ESMTP id E9AB2134010; Fri, 22 Oct 2004 21:48:23 +0100 (BST) Original-Received: from mra04.ex.eclipse.net.uk ([127.0.0.1]) by localhost (mra04.ex.eclipse.net.uk [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 28835-01-21; Fri, 22 Oct 2004 21:48:23 +0100 (BST) Original-Received: from vectra (213-152-32-235.dsl.eclipse.net.uk [213.152.32.235]) by mra04.ex.eclipse.net.uk (Postfix) with ESMTP id 60E9C133CAB; Fri, 22 Oct 2004 21:48:23 +0100 (BST) Original-Received: from pj by vectra with local (Exim 3.36 #1 (Debian)) id 1CL6Pl-0002hw-00; Fri, 22 Oct 2004 21:53:33 +0100 Original-To: Richard Stallman Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.4i X-Virus-Scanned: by Eclipse VIRUSshield at eclipse.net.uk 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: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:28742 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:28742 --EeQfGwPcQSOJBaQU Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Fri, Oct 22, 2004 at 06:47:10AM -0400, Richard Stallman wrote: > Maybe hide-body should always leave text before the first heading > unchanged. Maybe that text should never be hidden. Does anyone > think it is a useful feature to hide text before the first heading? Since both you and Stefan seem inclined to think that hiding text before the first heading is the wrong thing to do (and I agree), here's a simpler patch that fixes the bug rather than making the new behavior optional. > By the way, please use diff -c to make patches. OK. --EeQfGwPcQSOJBaQU Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="diff.txt" *** /usr/local/share/emacs/21.3.50/lisp/outline.el 2004-09-13 12:28:12.000000000 +0100 --- outline.el 2004-10-22 21:24:18.000000000 +0100 *************** *** 723,729 **** (progn (outline-next-preface) (point)) nil))) (defun hide-body () ! "Hide all of buffer except headings." (interactive) (hide-region-body (point-min) (point-max))) --- 723,729 ---- (progn (outline-next-preface) (point)) nil))) (defun hide-body () ! "Hide all body lines in buffer, leaving all headings visible." (interactive) (hide-region-body (point-min) (point-max))) *************** *** 738,744 **** (narrow-to-region start end) (goto-char (point-min)) (if (outline-on-heading-p) ! (outline-end-of-heading)) (while (not (eobp)) (outline-flag-region (point) (progn (outline-next-preface) (point)) t) --- 738,745 ---- (narrow-to-region start end) (goto-char (point-min)) (if (outline-on-heading-p) ! (outline-end-of-heading) ! (outline-next-preface)) (while (not (eobp)) (outline-flag-region (point) (progn (outline-next-preface) (point)) t) --EeQfGwPcQSOJBaQU Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-devel --EeQfGwPcQSOJBaQU--