emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Bug: [PATCH] Make org-narrow-to-subtree usable out of Org mode [


From: Bastien
Subject: Re: [O] Bug: [PATCH] Make org-narrow-to-subtree usable out of Org mode [8.2.7b (release_8.2.7b-6-g07d470 @ /home/youngfrog/sourcetrees/org-mode/lisp/)]
Date: Mon, 28 Jul 2014 16:18:10 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux)

Hi Nicolas,

Nicolas Richard <address@hidden> writes:

> But now that I think about it, org mode simply should avoid narrow-map
> completely : users (me included) won't randomly try to run
> org-narrow-to-subtree outside of org buffers (and those who do deserve a
> bad error message) but they might want to give "C-x n s" a try if it is
> available.
>
> While writing a patch for changing that, I see that the code is:
> (if (boundp 'narrow-map)
>     (org-defkey narrow-map "s" 'org-narrow-to-subtree)
>   (org-defkey org-mode-map "\C-xns" 'org-narrow-to-subtree))
> (if (boundp 'narrow-map)
>     (org-defkey narrow-map "b" 'org-narrow-to-block)
>   (org-defkey org-mode-map "\C-xnb" 'org-narrow-to-block))
> (if (boundp 'narrow-map)
>     (org-defkey narrow-map "e" 'org-narrow-to-element)
>   (org-defkey org-mode-map "\C-xne" 'org-narrow-to-element))
>
> IOW, org.el purposely binds in narrow-map ! So now I don't get it :
> either it's in narrow-map and should be usable widely, or it's in
> org-mode-map only for org-mode files.

I think it's fine to bind `org-narrow-to-subtree' in narrow-map.
It's basically to enjoy the `C-x n prefix', which is natural here.

I applied your patch, but a good continuation would be to have
C-h n s bound to `outline-narrow-to-subtree' in outline-mode and
to `org-narrow-to-subtree' in org-mode, instead of just relying
on one single function.

This requires simplifying `org-narrow-to-subtree' and creating
`outline-narrow-to-subtree' in emacs.

What do you think?

-- 
 Bastien



reply via email to

[Prev in Thread] Current Thread [Next in Thread]