* Bug with org-startup-folded?
@ 2007-11-28 15:56 Wanrong Lin
2007-11-29 15:30 ` Wanrong Lin
0 siblings, 1 reply; 8+ messages in thread
From: Wanrong Lin @ 2007-11-28 15:56 UTC (permalink / raw)
To: emacs-orgmode
Hi,
I like to have newly opened org-mode files in overview (folded) mode.
With org-startup-folded set to t, this seems to only work partially.
That is, when I firstly open an file, say xyz.org file, the file is
unfolded. But if I kill the buffer, and open the same file again, it
will be folded. At first I thought this is because the interference from
the "session" package. But I removed that package and nothing changed. I
am using the latest (5.15) org-mode.
Thanks if someone can look into this.
Wanrong
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Bug with org-startup-folded?
2007-11-28 15:56 Bug with org-startup-folded? Wanrong Lin
@ 2007-11-29 15:30 ` Wanrong Lin
2007-11-29 22:43 ` Wanrong Lin
0 siblings, 1 reply; 8+ messages in thread
From: Wanrong Lin @ 2007-11-29 15:30 UTC (permalink / raw)
To: emacs-orgmode
Just an update on the problem:
I found that if I add the per-file option like this, the "overview" mode
is always on when I visit an org file, whether it is the first time or not.
#+STARTUP: fold
But the global option does not work fully as I described before.
Wanrong
Wanrong Lin wrote:
> Hi,
>
> I like to have newly opened org-mode files in overview (folded) mode.
> With org-startup-folded set to t, this seems to only work partially.
> That is, when I firstly open an file, say xyz.org file, the file is
> unfolded. But if I kill the buffer, and open the same file again, it
> will be folded. At first I thought this is because the interference
> from the "session" package. But I removed that package and nothing
> changed. I am using the latest (5.15) org-mode.
>
> Thanks if someone can look into this.
>
> Wanrong
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Bug with org-startup-folded?
2007-11-29 15:30 ` Wanrong Lin
@ 2007-11-29 22:43 ` Wanrong Lin
2007-11-30 12:25 ` Bastien
0 siblings, 1 reply; 8+ messages in thread
From: Wanrong Lin @ 2007-11-29 22:43 UTC (permalink / raw)
To: emacs-orgmode
Update on my own investigation/confusion on this problem:
I have two lines like this in my org mode configuration
(setq org-agenda-file-regexp "\\.org\\'")
(add-to-list 'auto-mode-alist `(,org-agenda-file-regexp . org-mode))
By inserting some "message" statements (that is how far I can go on
debugging elisp code) in org-mode function, I found that when I visit a
".org" file for the fist time, "org-mode" function is not called at all!
But the file does open as an normal org-mode file (with "Org" appearing
in the mode-line), except the text is not folded. If I kill the buffer
and open the fine again, "org-mode" function is invoked and hence text
is folded.
I can certainly work around this problem by forcing org-mode to be
called every time I open an org file. But can somebody help me out here?
Why org-mode is not called at all when the file is opened for the first
time? Who is keeping track whether the file is opened the first time or
not? Thanks a lot.
Wanrong
Wanrong Lin wrote:
> Just an update on the problem:
>
> I found that if I add the per-file option like this, the "overview"
> mode is always on when I visit an org file, whether it is the first
> time or not.
> #+STARTUP: fold
>
> But the global option does not work fully as I described before.
>
> Wanrong
>
> Wanrong Lin wrote:
>> Hi,
>>
>> I like to have newly opened org-mode files in overview (folded) mode.
>> With org-startup-folded set to t, this seems to only work partially.
>> That is, when I firstly open an file, say xyz.org file, the file is
>> unfolded. But if I kill the buffer, and open the same file again, it
>> will be folded. At first I thought this is because the interference
>> from the "session" package. But I removed that package and nothing
>> changed. I am using the latest (5.15) org-mode.
>>
>> Thanks if someone can look into this.
>>
>> Wanrong
>>
>
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Re: Bug with org-startup-folded?
2007-11-29 22:43 ` Wanrong Lin
@ 2007-11-30 12:25 ` Bastien
2007-11-30 21:01 ` Wanrong Lin
0 siblings, 1 reply; 8+ messages in thread
From: Bastien @ 2007-11-30 12:25 UTC (permalink / raw)
To: emacs-orgmode
Wanrong Lin <wanrong.lin@gmail.com> writes:
> (setq org-agenda-file-regexp "\\.org\\'")
> (add-to-list 'auto-mode-alist `(,org-agenda-file-regexp . org-mode))
This is weird. Why don't you simply use this:
(add-to-list 'auto-mode-alist ("\\.org\\'" . org-mode))
> By inserting some "message" statements (that is how far I can go on
> debugging elisp code) in org-mode function, I found that when I visit a
> ".org" file for the fist time, "org-mode" function is not called at all!
> But the file does open as an normal org-mode file (with "Org" appearing
> in the mode-line), except the text is not folded.
This looks also weird. I think your configuration is somehow broken.
Does this happen with every .org file? You should check the consistence
of the global variables `org-startup-options' `org-startup-folded' *and*
of local options in your Org file.
--
Bastien
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Re: Bug with org-startup-folded?
2007-11-30 12:25 ` Bastien
@ 2007-11-30 21:01 ` Wanrong Lin
[not found] ` <acf852aa0712010346u7fb263aes3a84cfabc4a784c5@mail.gmail.com>
0 siblings, 1 reply; 8+ messages in thread
From: Wanrong Lin @ 2007-11-30 21:01 UTC (permalink / raw)
To: emacs-orgmode
Bastien wrote:
> Wanrong Lin <wanrong.lin@gmail.com> writes:
>
>
>> (setq org-agenda-file-regexp "\\.org\\'")
>> (add-to-list 'auto-mode-alist `(,org-agenda-file-regexp . org-mode))
>>
>
> This is weird. Why don't you simply use this:
>
> (add-to-list 'auto-mode-alist ("\\.org\\'" . org-mode))
>
>
I did my way because I want to set org-agenda-file-regexp and
consistently use it any place the regexp is needed.
>> By inserting some "message" statements (that is how far I can go on
>> debugging elisp code) in org-mode function, I found that when I visit a
>> ".org" file for the fist time, "org-mode" function is not called at all!
>> But the file does open as an normal org-mode file (with "Org" appearing
>> in the mode-line), except the text is not folded.
>>
>
> This looks also weird. I think your configuration is somehow broken.
> Does this happen with every .org file? You should check the consistence
> of the global variables `org-startup-options' `org-startup-folded' *and*
> of local options in your Org file.
>
Yes, this happens with every .org file. My org files have no local
options at all, and all those variables you mentioned seem OK to me. The
most puzzling thing, as I said before, is if you open a file the second
time, the folding works, but not on the same file when opened the first
time. Why would first time/second time make a difference on how org-mode
behaves? Who is tracking whether the file is opened the first time or
not? Scratching my head hard...
Wanrong
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Re: Bug with org-startup-folded?
[not found] ` <acf852aa0712010346u7fb263aes3a84cfabc4a784c5@mail.gmail.com>
@ 2007-12-01 19:31 ` Wanrong Lin
2007-12-01 22:46 ` Wanrong Lin
1 sibling, 0 replies; 8+ messages in thread
From: Wanrong Lin @ 2007-12-01 19:31 UTC (permalink / raw)
To: Carsten Dominik; +Cc: emacs-orgmode
Hi, Carsten,
After some more trials, I think I found the cause of the problem. I have
a line like this in my org configuration:
;; add today's appointment into alert list, every day at 0:30AM
(run-at-time "0:30am" (* 24 3600) 'org-agenda-to-appt)
I expect with the above, org-agenda-to-appt will run once a day
automatically at 0:30AM. But, it seems that org-agenda-to-appt runs
right after emacs start up, and this command opens a buffer for every
org files in my org-agenda-files, without any folding. So, when I
thought I was opening an org file for the first time, actually emacs
just switches to the existing buffer for that file, and gives an
illusion that the first time the folding does not work, but the second
time the folding works.
Thank you for you and Bastien for your help on this.
Wanrong
Carsten Dominik wrote:
> Hi Wanrong,
>
> unfortunately I am not able to reproduce what you describe,
> so my suspicion is that it is still something in you setup.
> I recommend that you try things with an absolutely minimum
> setup, and with emacs -Q....
>
> -- Carsten
>
> On 11/30/07, Wanrong Lin <wrglin@gmail.com> wrote:
>
>> Bastien wrote:
>>
>>> Wanrong Lin <wanrong.lin@gmail.com> writes:
>>>
>>>
>>>
>>>> (setq org-agenda-file-regexp "\\.org\\'")
>>>> (add-to-list 'auto-mode-alist `(,org-agenda-file-regexp . org-mode))
>>>>
>>>>
>>> This is weird. Why don't you simply use this:
>>>
>>> (add-to-list 'auto-mode-alist ("\\.org\\'" . org-mode))
>>>
>>>
>>>
>> I did my way because I want to set org-agenda-file-regexp and
>> consistently use it any place the regexp is needed.
>>
>>>> By inserting some "message" statements (that is how far I can go on
>>>> debugging elisp code) in org-mode function, I found that when I visit a
>>>> ".org" file for the fist time, "org-mode" function is not called at all!
>>>> But the file does open as an normal org-mode file (with "Org" appearing
>>>> in the mode-line), except the text is not folded.
>>>>
>>>>
>>> This looks also weird. I think your configuration is somehow broken.
>>> Does this happen with every .org file? You should check the consistence
>>> of the global variables `org-startup-options' `org-startup-folded' *and*
>>> of local options in your Org file.
>>>
>>>
>> Yes, this happens with every .org file. My org files have no local
>> options at all, and all those variables you mentioned seem OK to me. The
>> most puzzling thing, as I said before, is if you open a file the second
>> time, the folding works, but not on the same file when opened the first
>> time. Why would first time/second time make a difference on how org-mode
>> behaves? Who is tracking whether the file is opened the first time or
>> not? Scratching my head hard...
>>
>> 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] 8+ messages in thread
* Re: Re: Bug with org-startup-folded?
[not found] ` <acf852aa0712010346u7fb263aes3a84cfabc4a784c5@mail.gmail.com>
2007-12-01 19:31 ` Wanrong Lin
@ 2007-12-01 22:46 ` Wanrong Lin
2007-12-02 0:23 ` Carsten Dominik
1 sibling, 1 reply; 8+ messages in thread
From: Wanrong Lin @ 2007-12-01 22:46 UTC (permalink / raw)
To: Carsten Dominik; +Cc: emacs-orgmode
Hi, Carsten,
Following my last email, I wonder whether you can consider doing one of
these two things in org-mode:
1. org-agenda-to-appt does not explicitly open a buffer for every
org-file in the org-agenda-files, or
2. org-agenda-to-appt will honor the global org-startup-folded option.
It seems the buffers opened by org-agenda-to-appt does honor the folding
settings in the "#STARTUP" per file option. So I think it is natural and
consistent for org-agenda-to-appt to honor the global options too when
opening org-mode files.
Thank you for giving it a thought.
Wanrong
Carsten Dominik wrote:
> Hi Wanrong,
>
> unfortunately I am not able to reproduce what you describe,
> so my suspicion is that it is still something in you setup.
> I recommend that you try things with an absolutely minimum
> setup, and with emacs -Q....
>
> -- Carsten
>
> On 11/30/07, Wanrong Lin <wrglin@gmail.com> wrote:
>
>> Bastien wrote:
>>
>>> Wanrong Lin <wanrong.lin@gmail.com> writes:
>>>
>>>
>>>
>>>> (setq org-agenda-file-regexp "\\.org\\'")
>>>> (add-to-list 'auto-mode-alist `(,org-agenda-file-regexp . org-mode))
>>>>
>>>>
>>> This is weird. Why don't you simply use this:
>>>
>>> (add-to-list 'auto-mode-alist ("\\.org\\'" . org-mode))
>>>
>>>
>>>
>> I did my way because I want to set org-agenda-file-regexp and
>> consistently use it any place the regexp is needed.
>>
>>>> By inserting some "message" statements (that is how far I can go on
>>>> debugging elisp code) in org-mode function, I found that when I visit a
>>>> ".org" file for the fist time, "org-mode" function is not called at all!
>>>> But the file does open as an normal org-mode file (with "Org" appearing
>>>> in the mode-line), except the text is not folded.
>>>>
>>>>
>>> This looks also weird. I think your configuration is somehow broken.
>>> Does this happen with every .org file? You should check the consistence
>>> of the global variables `org-startup-options' `org-startup-folded' *and*
>>> of local options in your Org file.
>>>
>>>
>> Yes, this happens with every .org file. My org files have no local
>> options at all, and all those variables you mentioned seem OK to me. The
>> most puzzling thing, as I said before, is if you open a file the second
>> time, the folding works, but not on the same file when opened the first
>> time. Why would first time/second time make a difference on how org-mode
>> behaves? Who is tracking whether the file is opened the first time or
>> not? Scratching my head hard...
>>
>> 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] 8+ messages in thread
* Re: Re: Bug with org-startup-folded?
2007-12-01 22:46 ` Wanrong Lin
@ 2007-12-02 0:23 ` Carsten Dominik
0 siblings, 0 replies; 8+ messages in thread
From: Carsten Dominik @ 2007-12-02 0:23 UTC (permalink / raw)
To: Wanrong Lin; +Cc: emacs-orgmode
On 12/1/07, Wanrong Lin <wrglin@gmail.com> wrote:
>
> Hi, Carsten,
>
> Following my last email, I wonder whether you can consider doing one of
> these two things in org-mode:
>
> 1. org-agenda-to-appt does not explicitly open a buffer for every
> org-file in the org-agenda-files, or
> 2. org-agenda-to-appt will honor the global org-startup-folded option.
> It seems the buffers opened by org-agenda-to-appt does honor the folding
> settings in the "#STARTUP" per file option. So I think it is natural and
> consistent for org-agenda-to-appt to honor the global options too when
> opening org-mode files.
>
> Thank you for giving it a thought.
Thanks for your correct analysis, and sorry that this misbehavior has
cost you a lot of time. org-agenda-to-appt calls
org-agenda-get-day-entries, and this function indeed loads the
buffers with folding turned of. I wrote this function long ago, so I am
not sure exactly why that is. I will follow up and fix this problem
in the next release. Thanks for being persistant in tracking this down.
- Carsten
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2007-12-02 0:23 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-28 15:56 Bug with org-startup-folded? Wanrong Lin
2007-11-29 15:30 ` Wanrong Lin
2007-11-29 22:43 ` Wanrong Lin
2007-11-30 12:25 ` Bastien
2007-11-30 21:01 ` Wanrong Lin
[not found] ` <acf852aa0712010346u7fb263aes3a84cfabc4a784c5@mail.gmail.com>
2007-12-01 19:31 ` Wanrong Lin
2007-12-01 22:46 ` Wanrong Lin
2007-12-02 0:23 ` Carsten Dominik
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.