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: bookmark+ help required Date: Wed, 15 Apr 2015 13:23:24 -0700 (PDT) Message-ID: <04f51a2d-4e29-44cb-a637-652101bcdbc2@default> References: <> 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 1429129535 4870 80.91.229.3 (15 Apr 2015 20:25:35 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 15 Apr 2015 20:25:35 +0000 (UTC) To: Guido Van Hoecke , Emacs Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Apr 15 22:25:23 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 1YiTs9-0005Pv-V3 for geh-help-gnu-emacs@m.gmane.org; Wed, 15 Apr 2015 22:25:22 +0200 Original-Received: from localhost ([::1]:33935 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YiTs9-0005Ho-3u for geh-help-gnu-emacs@m.gmane.org; Wed, 15 Apr 2015 16:25:21 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53592) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YiTqM-00055I-2M for help-gnu-emacs@gnu.org; Wed, 15 Apr 2015 16:23:31 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YiTqI-0003xO-RC for help-gnu-emacs@gnu.org; Wed, 15 Apr 2015 16:23:30 -0400 Original-Received: from aserp1040.oracle.com ([141.146.126.69]:28797) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YiTqI-0003xK-Kv for help-gnu-emacs@gnu.org; Wed, 15 Apr 2015 16:23:26 -0400 Original-Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id t3FKNPCS013968 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 15 Apr 2015 20:23:25 GMT Original-Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserv0022.oracle.com (8.13.8/8.13.8) with ESMTP id t3FKNO71028195 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Wed, 15 Apr 2015 20:23:24 GMT Original-Received: from abhmp0008.oracle.com (abhmp0008.oracle.com [141.146.116.14]) by aserv0121.oracle.com (8.13.8/8.13.8) with ESMTP id t3FKNOYk031158; Wed, 15 Apr 2015 20:23:24 GMT In-Reply-To: <> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9 (901082) [OL 12.0.6691.5000 (x86)] X-Source-IP: aserv0022.oracle.com [141.146.126.234] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 141.146.126.69 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:103750 Archived-At: > I switched to bookmark+ and some of my bookmarks now have a different > format: >=20 > Old format: > #1=3D(#("past.org" 0 8 > (bmkp-full-record #1#)) > (filename . "~/org/past.org") > (front-context-string . "* DONE <2013-04-") > (rear-context-string) > (position . 1)) >=20 > New format: > #1=3D(#("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'. >=20 > 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.