emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Stuck in a folded section when subtree is folded
@ 2009-09-05 14:05 PT
  2009-09-06 11:41 ` Carsten Dominik
  2009-09-07 17:15 ` PT
  0 siblings, 2 replies; 7+ messages in thread
From: PT @ 2009-09-05 14:05 UTC (permalink / raw)
  To: emacs-orgmode

If a header has some text content under it and the cursor is in
the text then pressing TAB folds the content, but it doesn't
change the cursor position, so the cursor is stuck in the folded
part and, for example, beginning-of-line doesn't work, you can
only get out from the folded part if you press cursor up/down

Isn't it a bug?

If I stand on a header which has only subheaders under it and I
press TAB then the subtree is folded and the cursor is put back
to the beginning of the header line apparently to avoid leaving
the cursor in the folded part which is a nice gesture.

Shouldn't the same happen when textual content is folded?

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

* Re: Stuck in a folded section when subtree is folded
  2009-09-05 14:05 Stuck in a folded section when subtree is folded PT
@ 2009-09-06 11:41 ` Carsten Dominik
  2009-09-06 14:22   ` PT
  2009-09-07 17:15 ` PT
  1 sibling, 1 reply; 7+ messages in thread
From: Carsten Dominik @ 2009-09-06 11:41 UTC (permalink / raw)
  To: PT; +Cc: emacs-orgmode


On Sep 5, 2009, at 4:05 PM, PT wrote:

> If a header has some text content under it and the cursor is in
> the text then pressing TAB folds the content, but it doesn't
> change the cursor position, so the cursor is stuck in the folded
> part and, for example, beginning-of-line doesn't work, you can
> only get out from the folded part if you press cursor up/down

Have you customized the variable org-cycle-emulate-tab?

- Carsten

>
> Isn't it a bug?

> If I stand on a header which has only subheaders under it and I
> press TAB then the subtree is folded and the cursor is put back
> to the beginning of the header line apparently to avoid leaving
> the cursor in the folded part which is a nice gesture.
>
> Shouldn't the same happen when textual content is folded?
>
>
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

* Re: Stuck in a folded section when subtree is folded
  2009-09-06 11:41 ` Carsten Dominik
@ 2009-09-06 14:22   ` PT
  2009-09-06 16:20     ` Carsten Dominik
  0 siblings, 1 reply; 7+ messages in thread
From: PT @ 2009-09-06 14:22 UTC (permalink / raw)
  To: emacs-orgmode

Carsten Dominik <carsten.dominik <at> gmail.com> writes:
> 
> Have you customized the variable org-cycle-emulate-tab?
> 

No, it's nil. 

It's org 6.30, btw.

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

* Re: Re: Stuck in a folded section when subtree is folded
  2009-09-06 14:22   ` PT
@ 2009-09-06 16:20     ` Carsten Dominik
  2009-09-06 16:34       ` PT
  0 siblings, 1 reply; 7+ messages in thread
From: Carsten Dominik @ 2009-09-06 16:20 UTC (permalink / raw)
  To: PT; +Cc: emacs-orgmode


On Sep 6, 2009, at 4:22 PM, PT wrote:

> Carsten Dominik <carsten.dominik <at> gmail.com> writes:
>>
>> Have you customized the variable org-cycle-emulate-tab?
>>
>
> No, it's nil.

Wrong answer:  The correct answer would have been:

Yes, it is nil!

Because the default value is t!.  The default value means
that TAB will not at all fold an entry when the
cursor is not in the headline.  Maybe this is really the
setting you want?

- Carsten

>
> It's org 6.30, btw.
>
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

* Re: Stuck in a folded section when subtree is folded
  2009-09-06 16:20     ` Carsten Dominik
@ 2009-09-06 16:34       ` PT
  2009-09-11  4:00         ` Carsten Dominik
  0 siblings, 1 reply; 7+ messages in thread
From: PT @ 2009-09-06 16:34 UTC (permalink / raw)
  To: emacs-orgmode

