[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] New command `outline-narrow-to-subtree'
From: |
Bastien |
Subject: |
Re: [PATCH] New command `outline-narrow-to-subtree' |
Date: |
Fri, 19 Aug 2011 14:59:43 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) |
Hi Leo,
Leo <address@hidden> writes:
> We add an interface function narrow-to-subtree which is bound globally
> to C-x n s.
>
> (defvar narrow-to-subtree-function nil
> "Function to call to narrow to a subtree.")
>
> (defun narrow-to-subtree ()
> (interactive)
> (if (functionp narrow-to-subtree-function)
> (funcall narrow-to-subtree-function)
> (error "Don't know how to narrow to a subtree in current buffer")))
>
> then outline-mode, allout, org-mode and others can each provide its
> specific narrow-to-subtree-function.
I see how this solution would add the ̀narrow-to-subtree' command to the
narrow-map -- but what is a "subtree" outside org-mode and outline-mode?
If we add outline-narrow-to-subtree, then we have all we we need for Org
and outline-mode.
The question is then: does `narrow-map' need to know about every
narrow-to-* functions that mode can define for themselves?
I'd be curious about people's input.
--
Bastien