emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Wanrong Lin <wanrong.lin@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: Bug with org-startup-folded?
Date: Thu, 29 Nov 2007 17:43:57 -0500	[thread overview]
Message-ID: <474F40AD.6090002@gmail.com> (raw)
In-Reply-To: <474EDB33.2080008@gmail.com>


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

  reply	other threads:[~2007-11-29 22:44 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=474F40AD.6090002@gmail.com \
    --to=wanrong.lin@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).