all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: <tomas@tuxteam.de>
To: Guido Van Hoecke <guivho@gmail.com>
Cc: Emacs <help-gnu-emacs@gnu.org>
Subject: Re: bookmark+ help required
Date: Wed, 15 Apr 2015 22:02:02 +0200	[thread overview]
Message-ID: <20150415200202.GB30295@tuxteam.de> (raw)
In-Reply-To: <m28udtmbz4.fsf@gmail.com>

-----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-----



  parent reply	other threads:[~2015-04-15 20:02 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-15 19:24 bookmark+ help required Guido Van Hoecke
2015-04-15 19:55 ` Milan Stanojević
2015-04-15 20:02 ` tomas [this message]
     [not found] <<m28udtmbz4.fsf@gmail.com>
2015-04-15 20:23 ` Drew Adams
2015-04-15 21:14   ` Guido Van Hoecke
2015-04-16  6:43     ` tomas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150415200202.GB30295@tuxteam.de \
    --to=tomas@tuxteam.de \
    --cc=guivho@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.