* Bug: return key does not show the subtree the first time on a newly opened org file
@ 2008-02-27 16:59 Wanrong Lin
2008-02-27 17:14 ` Wanrong Lin
2008-02-28 1:38 ` Bastien
0 siblings, 2 replies; 10+ messages in thread
From: Wanrong Lin @ 2008-02-27 16:59 UTC (permalink / raw)
To: emacs-orgmode
Hi,
I have the following in my org-mode configuration:
(setq org-return-follows-link t)
Also, by default my org files are in overview mode (folded) when opened.
Usually, if my cursor is at the beginning of a heading, I can use the
return key to cycle the visibility of its subtree. However, this does
not work when I open an org file and do it the first time (the return
key will just insert a blank line before the heading). But after the
first time, it works fine again.
Thanks a lot for looking into this.
Wanrong
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Bug: return key does not show the subtree the first time on a newly opened org file
2008-02-27 16:59 Bug: return key does not show the subtree the first time on a newly opened org file Wanrong Lin
@ 2008-02-27 17:14 ` Wanrong Lin
2008-02-28 1:38 ` Bastien
1 sibling, 0 replies; 10+ messages in thread
From: Wanrong Lin @ 2008-02-27 17:14 UTC (permalink / raw)
To: emacs-orgmode
Forgot to mention this:
To reproduce the bug, after opening an org file, don't do anything
(don't even move the cursor), just press the return key. I use
"session.el", so when I open an org file, the cursor will go to the the
position of my last change in the buffer, and I can arrange the point to
be on a heading. If you don't use "session.el", here is another way to
reproduce the bug:
Open a test org file "test.org" and put the following into it,
* TODO A
Test :mytag:
SCHEDULED: <2008-02-27 Wed>
*Close* the file, do a tag search on "mytag", in the search result
press "TAB" key to jump to the "TODO A Test" heading, which should be
folded. Press return key and you will see the failure. Do it again and
it works.
Wanrong
Wanrong Lin wrote:
> Hi,
>
> I have the following in my org-mode configuration:
>
> (setq org-return-follows-link t)
>
> Also, by default my org files are in overview mode (folded) when opened.
>
> Usually, if my cursor is at the beginning of a heading, I can use the
> return key to cycle the visibility of its subtree. However, this does
> not work when I open an org file and do it the first time (the return
> key will just insert a blank line before the heading). But after the
> first time, it works fine again.
>
> Thanks a lot for looking into this.
>
> Wanrong
>
>
>
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Bug: return key does not show the subtree the first time on a newly opened org file
2008-02-27 16:59 Bug: return key does not show the subtree the first time on a newly opened org file Wanrong Lin
2008-02-27 17:14 ` Wanrong Lin
@ 2008-02-28 1:38 ` Bastien
2008-02-28 2:16 ` Wanrong Lin
1 sibling, 1 reply; 10+ messages in thread
From: Bastien @ 2008-02-28 1:38 UTC (permalink / raw)
To: Wanrong Lin; +Cc: emacs-orgmode
Wanrong Lin <wanrong.lin@gmail.com> writes:
> I have the following in my org-mode configuration:
>
> (setq org-return-follows-link t)
This is about following links, no (un)folding subtrees...
> Usually, if my cursor is at the beginning of a heading, I can use the
> return key to cycle the visibility of its subtree.
AFAIK, <RET> doesn't (un)fold a subtree. Maybe you mean the <TAB> key?
I guess I'm missing something...
--
Bastien
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Bug: return key does not show the subtree the first time on a newly opened org file
2008-02-28 1:38 ` Bastien
@ 2008-02-28 2:16 ` Wanrong Lin
2008-02-28 6:42 ` Carsten Dominik
0 siblings, 1 reply; 10+ messages in thread
From: Wanrong Lin @ 2008-02-28 2:16 UTC (permalink / raw)
To: emacs-orgmode
Bastien wrote:
> Wanrong Lin <wanrong.lin@gmail.com> writes:
>
>
>> I have the following in my org-mode configuration:
>>
>> (setq org-return-follows-link t)
>>
>
> This is about following links, no (un)folding subtrees...
>
>
Yes, but only with this setting will <return> key be added to the
"org-mouse-map" key map, and be bound to "org-open-at-point" command
under certain contexts (like on the leading stars of a heading).
Further, "org-open-at-point" is advised by org-mouse.el, which will do
"org-cycle" under certain contexts.
>> Usually, if my cursor is at the beginning of a heading, I can use the
>> return key to cycle the visibility of its subtree.
>>
>
> AFAIK, <RET> doesn't (un)fold a subtree. Maybe you mean the <TAB> key?
> I guess I'm missing something...
>
>
I did meant return key. See my comments above.
Thanks for your comments.
Wanrong
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Bug: return key does not show the subtree the first time on a newly opened org file
2008-02-28 2:16 ` Wanrong Lin
@ 2008-02-28 6:42 ` Carsten Dominik
2008-02-28 9:38 ` Bastien Guerry
2008-02-28 20:09 ` Wanrong Lin
0 siblings, 2 replies; 10+ messages in thread
From: Carsten Dominik @ 2008-02-28 6:42 UTC (permalink / raw)
To: Wanrong Lin; +Cc: emacs-orgmode
On Feb 28, 2008, at 3:16 AM, Wanrong Lin wrote:
> Bastien wrote:
>> Wanrong Lin <wanrong.lin@gmail.com> writes:
>>
>>
>>> I have the following in my org-mode configuration:
>>>
>>> (setq org-return-follows-link t)
>>>
>>
>> This is about following links, no (un)folding subtrees...
>>
>>
> Yes, but only with this setting will <return> key be added to the
> "org-mouse-map" key map, and be bound to "org-open-at-point" command
> under certain contexts (like on the leading stars of a heading).
> Further, "org-open-at-point" is advised by org-mouse.el, which will
> do "org-cycle" under certain contexts.
Yes, this is really an accidental feature by a sequence of events:
org-return-follow-link will add org-return to the mouse-map
org-mouse.el will activate the stars in a headline
I can reproduce the bug, but I have no idea what is causing this, it
must be
something in the internal setup of Emacs keymaps in a new buffer,
I have no idea how to fix this or work around it.
Why in the world would you use RET for cycling instead of TAB?
- Carsten
>
>>> Usually, if my cursor is at the beginning of a heading, I can use
>>> the
>>> return key to cycle the visibility of its subtree.
>>
>> AFAIK, <RET> doesn't (un)fold a subtree. Maybe you mean the <TAB>
>> key?
>> I guess I'm missing something...
>>
>>
> I did meant return key. See my comments above.
>
> Thanks for your comments.
>
> Wanrong
>
>
> _______________________________________________
> 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] 10+ messages in thread
* Re: Bug: return key does not show the subtree the first time on a newly opened org file
2008-02-28 6:42 ` Carsten Dominik
@ 2008-02-28 9:38 ` Bastien Guerry
2008-02-28 15:31 ` Wanrong Lin
2008-02-28 20:09 ` Wanrong Lin
1 sibling, 1 reply; 10+ messages in thread
From: Bastien Guerry @ 2008-02-28 9:38 UTC (permalink / raw)
To: Carsten Dominik; +Cc: emacs-orgmode
Carsten Dominik <dominik@science.uva.nl> writes:
>> Yes, but only with this setting will <return> key be added to the
>> "org-mouse-map" key map, and be bound to "org-open-at-point" command
>> under certain contexts (like on the leading stars of a heading).
>> Further, "org-open-at-point" is advised by org-mouse.el, which will
>> do "org-cycle" under certain contexts.
>
> Yes, this is really an accidental feature by a sequence of events:
>
> org-return-follow-link will add org-return to the mouse-map
> org-mouse.el will activate the stars in a headline
Yes, there is an advice for this in org-mouse.el.
I think we should remove it since org-mouse.el shouldn't change the
behavior of keystrokes (only the behavior of the mouse.)
--
Bastien
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Bug: return key does not show the subtree the first time on a newly opened org file
2008-02-28 9:38 ` Bastien Guerry
@ 2008-02-28 15:31 ` Wanrong Lin
2008-02-29 1:21 ` Bastien Guerry
0 siblings, 1 reply; 10+ messages in thread
From: Wanrong Lin @ 2008-02-28 15:31 UTC (permalink / raw)
Cc: emacs-orgmode
Bastien Guerry wrote:
> Carsten Dominik <dominik@science.uva.nl> writes:
>
>
>>> Yes, but only with this setting will <return> key be added to the
>>> "org-mouse-map" key map, and be bound to "org-open-at-point" command
>>> under certain contexts (like on the leading stars of a heading).
>>> Further, "org-open-at-point" is advised by org-mouse.el, which will
>>> do "org-cycle" under certain contexts.
>>>
>> Yes, this is really an accidental feature by a sequence of events:
>>
>> org-return-follow-link will add org-return to the mouse-map
>> org-mouse.el will activate the stars in a headline
>>
>
> Yes, there is an advice for this in org-mouse.el.
>
> I think we should remove it since org-mouse.el shouldn't change the
> behavior of keystrokes (only the behavior of the mouse.)
>
>
That probably is true. But I have doubt that removing the advice itself
and bind the key in some other place will really solve the problem. To
me, it seems somehow the first time you open a org-file, some context is
not recognized correctly and hence the key map is not activated. If I
just execute a command, any command (like "C-g" which does nothing), and
then press the return key, it will work. Is that puzzling? :-)
Wanrong
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Bug: return key does not show the subtree the first time on a newly opened org file
2008-02-28 6:42 ` Carsten Dominik
2008-02-28 9:38 ` Bastien Guerry
@ 2008-02-28 20:09 ` Wanrong Lin
1 sibling, 0 replies; 10+ messages in thread
From: Wanrong Lin @ 2008-02-28 20:09 UTC (permalink / raw)
Cc: emacs-orgmode
> Yes, this is really an accidental feature by a sequence of events:
>
> org-return-follow-link will add org-return to the mouse-map
> org-mouse.el will activate the stars in a headline
>
> I can reproduce the bug, but I have no idea what is causing this, it
> must be
> something in the internal setup of Emacs keymaps in a new buffer,
> I have no idea how to fix this or work around it.
>
> Why in the world would you use RET for cycling instead of TAB?
>
> - Carsten
Because I discovered it and thought that was an official feature and got
used to it from day 1. :-) I will try to use Tab from now on.
Wanrong
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Bug: return key does not show the subtree the first time on a newly opened org file
2008-02-28 15:31 ` Wanrong Lin
@ 2008-02-29 1:21 ` Bastien Guerry
2008-02-29 2:25 ` Wanrong Lin
0 siblings, 1 reply; 10+ messages in thread
From: Bastien Guerry @ 2008-02-29 1:21 UTC (permalink / raw)
To: Wanrong Lin; +Cc: emacs-orgmode
Wanrong Lin <wanrong.lin@gmail.com> writes:
> Bastien Guerry wrote:
>>
>> Yes, there is an advice for this in org-mouse.el.
>>
>> I think we should remove it since org-mouse.el shouldn't change the
>> behavior of keystrokes (only the behavior of the mouse.)
>>
> That probably is true. But I have doubt that removing the advice itself
> and bind the key in some other place will really solve the problem. To
> me, it seems somehow the first time you open a org-file, some context is
> not recognized correctly and hence the key map is not activated. If I
> just execute a command, any command (like "C-g" which does nothing), and
> then press the return key, it will work. Is that puzzling? :-)
It *is* puzzling.
I have a fix for this. I'm testing it a few days more and will commit
it if it works okay.
--
Bastien
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Bug: return key does not show the subtree the first time on a newly opened org file
2008-02-29 1:21 ` Bastien Guerry
@ 2008-02-29 2:25 ` Wanrong Lin
0 siblings, 0 replies; 10+ messages in thread
From: Wanrong Lin @ 2008-02-29 2:25 UTC (permalink / raw)
To: emacs-orgmode
> It *is* puzzling.
>
> I have a fix for this. I'm testing it a few days more and will commit
> it if it works okay.
>
>
Look forward to it. Although I am trying to get into the habit of using
TAB, it won't hurt to have the old way working too. Thanks a lot.
Wanrong
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2008-02-29 2:25 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-27 16:59 Bug: return key does not show the subtree the first time on a newly opened org file Wanrong Lin
2008-02-27 17:14 ` Wanrong Lin
2008-02-28 1:38 ` Bastien
2008-02-28 2:16 ` Wanrong Lin
2008-02-28 6:42 ` Carsten Dominik
2008-02-28 9:38 ` Bastien Guerry
2008-02-28 15:31 ` Wanrong Lin
2008-02-29 1:21 ` Bastien Guerry
2008-02-29 2:25 ` Wanrong Lin
2008-02-28 20:09 ` Wanrong Lin
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.