emacs-orgmode
[Top][All Lists]
Advanced

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

[Orgmode] Re: org-default-notes-file


From: Sébastien Vauban
Subject: [Orgmode] Re: org-default-notes-file
Date: Mon, 18 Oct 2010 23:10:38 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (windows-nt)

Hi,

Noorul Islam K M wrote:
> Louis Turk <address@hidden> writes:
>>  On 10/18/2010 05:20 PM, Noorul Islam K M wrote:
>>> Louis Turk<address@hidden>  writes:
>>>> GNU Emacs 23.2.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.20.0) of
>>>> 2010-05-08 on pidsley.hoetzel.info
>>>>
>>>> Org-mode version 6.33x (release_7.01h.718.g0cb3c5.dirty)

Such a mix clearly indicates that:

- you have used some libs from v6.33
- you have a clean working copy of the current Org elsewhere

If you look at your load-path, you will see that your repo is before the Org
directory from the standard Emacs, that what you expect. Though, it seems not
respected...

Reason is you have autoloads that called some libs to be loaded *before* you
properly add the path to your Org WC, and before you explicitly load it.

For example, an s-expr in your diary file, when that one is read, or something
like that.

You can chase such things using my modified version of require:

--8<---------------cut here---------------start------------->8---
        ;; REPLACES ORIGINAL in `C source code' (dumped)
        ;; redefine require to leave a trace of packages being loaded
        (if (not (fboundp 'orig-require))
            (fset 'orig-require (symbol-function 'require))
          (message "The code to redefine `require' should not be loaded twice"))

        (defvar my/require-depth 0)

        (defun require (feature &optional filename noerror)
          "Leave a trace of packages being loaded."
          (cond ((member feature features)
                 (message "%sRequiring `%s' (already loaded)"
                          (concat (make-string (* 2 my/require-depth) ? ) "+-> 
")
                          feature))
                (t
                 (message "%sRequiring `%s'"
                          (concat (make-string (* 2 my/require-depth) ? ) "+-> 
")
                          feature)
                 (let ((my/require-depth (+ 1 my/require-depth)))
                   (orig-require feature filename noerror))
                 (message "%sRequiring `%s'...done"
                          (concat (make-string (* 2 my/require-depth) ? ) "+-> 
")
                          feature)))))
--8<---------------cut here---------------end--------------->8---

With such, you certainly will see that Org is loaded before you think it is,
hence loading the libs that come with the standard distrib of your Emacs.

Solution is to put something similar to this at the earliest possible in your
.emacs:

--8<---------------cut here---------------start------------->8---
      (my/add-to-load-path "~/src/org/" 'with-subdirs 'recursive)
      (when (try-require 'org-install)
--8<---------------cut here---------------end--------------->8---

Note that this is very very tricky...

Best regards,
  Seb

-- 
Sébastien Vauban




reply via email to

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