From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Robert Thorpe Newsgroups: gmane.emacs.help Subject: Re: Opening a bookmark in the init file Date: Sun, 08 Mar 2015 19:18:18 +0000 Message-ID: <87ioeb8fid.fsf@robertthorpeconsulting.com> References: <87mw3uerot.fsf@robertthorpeconsulting.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1425842332 15236 80.91.229.3 (8 Mar 2015 19:18:52 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 8 Mar 2015 19:18:52 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Robert Thorpe Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Mar 08 20:18:41 2015 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YUgil-0003CE-Om for geh-help-gnu-emacs@m.gmane.org; Sun, 08 Mar 2015 20:18:39 +0100 Original-Received: from localhost ([::1]:40266 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YUgil-0003Sl-3o for geh-help-gnu-emacs@m.gmane.org; Sun, 08 Mar 2015 15:18:39 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60654) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YUgiZ-0003Sf-AC for help-gnu-emacs@gnu.org; Sun, 08 Mar 2015 15:18:28 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YUgiU-0007xJ-9t for help-gnu-emacs@gnu.org; Sun, 08 Mar 2015 15:18:27 -0400 Original-Received: from outbound-smtp03.blacknight.com ([81.17.249.16]:46347) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YUgiU-0007x8-4M for help-gnu-emacs@gnu.org; Sun, 08 Mar 2015 15:18:22 -0400 Original-Received: from mail.blacknight.com (pemlinmail05.blacknight.ie [81.17.254.26]) by outbound-smtp03.blacknight.com (Postfix) with ESMTPS id 5C5FA98AAA for ; Sun, 8 Mar 2015 19:18:20 +0000 (UTC) Original-Received: (qmail 22762 invoked from network); 8 Mar 2015 19:18:20 -0000 Original-Received: from unknown (HELO RTLaptop) (rt@robertthorpeconsulting.com@[109.77.230.205]) by 81.17.254.9 with ESMTPSA (DHE-RSA-AES128-SHA encrypted, authenticated); 8 Mar 2015 19:18:19 -0000 In-Reply-To: <87mw3uerot.fsf@robertthorpeconsulting.com> (message from Robert Thorpe on Tue, 03 Mar 2015 02:32:50 +0000) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 81.17.249.16 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:103070 Archived-At: Robert Thorpe writes: > Drew Adams 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