emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* reveal only current subtree
@ 2011-12-17 14:20 sergio
  2011-12-17 15:24 ` Takaaki ISHIKAWA
  2011-12-17 16:04 ` Carsten Dominik
  0 siblings, 2 replies; 18+ messages in thread
From: sergio @ 2011-12-17 14:20 UTC (permalink / raw)
  To: emacs-orgmode

Hello.

Is it possible to reveal only current subtree but entirely?

For example I have following structure:

* a
* b
** d
** e
*** f
*** g
 qwe
 qwe
*** h
*** i
* c

after jump to /b/e/g I see

* a
* b ...
** e ...
*** g ...
* c

the cursor is on g and i can expand it by tab.
And the main question is how to show all children of e without moving
cursor or collapsing (previously expanded) g?

* a
* b ...
** e
*** f
*** g
 qwe
 qwe
*** h
*** i
* c

C-c C-r doesn't show all "brothers" of current subtree.
C-u C-c C-r and C-u C-u C-c C-r shows a lot of redundant.

-- 
sergio.

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: reveal only current subtree
  2011-12-17 14:20 reveal only current subtree sergio
@ 2011-12-17 15:24 ` Takaaki ISHIKAWA
  2011-12-17 15:52   ` sergio
  2011-12-17 16:04 ` Carsten Dominik
  1 sibling, 1 reply; 18+ messages in thread
From: Takaaki ISHIKAWA @ 2011-12-17 15:24 UTC (permalink / raw)
  To: sergio; +Cc: emacs-orgmode

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

Dear sergio,

Hi. 
How do you jump to subtrees?
Could you give me the detail, I can probably help you.

Best regards,
Takaaki Ishikawa

> after jump to /b/e/g I see
> 
> * a
> * b ...
> ** e ...
> *** g ...
> * c


[-- Attachment #2: Message signed with OpenPGP using GPGMail --]
[-- Type: application/pgp-signature, Size: 455 bytes --]

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: reveal only current subtree
  2011-12-17 15:24 ` Takaaki ISHIKAWA
@ 2011-12-17 15:52   ` sergio
  2011-12-17 16:09     ` Takaaki ISHIKAWA
  0 siblings, 1 reply; 18+ messages in thread
From: sergio @ 2011-12-17 15:52 UTC (permalink / raw)
  To: emacs-orgmode

On 12/17/2011 07:24 PM, Takaaki ISHIKAWA wrote:

