[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Orgmode] Re: Bug with org-startup-folded?

From: Wanrong Lin
Subject: Re: [Orgmode] Re: Bug with org-startup-folded?
Date: Sat, 01 Dec 2007 14:31:35 -0500
User-agent: Thunderbird (Windows/20071031)

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.


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 <address@hidden> wrote:
Bastien wrote:
Wanrong Lin <address@hidden> 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...


Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]