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 19:18:18 +0000

Robert Thorpe <address@hidden> writes:

> Drew Adams <address@hidden> writes:
>
>>> For years I've setup Emacs so it presents me with my ToDo list at
>>> startup.  It doesn't put me in the right place in the file though.  I
>>> can bookmark the place in the file, but using bookmark-jump in the init
>>> file doesn't work and it doesn't work in emacs-startup-hook either.
>>
>> Why doesn't it work in your init file? Of course you will need to
>> load your bookmarks file before trying to jump to the bookmark.
>
> That was the problem.  When I loaded the file with (bookmark-load
> "~/.emacs.bmk") it worked.

This fix only worked for a while.  In my .emacs file I put:

(bookmark-load "~/.emacs.bmk")
(add-hook 'emacs-startup-hook '(lambda () (bookmark-jump "TODO")))

It worked for a few days but I noticed Emacs was becoming slow to
startup.  Today I had to restart Emacs a few times.  The last time it
took several minutes to starts.  The bookmark file was the culprit.  For
some reason every entry had been duplicated with the text <2> in front
of it.  Then it had been duplicated again with the text <3> in front of
that, and so one.  This caused by bookmark file to double in size on
every restart until it was ~50MB long.  I found that the two lines above
are the cause.  If you add a bookmark-jump to emacs-startup-hook then
something goes wrong somewhere.

BR,
Robert Thorpe



reply via email to

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