From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Guido Van Hoecke Newsgroups: gmane.emacs.help Subject: Re: bookmark+ help required Date: Wed, 15 Apr 2015 23:14:15 +0200 Message-ID: References: <04f51a2d-4e29-44cb-a637-652101bcdbc2@default> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1429132678 23369 80.91.229.3 (15 Apr 2015 21:17:58 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 15 Apr 2015 21:17:58 +0000 (UTC) Cc: Emacs To: Drew Adams Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Apr 15 23:17:50 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 1YiUgt-0006jL-PQ for geh-help-gnu-emacs@m.gmane.org; Wed, 15 Apr 2015 23:17:47 +0200 Original-Received: from localhost ([::1]:34152 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YiUgs-0001O9-Sh for geh-help-gnu-emacs@m.gmane.org; Wed, 15 Apr 2015 17:17:46 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36035) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YiUe0-0000pJ-Ci for help-gnu-emacs@gnu.org; Wed, 15 Apr 2015 17:14:49 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YiUdy-0003Kh-W3 for help-gnu-emacs@gnu.org; Wed, 15 Apr 2015 17:14:48 -0400 Original-Received: from mail-vn0-x22e.google.com ([2607:f8b0:400c:c0f::22e]:44123) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YiUdy-0003KR-Pz for help-gnu-emacs@gnu.org; Wed, 15 Apr 2015 17:14:46 -0400 Original-Received: by vnbg7 with SMTP id g7so20161831vnb.11 for ; Wed, 15 Apr 2015 14:14:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=X4XBk7jspPShtwndiyj+AKBwJoDfc+j8wMfGErBGYsI=; b=Man59TUmDKhz87YrzfcRUNDj9dqOasBzIQ9c06x8iv2D0IDNpU4FeK21GrtfEKECVf NnMi3S5QMMLt3SX8WP1FKbmY5DE92x2UVsNY8UtLa4jH0UF3Jbeew2ybI/cf2cAFVZDH B06jzVUf1WLI0fqE9DPDw4drc/EaBKcGH3SDcSG7uyIn1C/8CGiUG9viDyotaaOkUzV4 ORtHqipGFRttmLFQ9//iyfS+PGKW45HMmpxGNvPQfxJzfAFE+Lz4E/C/4FMi67FifaBW 8nQfCwWVH02cY9eOcHxRpZztBac7QBFmPuomb/tvl6m6kdfe0pOB9QKNRqpPRF//6cmz MUyA== X-Received: by 10.52.112.36 with SMTP id in4mr34579544vdb.3.1429132486267; Wed, 15 Apr 2015 14:14:46 -0700 (PDT) Original-Received: by 10.52.230.33 with HTTP; Wed, 15 Apr 2015 14:14:15 -0700 (PDT) In-Reply-To: <04f51a2d-4e29-44cb-a637-652101bcdbc2@default> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:400c:c0f::22e X-Content-Filtered-By: Mailman/MimeDel 2.1.14 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:103751 Archived-At: Thanks Milan, Tomas and Drew. I adopted Drew's solution and updated the wiki Guido On 15 April 2015 at 22:23, Drew Adams wrote: > > 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)))) > > That code is mistaken. This is the proper code to access the `filename' > field of bookmark BOOKMARK: > > (bookmark-get-filename BOOKMARK) > > And for any field that does not have its own dedicated access function > (such as field `filename' has with `bookmark-get-filename'), code should > use `bookmark-prop-get' to access that field value. > > This is not Bookmark+-specific. This is what is used for vanilla > bookmark.el also. The order of the field recorded in a bookmark is > (must be) irrelevant. The only positional requirement is that the > bookmark name be the car of the full bookmark record. > > > My lisp is not up to turning this into an expression that would > > correctly load the filename from old formats as well as from the newer > > format. Any help and suggestion would be most welcome and appreciated. >