From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bastien Subject: Re: Re: Showing hidden subtree automatically if point is hidden when the buffer is opened Date: Tue, 28 Jul 2009 19:59:35 +0800 Message-ID: <87y6q93tay.fsf@bzg.ath.cx> References: <878wi9agq8.fsf@bzg.ath.cx> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MVlSZ-0008A8-9P for emacs-orgmode@gnu.org; Tue, 28 Jul 2009 08:07:11 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MVlSX-00088z-M2 for emacs-orgmode@gnu.org; Tue, 28 Jul 2009 08:07:10 -0400 Received: from [199.232.76.173] (port=40375 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MVlSX-00088b-29 for emacs-orgmode@gnu.org; Tue, 28 Jul 2009 08:07:09 -0400 Received: from rv-out-0708.google.com ([209.85.198.245]:58382) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MVlSW-0001Vi-Gz for emacs-orgmode@gnu.org; Tue, 28 Jul 2009 08:07:08 -0400 Received: by rv-out-0708.google.com with SMTP id f25so1652992rvb.6 for ; Tue, 28 Jul 2009 05:07:07 -0700 (PDT) In-Reply-To: (User's message of "Tue, 28 Jul 2009 04:19:33 +0000 (UTC)") 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: User Cc: emacs-orgmode@gnu.org User writes: > I added the timer, because I didn't know in which order the hooks > are run. If org-mode hook runs first and then saveplace's hook > which restores point then the above code has no effect. saveplace adds the hook at the end of the hooks list, by calling add-hook like this: (add-hook 'find-file-hook 'save-place-find-file-hook t) ^ The `t' means put this hook at the end. So your org-mode hook will be safely called *before* saveplace's. -- Bastien