all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Peter Heslin <pj@heslin.eclipse.co.uk>
Cc: emacs-devel@gnu.org
Subject: Re: outline-minor-mode with text before first heading
Date: Fri, 22 Oct 2004 21:53:33 +0100	[thread overview]
Message-ID: <20041022205333.GA10059@heslin.eclipse.co.uk> (raw)
In-Reply-To: <E1CKwww-0007OQ-K3@fencepost.gnu.org>

[-- Attachment #1: Type: text/plain, Size: 550 bytes --]

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.



[-- Attachment #2: diff.txt --]
[-- Type: text/plain, Size: 1133 bytes --]

*** /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)

[-- Attachment #3: Type: text/plain, Size: 142 bytes --]

_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

      parent reply	other threads:[~2004-10-22 20:53 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-21  1:31 outline-minor-mode with text before first heading Peter Heslin
2004-10-21  8:04 ` Peter Heslin
2004-10-22 10:47 ` Richard Stallman
2004-10-22 19:32   ` Stefan
2004-10-22 20:53   ` Peter Heslin [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20041022205333.GA10059@heslin.eclipse.co.uk \
    --to=pj@heslin.eclipse.co.uk \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.