From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?UTF-8?Q?Milan_Stanojevi=C4=87?= Newsgroups: gmane.emacs.help Subject: Re: bookmark+ help required Date: Wed, 15 Apr 2015 15:55:22 -0400 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1429127793 8435 80.91.229.3 (15 Apr 2015 19:56:33 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 15 Apr 2015 19:56:33 +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 21:56:25 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 1YiTQ2-0008SL-VB for geh-help-gnu-emacs@m.gmane.org; Wed, 15 Apr 2015 21:56:19 +0200 Original-Received: from localhost ([::1]:33828 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YiTQ2-0008Sa-8e for geh-help-gnu-emacs@m.gmane.org; Wed, 15 Apr 2015 15:56:18 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48552) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YiTPr-0008SU-L2 for help-gnu-emacs@gnu.org; Wed, 15 Apr 2015 15:56:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YiTPn-0004GW-1j for help-gnu-emacs@gnu.org; Wed, 15 Apr 2015 15:56:07 -0400 Original-Received: from mail-ie0-x236.google.com ([2607:f8b0:4001:c03::236]:33827) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YiTPm-0004GM-Sg for help-gnu-emacs@gnu.org; Wed, 15 Apr 2015 15:56:02 -0400 Original-Received: by iedfl3 with SMTP id fl3so40646913ied.1 for ; Wed, 15 Apr 2015 12:56:02 -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=kB7gCf3K33c9QdkDLikpdL3HOvgoPI2uD1JVvBEnhY4=; b=JCh8QuJQMBj8frPriQxmc7oPMqMrANobtc6JHXcMQOMkNeBBjpZigV6+4hdcH0/Lxf LIkIOq9K1HjjYl/BKIeOFSXWzkeqIMLVUOembpTs98yts3fKQn8n2cd+WdiJWHYr4OkP ++d8h3mAaTnqSrswq7FQq72cDiGM/wYTaX6A2rpugmtTUJGv/m020M2MNA1JdmrhoLVh U+OBY+xzjPuQCYDsrO4v9DmOoAXlJl7tuKY8jhhcGrdo5dNvsFHX+mrD20OwwbAVahTg UO9S332JfuiVfwD8QrSQnF1evqb/r9u62lDFFNfzruaqIgPpayyJbxkC05gUhgTEx6Ja cLeA== X-Received: by 10.50.79.134 with SMTP id j6mr649451igx.33.1429127762283; Wed, 15 Apr 2015 12:56:02 -0700 (PDT) Original-Received: by 10.64.103.69 with HTTP; Wed, 15 Apr 2015 12:55:22 -0700 (PDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:4001:c03::236 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:103748 Archived-At: Try this (if (setq filename (cdr (assoc 'filename (bookmark-get-bookmark-record bookmark)))) On Wed, Apr 15, 2015 at 3:24 PM, 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)))) > > 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. > > TIA, > > Guido > > Note: I am very willing to update the wiki with proposed working > solution and give due credit to you guys. >