help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Opening a bookmark in the init file


From: Robert Thorpe
Subject: Re: Opening a bookmark in the init file
Date: Sun, 08 Mar 2015 21:48:17 +0000

Drew Adams <address@hidden> writes:

> For some reason, you chose to call function `bookmark-load'.
> If you do that it behooves you to check its doc first ;-):

Good point.

> You can use function `bookmark-maybe-load-default-file'
> instead of `bookmark-load'.  (There is also variable
> `bookmarks-already-loaded', but you should not need to check it.)

Using that works without any problems.  Thanks.

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

BR,
Robert Thorpe



reply via email to

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