Carsten Dominik <carsten.dominik <at> gmail.com> writes:

> 
> Wrong answer:  The correct answer would have been:
> 
> Yes, it is nil!
> 
> Because the default value is t!.  The default value means
> that TAB will not at all fold an entry when the
> cursor is not in the headline.  Maybe this is really the
> setting you want?

You are correct, I set it to nil, but this was not the issue. I
thought you ask it because of some strange interaction.

I'm happy with the current setting. I want TAB to fold
everywhere. The problem is if I'm standing in a place like this


* header

some text <cursor is here> some other text


and press TAB then the subtree is folded properly, but the cursor
is stuck in the folded section:


* header <cursor appears here, it is in the folded section>...



and I think it should be put to the beginning of line to avoid leaving 
it in the folded section after a fold:


<cursor>* header...


Maybe I was not clear enough in the first post.
 

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

* Re: Stuck in a folded section when subtree is folded
  2009-09-05 14:05 Stuck in a folded section when subtree is folded PT
  2009-09-06 11:41 ` Carsten Dominik
@ 2009-09-07 17:15 ` PT
  1 sibling, 0 replies; 7+ messages in thread
From: PT @ 2009-09-07 17:15 UTC (permalink / raw)
  To: emacs-orgmode

PT <spamfilteraccount <at> gmail.com> writes:

> 
> If a header has some text content under it and the cursor is in
> the text then pressing TAB folds the content, but it doesn't
> change the cursor position, so the cursor is stuck in the folded
> part and, for example, beginning-of-line doesn't work, you can
> only get out from the folded part if you press cursor up/down
> 


For the time being I fixed it for myself with an advice. Here it is
if someone's interested:

(defadvice org-cycle (after my-org-cycle activate)
  (if (outline-invisible-p)
      (outline-previous-visible-heading 1)))

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

* Re: Re: Stuck in a folded section when subtree is folded
  2009-09-06 16:34       ` PT
@ 2009-09-11  4:00         ` Carsten Dominik
  0 siblings, 0 replies; 7+ messages in thread
From: Carsten Dominik @ 2009-09-11  4:00 UTC (permalink / raw)
  To: PT; +Cc: emacs-orgmode


On Sep 6, 2009, at 6:34 PM, PT wrote:

> Carsten Dominik <carsten.dominik <at> gmail.com> writes:
>
>>
>> Wrong answer:  The correct answer would have been:
>>
>> Yes, it is nil!
>>
>> Because the default value is t!.  The default value means
>> that TAB will not at all fold an entry when the
>> cursor is not in the headline.  Maybe this is really the
>> setting you want?
>
> You are correct, I set it to nil, but this was not the issue. I
> thought you ask it because of some strange interaction.
>
> I'm happy with the current setting. I want TAB to fold
> everywhere. The problem is if I'm standing in a place like this

I did understand the problem.

The reason why I am not moving the cursor after folding
is so that you can go back with another TAB, with the cursor
still at the same position.

In my setup, `C-a' works to bring the cursor to the beginning
of the headline.  What are you using to try to get to the
beginning of the lines?

- Carsten

>
>
> * header
>
> some text <cursor is here> some other text
>
>
> and press TAB then the subtree is folded properly, but the cursor
> is stuck in the folded section:
>
>
> * header <cursor appears here, it is in the folded section>...
>
>
>
> and I think it should be put to the beginning of line to avoid leaving
> it in the folded section after a fold:
>
>
> <cursor>* header...
>
>
> Maybe I was not clear enough in the first post.
>
>
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

end of thread, other threads:[~2009-09-11  4:00 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-05 14:05 Stuck in a folded section when subtree is folded PT
2009-09-06 11:41 ` Carsten Dominik
2009-09-06 14:22   ` PT
2009-09-06 16:20     ` Carsten Dominik
2009-09-06 16:34       ` PT
2009-09-11  4:00         ` Carsten Dominik
2009-09-07 17:15 ` PT

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).