[Top][All Lists]

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

RE: Opening a bookmark in the init file

From: Drew Adams
Subject: RE: Opening a bookmark in the init file
Date: Sun, 8 Mar 2015 15:52:08 -0700 (PDT)

> > But before bothering to fiddle with such things, check what you
> > are really doing, to see how/why/where else you are loading your
> > bookmark file, and perhaps simplify your code accordingly.
> I'm loading the bookmark file because it doesn't work otherwise.
> If I just do:
> (add-hook 'emacs-startup-hook '(lambda () (bookmark-jump "TODO")))
> Then Emacs gives an error "Invalid Bookmark TODO".  It seems that the
> bookmarks are loaded after emacs-startup-hook, which is odd.  If I load
> them before it works though.

Many functions call `bookmark-maybe-load-default-file' (which loads
the bookmark file if it has not been loaded).

If you don't want to call that instead of `bookmark-load' then
try to find out what, during your startup, loads the file.
Do `M-x debug-on-entry RET bookmark-load RET' to see what calls
`bookmark-load' the first time.

There is no harm in calling `bookmark-maybe-load-default-file'.
I mention trying to find out what was causing the first load as a
way of helping you understanding what was happening.

reply via email to

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