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 21:48:17 +0000 Message-ID: <87k2yrduu6.fsf@robertthorpeconsulting.com> References: <6b508f27-065d-41fe-8142-caaad9a6c59e@default> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1425851330 20548 80.91.229.3 (8 Mar 2015 21:48:50 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 8 Mar 2015 21:48:50 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Drew Adams Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Mar 08 22:48:39 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 1YUj3q-0000bo-Qf for geh-help-gnu-emacs@m.gmane.org; Sun, 08 Mar 2015 22:48:34 +0100 Original-Received: from localhost ([::1]:40656 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YUj3q-0000EO-7Y for geh-help-gnu-emacs@m.gmane.org; Sun, 08 Mar 2015 17:48:34 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51820) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YUj3f-0000E8-V0 for help-gnu-emacs@gnu.org; Sun, 08 Mar 2015 17:48:24 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YUj3c-0003Mb-LW for help-gnu-emacs@gnu.org; Sun, 08 Mar 2015 17:48:23 -0400 Original-Received: from outbound-smtp02.blacknight.com ([81.17.249.8]:43307) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YUj3c-0003MQ-Fl for help-gnu-emacs@gnu.org; Sun, 08 Mar 2015 17:48:20 -0400 Original-Received: from mail.blacknight.com (pemlinmail02.blacknight.ie [81.17.254.11]) by outbound-smtp02.blacknight.com (Postfix) with ESMTPS id 43254985EE for ; Sun, 8 Mar 2015 21:48:19 +0000 (UTC) Original-Received: (qmail 23017 invoked from network); 8 Mar 2015 21:48:19 -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 21:48:18 -0000 In-Reply-To: <6b508f27-065d-41fe-8142-caaad9a6c59e@default> (message from Drew Adams on Sun, 8 Mar 2015 14:24:18 -0700 (PDT)) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 81.17.249.8 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:103074 Archived-At: Drew Adams 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