From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wanrong Lin Subject: Re: Bug with org-startup-folded? Date: Thu, 29 Nov 2007 17:43:57 -0500 Message-ID: <474F40AD.6090002@gmail.com> References: <474D8FA4.6000703@gmail.com> <474EDB33.2080008@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Ixs76-0001gG-Hn for emacs-orgmode@gnu.org; Thu, 29 Nov 2007 17:44:08 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Ixs74-0001dZ-7b for emacs-orgmode@gnu.org; Thu, 29 Nov 2007 17:44:07 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ixs74-0001dQ-3r for emacs-orgmode@gnu.org; Thu, 29 Nov 2007 17:44:06 -0500 Received: from py-out-1112.google.com ([64.233.166.177]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Ixs73-0006sH-P4 for emacs-orgmode@gnu.org; Thu, 29 Nov 2007 17:44:05 -0500 Received: by py-out-1112.google.com with SMTP id a73so4296797pye for ; Thu, 29 Nov 2007 14:44:04 -0800 (PST) In-Reply-To: <474EDB33.2080008@gmail.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org 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 >> > >