From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Newsgroups: gmane.emacs.help Subject: Re: bookmark+ help required Date: Wed, 15 Apr 2015 22:02:02 +0200 Message-ID: <20150415200202.GB30295@tuxteam.de> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; x-action=pgp-signed Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1429128168 14547 80.91.229.3 (15 Apr 2015 20:02:48 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 15 Apr 2015 20:02:48 +0000 (UTC) Cc: Emacs To: Guido Van Hoecke Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Apr 15 22:02:35 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 1YiTW4-0002s9-BP for geh-help-gnu-emacs@m.gmane.org; Wed, 15 Apr 2015 22:02:32 +0200 Original-Received: from localhost ([::1]:33848 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YiTW3-0001Wd-HU for geh-help-gnu-emacs@m.gmane.org; Wed, 15 Apr 2015 16:02:31 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49451) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YiTVj-0001VG-1M for help-gnu-emacs@gnu.org; Wed, 15 Apr 2015 16:02:12 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YiTVc-00061v-CM for help-gnu-emacs@gnu.org; Wed, 15 Apr 2015 16:02:10 -0400 Original-Received: from mail.tuxteam.de ([5.199.139.25]:44198 helo=tomasium.tuxteam.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YiTVc-00061n-6h for help-gnu-emacs@gnu.org; Wed, 15 Apr 2015 16:02:04 -0400 Original-Received: from tomas by tomasium.tuxteam.de with local (Exim 4.80) (envelope-from ) id 1YiTVa-0008KH-EU; Wed, 15 Apr 2015 22:02:02 +0200 In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 5.199.139.25 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:103749 Archived-At: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Wed, Apr 15, 2015 at 09:24:15PM +0200, Guido Van Hoecke wrote: > Hi, > > I switched to bookmark+ and some of my bookmarks now have a different > format: > > Old format: > #1=(#("past.org" 0 8 > (bmkp-full-record #1#)) > (filename . "~/org/past.org") > (front-context-string . "* DONE <2013-04-") > (rear-context-string) > (position . 1)) > > New format: > #1=(#("agenda.org" 0 10 > (bmkp-full-record #1#)) > (end-position . 12206) > (time 21790 27563 50717 0) > (visits . 0) > (filename . "~/org/agenda.org") > (front-context-string . "* TODO <2013-05-") > (rear-context-string . "g niet gestart!\n") > (position . 12206)) > > I have an eshell function that allows me to type `j bookmark` (got it > from http://www.emacswiki.org/emacs/EshellBmk (thanks!)) and it fails > with the new format: it expects the 'filename' cell up front in the > record. That works with the old records, but not the new ones. In the > above 'agenda.org' bookmark it thinks that the filename is '12206'. > > Here's the relevant code: > (if (setq filename (cdr (car (bookmark-get-bookmark-record bookmark)))) You might try instead (if (setq filename (cdr (assq 'filename (bookmark-get-bookmark-record bookmark)))) The "assq filename" extracts just the pair whose first half is the symbol 'filename: thus it should hit home in both cases. HTH - -- tomás -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iEYEARECAAYFAlUuw7oACgkQBcgs9XrR2kbM2wCfQUve85zQ65cZDrfMMwaQcbo2 SvkAn1aVpbDyYBF2FQGvtVjtsl6MwJ/P =NMSu -----END PGP SIGNATURE-----