Browse Source

Hide subtree before exposing the headings with `C-c C-k'

Proposed by Ali Tofigh.

Now `C-c C-k' always creates the same view, independent of what the
subtree visibility was before.
Carsten Dominik 15 years ago
parent
commit
7403cb1992
3 changed files with 12 additions and 1 deletions
  1. 4 0
      doc/org.texi
  2. 5 0
      lisp/ChangeLog
  3. 3 1
      lisp/org.el

+ 4 - 0
doc/org.texi

@@ -1,3 +1,4 @@
+
 \input texinfo
 \input texinfo
 @c %**start of header
 @c %**start of header
 @setfilename ../../info/org
 @setfilename ../../info/org
@@ -881,6 +882,9 @@ exposed by a sparse tree command (@pxref{Sparse trees}) or an agenda command
 (@pxref{Agenda commands}).  With a prefix argument show, on each
 (@pxref{Agenda commands}).  With a prefix argument show, on each
 level, all sibling headings.  With double prefix arg, also show the entire
 level, all sibling headings.  With double prefix arg, also show the entire
 subtree of the parent.
 subtree of the parent.
+@kindex C-c C-k
+@item C-c C-k
+Expose all the headings of the subtree, CONTENT view for just one subtree.
 @kindex C-c C-x b
 @kindex C-c C-x b
 @item C-c C-x b
 @item C-c C-x b
 Show the current subtree in an indirect buffer@footnote{The indirect
 Show the current subtree in an indirect buffer@footnote{The indirect

+ 5 - 0
lisp/ChangeLog

@@ -1,3 +1,8 @@
+2010-05-20  Carsten Dominik  <carsten.dominik@gmail.com>
+
+	* org.el (org-kill-note-or-show-branches): Hide subtree before
+	exposing the headings.
+
 2010-05-19  Carsten Dominik  <carsten.dominik@gmail.com>
 2010-05-19  Carsten Dominik  <carsten.dominik@gmail.com>
 
 
 	* org.el (org-add-planning-info): Remove the empty line also
 	* org.el (org-add-planning-info): Remove the empty line also

+ 3 - 1
lisp/org.el

@@ -16764,7 +16764,9 @@ Also updates the keyword regular expressions."
   "If this is a Note buffer, abort storing the note.  Else call `show-branches'."
   "If this is a Note buffer, abort storing the note.  Else call `show-branches'."
   (interactive)
   (interactive)
   (if (not org-finish-function)
   (if (not org-finish-function)
-      (call-interactively 'show-branches)
+      (progn
+	(hide-subtree)
+	(call-interactively 'show-branches))
     (let ((org-note-abort t))
     (let ((org-note-abort t))
       (funcall org-finish-function))))
       (funcall org-finish-function))))