> How do you jump to subtrees?
C-c C-j b/e/g
with (setq org-goto-interface 'outline-path-completion)
or via agenda.

> Could you give me the detail, I can probably help you.
What details you need?

-- 
sergio.

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: reveal only current subtree
  2011-12-17 14:20 reveal only current subtree sergio
  2011-12-17 15:24 ` Takaaki ISHIKAWA
@ 2011-12-17 16:04 ` Carsten Dominik
  2011-12-17 17:57   ` sergio
  1 sibling, 1 reply; 18+ messages in thread
From: Carsten Dominik @ 2011-12-17 16:04 UTC (permalink / raw)
  To: sergio; +Cc: emacs-orgmode


On 17.12.2011, at 15:20, sergio wrote:

> Hello.
> 
> Is it possible to reveal only current subtree but entirely?
> 
> For example I have following structure:
> 
> * a
> * b
> ** d
> ** e
> *** f
> *** g
> qwe
> qwe
> *** h
> *** i
> * c
> 
> after jump to /b/e/g I see
> 
> * a
> * b ...
> ** e ...
> *** g ...
> * c
> 
> the cursor is on g and i can expand it by tab.
> And the main question is how to show all children of e without moving
> cursor or collapsing (previously expanded) g?

You can do

   C-u 1 TAB

to cycle on the level 1 hearing without moving point.

Also, if you always want this to happen after org-goto,

you can do

  M-x customize-group RET org-reveal-location

and customize the exact behavior for org-goto by
pressing INS at each relevant variable, selecting `org-goto'
from the context drop-down menu and setting the desired value
for this specific context.

Hope this helps!

- Carsten

> 
> * a
> * b ...
> ** e
> *** f
> *** g
> qwe
> qwe
> *** h
> *** i
> * c
> 
> C-c C-r doesn't show all "brothers" of current subtree.
> C-u C-c C-r and C-u C-u C-c C-r shows a lot of redundant.
> 
> -- 
> sergio.
> 

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: reveal only current subtree
  2011-12-17 15:52   ` sergio
@ 2011-12-17 16:09     ` Takaaki ISHIKAWA
  0 siblings, 0 replies; 18+ messages in thread
From: Takaaki ISHIKAWA @ 2011-12-17 16:09 UTC (permalink / raw)
  To: sergio; +Cc: emacs-orgmode

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

Dear sergio,

>> Could you give me the detail, I can probably help you.
> What details you need?


No problem! I just wanted to know the jump method.

And… Carsten give us a great solution.

Best regards,
Takaaki

[-- Attachment #2: Message signed with OpenPGP using GPGMail --]
[-- Type: application/pgp-signature, Size: 455 bytes --]

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: reveal only current subtree
  2011-12-17 16:04 ` Carsten Dominik
@ 2011-12-17 17:57   ` sergio
  2011-12-17 17:59     ` Carsten Dominik
  0 siblings, 1 reply; 18+ messages in thread
From: sergio @ 2011-12-17 17:57 UTC (permalink / raw)
  To: emacs-orgmode

On 12/17/2011 08:04 PM, Carsten Dominik wrote:

> You can do
> 
>    C-u 1 TAB
> 
> to cycle on the level 1 hearing without moving point.

No. I just want to expand 1 level up, not the first lever, i.e. if after
jump I see:

* a...
* b...
** d...
*** e...
**** g...
***** h    <- cursor is here
 - some
 - list
* c...

I want to show all children of "g" headline, "h" siblings.

>   M-x customize-group RET org-reveal-location
I like default goto view, only org-show-entry-below may be interesting
for me.

-- 
sergio.

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: reveal only current subtree
  2011-12-17 17:57   ` sergio
@ 2011-12-17 17:59     ` Carsten Dominik
  2011-12-17 18:33       ` sergio
  0 siblings, 1 reply; 18+ messages in thread
From: Carsten Dominik @ 2011-12-17 17:59 UTC (permalink / raw)
  To: sergio; +Cc: emacs-orgmode


On 17.12.2011, at 18:57, sergio wrote:

> On 12/17/2011 08:04 PM, Carsten Dominik wrote:
> 
>> You can do
>> 
>>   C-u 1 TAB
>> 
>> to cycle on the level 1 hearing without moving point.
> 
> No. I just want to expand 1 level up, not the first lever, i.e. if after
> jump I see:

Then you can use C-u -1 TAB

- Carsten

> 
> * a...
> * b...
> ** d...
> *** e...
> **** g...
> ***** h    <- cursor is here
> - some
> - list
> * c...
> 
> I want to show all children of "g" headline, "h" siblings.
> 
>>  M-x customize-group RET org-reveal-location
> I like default goto view, only org-show-entry-below may be interesting
> for me.
> 
> -- 
> sergio.
> 

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: reveal only current subtree
  2011-12-17 17:59     ` Carsten Dominik
@ 2011-12-17 18:33       ` sergio
  2011-12-18  0:13         ` Takaaki ISHIKAWA
  0 siblings, 1 reply; 18+ messages in thread
From: sergio @ 2011-12-17 18:33 UTC (permalink / raw)
  To: emacs-orgmode

On 12/17/2011 09:59 PM, Carsten Dominik wrote:

>> No. I just want to expand 1 level up, not the first lever, i.e. if after
>> jump I see:

> Then you can use C-u -1 TAB

Much better, but I don't want to expand siblings. I mean to change this
view:

>> * a...
>> * b...
>> ** d...
>> *** e...
>> **** g...
>> ***** h    <- cursor is here
>> - some
>> - list
>> * c...

>> I want to show all children of "g" headline, "h" siblings.

to this:

* a...
* b...
** d...
*** e...
**** g...
***** hhh...
***** hh...
***** h    <- cursor is here
- some
- list
***** hhhh...
***** hhhhh...
* c...


-- 
sergio.

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: reveal only current subtree
  2011-12-17 18:33       ` sergio
@ 2011-12-18  0:13         ` Takaaki ISHIKAWA
  2011-12-18  0:54           ` sergio
  0 siblings, 1 reply; 18+ messages in thread
From: Takaaki ISHIKAWA @ 2011-12-18  0:13 UTC (permalink / raw)
  To: sergio; +Cc: emacs-orgmode

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

Dear sergio,

Hi.
How about the following combination?

>> 
>> * a...
>> * b...
>> ** d...
>> *** e...
>> **** g...
>> ***** h    <- cursor is here
>> - some
>> - list
>> * c...


C-c C-j d/e/g/h
(org-show-siblings)
(org-show-entry)


Best regards,
Takaaki Ishikawa

[-- Attachment #2: Message signed with OpenPGP using GPGMail --]
[-- Type: application/pgp-signature, Size: 455 bytes --]

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: reveal only current subtree
  2011-12-18  0:13         ` Takaaki ISHIKAWA
@ 2011-12-18  0:54           ` sergio
  2011-12-18  1:12             ` Takaaki ISHIKAWA
  0 siblings, 1 reply; 18+ messages in thread
From: sergio @ 2011-12-18  0:54 UTC (permalink / raw)
  To: emacs-orgmode

On 12/18/2011 04:13 AM, Takaaki ISHIKAWA wrote:

> C-c C-j d/e/g/h
> (org-show-siblings)
> (org-show-entry)

May be you mean
(setq org-show-siblings t)
?
Also there is no org-show-entry variable, may be you mean
(setq org-show-entry-below t)
?

As I say org-show-entry-below is good so I switched it on for org-goto:
(setq org-show-entry-below '((org-goto . t)))
but it has nothing with main problem.

org-show-siblings is also not that I want. It show all siblings of all
expanded levels. And want to change this view:

* a...
* b...
** d...
*** e...
**** g...
***** h    <- cursor is here
- some
- list
* c...

to this:

* a...
* b...
** d...
*** e...
**** g...
***** hhh...
***** hh...
***** h    <- cursor is here
- some
- list
***** hhhh...
***** hhhhh...
* c...

and not to this:

* a...
* b...
** dd...
** d
*** ee...
*** e
**** ggg...
**** g
***** hhh...
***** hh...
***** h    <- cursor is here
- some
- list
***** hhhh...
***** hhhhh...
**** ggg...
**** ggg...
** ddd...
* c...


-- 
sergio.

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: reveal only current subtree
  2011-12-18  0:54           ` sergio
@ 2011-12-18  1:12             ` Takaaki ISHIKAWA
  2011-12-18  1:28               ` sergio
  2011-12-18  2:43               ` sergio
  0 siblings, 2 replies; 18+ messages in thread
From: Takaaki ISHIKAWA @ 2011-12-18  1:12 UTC (permalink / raw)
  To: sergio; +Cc: emacs-orgmode

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

Dear sergio,

Please use eval-expression function [*1] for testing.
Type "M-: (org-show-siblings)" and "M-: (org-show-entry)".

> org-show-siblings is also not that I want. It show all siblings of all
> expanded levels. And want to change this view:

The combination is maybe your answer. Please find a short clip.
http://dl.dropbox.com/u/2440/worg/Voila_Capture14.mov
I tested with an example org buffer[*2], Emacs24, and Org7.8.02.

Best regards,
Takaaki Ishikawa

[*1] http://www.gnu.org/s/libtool/manual/emacs/Lisp-Eval.html

[*2] an example org buffer
* a
** aa
* b
** d
*** ee
*** e
**** f
**** g
qwe
qwe
***** hhh
***** hh
***** h
- a
- b
***** hhhh
***** hhhhh
**** gg
**** gg
** ddd
* c


[-- Attachment #2: Message signed with OpenPGP using GPGMail --]
[-- Type: application/pgp-signature, Size: 455 bytes --]

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: reveal only current subtree
  2011-12-18  1:12             ` Takaaki ISHIKAWA
@ 2011-12-18  1:28               ` sergio
  2011-12-18  1:41                 ` Takaaki ISHIKAWA
  2011-12-18  2:43               ` sergio
  1 sibling, 1 reply; 18+ messages in thread
From: sergio @ 2011-12-18  1:28 UTC (permalink / raw)
  To: emacs-orgmode

On 12/18/2011 05:12 AM, Takaaki ISHIKAWA wrote:


> Please use eval-expression function [*1] for testing.
> Type "M-: (org-show-siblings)" and "M-: (org-show-entry)".

Oh, sorry. Thank you, Takaaki, (org-show-siblings) is exactly what
I want! But could you say, how you've discovered it?

-- 
sergio.

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: reveal only current subtree
  2011-12-18  1:28               ` sergio
@ 2011-12-18  1:41                 ` Takaaki ISHIKAWA
  0 siblings, 0 replies; 18+ messages in thread
From: Takaaki ISHIKAWA @ 2011-12-18  1:41 UTC (permalink / raw)
  To: sergio; +Cc: emacs-orgmode

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

Dear sergio,

I'm glad I could help.

> Oh, sorry. Thank you, Takaaki, (org-show-siblings) is exactly what
> I want! But could you say, how you've discovered it?


I have recently reading org.el to write my elisp, org-tree-slide[*1].
Your problem is very hot topic to me :-)

[*1] http://orgmode.org/worg/org-tutorials/non-beamer-presentations.html

Best regards,
Takaaki Ishikawa

[-- Attachment #2: Message signed with OpenPGP using GPGMail --]
[-- Type: application/pgp-signature, Size: 455 bytes --]

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: reveal only current subtree
  2011-12-18  1:12             ` Takaaki ISHIKAWA
  2011-12-18  1:28               ` sergio
@ 2011-12-18  2:43               ` sergio
  2011-12-18  5:44                 ` Takaaki ISHIKAWA
  1 sibling, 1 reply; 18+ messages in thread
From: sergio @ 2011-12-18  2:43 UTC (permalink / raw)
  To: emacs-orgmode

On 12/18/2011 05:12 AM, Takaaki ISHIKAWA wrote:

> Type "M-: (org-show-siblings)" and "M-: (org-show-entry)".

Am I right, that for rebind strange (org-reveal) to (org-show-siblings)
I should do:

(add-hook 'org-mode-hook (lambda ()
	(local-set-key "\C-c\C-r" (lambda ()
				    (interactive)
				    (org-show-siblings)))))

It works, but may be there are errors which I don't see.

-- 
sergio.

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: reveal only current subtree
  2011-12-18  2:43               ` sergio
@ 2011-12-18  5:44                 ` Takaaki ISHIKAWA
  2011-12-18  9:32                   ` sergio
  0 siblings, 1 reply; 18+ messages in thread
From: Takaaki ISHIKAWA @ 2011-12-18  5:44 UTC (permalink / raw)
  To: sergio; +Cc: emacs-orgmode

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

Dear sergio,

I think you are right, and have confirmed your setting.

The following has the same effect, just for your information.

(define-key org-mode-map (kbd "C-c C-r")
  '(lambda () (interactive) (org-show-siblings)))


Best regards,
Takaaki Ishikawa

> (add-hook 'org-mode-hook (lambda ()
> 	(local-set-key "\C-c\C-r" (lambda ()
> 				    (interactive)
> 				    (org-show-siblings)))))


[-- Attachment #2: Message signed with OpenPGP using GPGMail --]
[-- Type: application/pgp-signature, Size: 455 bytes --]

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: reveal only current subtree
  2011-12-18  5:44                 ` Takaaki ISHIKAWA
@ 2011-12-18  9:32                   ` sergio
  2011-12-18  9:47                     ` Takaaki ISHIKAWA
  0 siblings, 1 reply; 18+ messages in thread
From: sergio @ 2011-12-18  9:32 UTC (permalink / raw)
  To: emacs-orgmode

On 12/18/2011 09:44 AM, Takaaki ISHIKAWA wrote:

> (define-key org-mode-map (kbd "C-c C-r")
>   '(lambda () (interactive) (org-show-siblings)))

It doesn't work for me: Symbol's value as variable is void: org-mode-map

But I've remade previous mappig:

(add-hook 'org-mode-hook (lambda ()
        (local-set-key "\C-c\C-r" 'my-reveal)))
(defun my-reveal (&optional all-siblings)
  (interactive "P")
  (if all-siblings
    (org-reveal t)
    (org-show-siblings)))

For C-u C-c C-r it does the same as default org-mode --- shows all
hidden siblings, and for C-c C-r --- all siblings of current level.

I hope this will be interested not only for me.

-- 
sergio.

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: reveal only current subtree
  2011-12-18  9:32                   ` sergio
@ 2011-12-18  9:47                     ` Takaaki ISHIKAWA
  2011-12-18 10:25                       ` sergio
  0 siblings, 1 reply; 18+ messages in thread
From: Takaaki ISHIKAWA @ 2011-12-18  9:47 UTC (permalink / raw)
  To: sergio; +Cc: emacs-orgmode

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

Dear sergio,

> It doesn't work for me: Symbol's value as variable is void: org-mode-map


Probably you set the define-key before "(require 'org-install)".
Anyway, I have verified your new setting, it works well :)

Best regards,
Takaaki Ishikawa

[-- Attachment #2: Message signed with OpenPGP using GPGMail --]
[-- Type: application/pgp-signature, Size: 455 bytes --]

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: reveal only current subtree
  2011-12-18  9:47                     ` Takaaki ISHIKAWA
@ 2011-12-18 10:25                       ` sergio
  0 siblings, 0 replies; 18+ messages in thread
From: sergio @ 2011-12-18 10:25 UTC (permalink / raw)
  To: emacs-orgmode

On 12/18/2011 01:47 PM, Takaaki ISHIKAWA wrote:
> Probably you set the define-key before "(require 'org-install)".
Really I don't have "(require 'org-install)" in my emacs config at all ---
it is in /etc/emacs/site-start.d/50org-mode.el.

But putting (require 'org-install) in ~/.emacs.d/init.el just before
"(define-key org-mode-map ..." doesn't help.

> Anyway, I have verified your new setting, it works well :)
Thank you.


-- 
sergio.

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2011-12-18 10:26 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-17 14:20 reveal only current subtree sergio
2011-12-17 15:24 ` Takaaki ISHIKAWA
2011-12-17 15:52   ` sergio
2011-12-17 16:09     ` Takaaki ISHIKAWA
2011-12-17 16:04 ` Carsten Dominik
2011-12-17 17:57   ` sergio
2011-12-17 17:59     ` Carsten Dominik
2011-12-17 18:33       ` sergio
2011-12-18  0:13         ` Takaaki ISHIKAWA
2011-12-18  0:54           ` sergio
2011-12-18  1:12             ` Takaaki ISHIKAWA
2011-12-18  1:28               ` sergio
2011-12-18  1:41                 ` Takaaki ISHIKAWA
2011-12-18  2:43               ` sergio
2011-12-18  5:44                 ` Takaaki ISHIKAWA
2011-12-18  9:32                   ` sergio
2011-12-18  9:47                     ` Takaaki ISHIKAWA
2011-12-18 10:25                       ` sergio

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).