From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.help Subject: RE: Opening a bookmark in the init file Date: Sun, 8 Mar 2015 15:52:08 -0700 (PDT) Message-ID: References: <6b508f27-065d-41fe-8142-caaad9a6c59e@default> <(message> <8> <2015> <14:24:18> <-0700> <(PDT))> <87k2yrduu6.fsf@robertthorpeconsulting.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1425855159 11401 80.91.229.3 (8 Mar 2015 22:52:39 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 8 Mar 2015 22:52:39 +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 23:52:27 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 1YUk3f-00044e-AP for geh-help-gnu-emacs@m.gmane.org; Sun, 08 Mar 2015 23:52:27 +0100 Original-Received: from localhost ([::1]:40793 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YUk3e-0006M3-CI for geh-help-gnu-emacs@m.gmane.org; Sun, 08 Mar 2015 18:52:26 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58571) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YUk3U-0006Ll-63 for help-gnu-emacs@gnu.org; Sun, 08 Mar 2015 18:52:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YUk3Q-00045w-5e for help-gnu-emacs@gnu.org; Sun, 08 Mar 2015 18:52:16 -0400 Original-Received: from userp1040.oracle.com ([156.151.31.81]:36841) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YUk3P-00045p-VJ for help-gnu-emacs@gnu.org; Sun, 08 Mar 2015 18:52:12 -0400 Original-Received: from acsinet21.oracle.com (acsinet21.oracle.com [141.146.126.237]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id t28Mq9EM014859 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sun, 8 Mar 2015 22:52:10 GMT Original-Received: from userz7021.oracle.com (userz7021.oracle.com [156.151.31.85]) by acsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id t28Mq7kE016715 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Sun, 8 Mar 2015 22:52:08 GMT Original-Received: from abhmp0007.oracle.com (abhmp0007.oracle.com [141.146.116.13]) by userz7021.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id t28Mq79Y029153; Sun, 8 Mar 2015 22:52:07 GMT In-Reply-To: <87k2yrduu6.fsf@robertthorpeconsulting.com> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.8.2 (807160) [OL 12.0.6691.5000 (x86)] X-Source-IP: acsinet21.oracle.com [141.146.126.237] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 156.151.31.81 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:103075 Archived-At: > > 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. >=20 > I'm loading the bookmark file because it doesn't work otherwise. > If I just do: >=20 > (add-hook 'emacs-startup-hook '(lambda () (bookmark-jump "TODO"))) >=20 > 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.