Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Bookmarks: (invalid-read-syntax "#")
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Sebastien Vauban  
View profile  
 More options Sep 12 2012, 3:03 pm
Newsgroups: gnu.emacs.help
From: "Sebastien Vauban" <wxhgmqzgw...@spammotel.com>
Date: Wed, 12 Sep 2012 21:03:11 +0200
Local: Wed, Sep 12 2012 3:03 pm
Subject: Bookmarks: (invalid-read-syntax "#")
Hello,

Since short (since testing bookmark+, maybe? -- for which I'll definitively
will invest more time[1] as it covers everything I need), I have the following
error when refiling or capturing in Org:

--8<---------------cut here---------------start------------->8---
Debugger entered--Lisp error: (invalid-read-syntax "#")
  read(#<buffer bookmarks.txt>)
  bookmark-alist-from-buffer()
  bookmark-load("~/.emacs.d/bookmarks.txt" t t)
  bookmark-maybe-load-default-file()
  bookmark-set("org-capture-last-stored")
  (save-restriction (widen) (goto-char pos) (bookmark-set "org-capture-last-stored") (move-marker org-capture-last-stored-marker (point)))
  (save-excursion (save-restriction (widen) (goto-char pos) (bookmark-set "org-capture-last-stored") (move-marker org-capture-last-stored-marker (point))))
  (save-current-buffer (set-buffer (buffer-base-buffer (current-buffer))) ...)
  (with-current-buffer (buffer-base-buffer (current-buffer)) ...)
  (let* ((where (org-capture-get :position-for-last-stored (quote local))) ...)
  org-capture-bookmark-last-stored-position()
  (progn (org-capture-bookmark-last-stored-position))
  (if org-capture-bookmark (progn (org-capture-bookmark-last-stored-position)))
  (when org-capture-bookmark (org-capture-bookmark-last-stored-position))
  (if org-note-abort ...)
  (let ((beg (point-min)) (end (point-max)) ...)
  ad-Orig-org-capture-finalize(nil)
  org-capture-finalize(nil)
--8<---------------cut here---------------end--------------->8---

I see where the # could come from:

--8<---------------cut here---------------start------------->8---
;;;; Emacs Bookmark Format Version 1 ;;;;
;;; This format is meant to be slightly human-readable;
;;; nevertheless, you probably don't want to edit it.
;;; -*- End Of Bookmark File Format Version Stamp -*-
((#("lit fait mvmt" 0 16
   (bmkp-full-record #0))
 (filename . "~/Projects/entr.awk")
 (buffer-name . "entr.awk")
 (front-context-string . "function lit_fai")
 (rear-context-string . "nes incorrectes\n")
 (front-context-region-string)
 (rear-context-region-string)
 (visits . 0)
 (time 20521 6580 48000)
 (created 20521 6580 48000)
 (position . 59496)
 (end-position . 59496))
 ...
--8<---------------cut here---------------end--------------->8---

... but I don't dare modifying that file by hand, as I'm not supposed to do
it.

Do you have an explanation, or work around my problem?

Best regards,
  Seb

[1] To have the same line colored as it is (by default) with `bm'.

--
Sebastien Vauban


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Drew Adams  
View profile  
 More options Sep 13 2012, 10:43 am
Newsgroups: gnu.emacs.help
From: "Drew Adams" <drew.ad...@oracle.com>
Date: Thu, 13 Sep 2012 07:43:24 -0700
Local: Thurs, Sep 13 2012 10:43 am
Subject: RE: Bookmarks: (invalid-read-syntax "#")
Hi Seb,

Please feel free to follow up with me off list.  I've had 2 other reports of the
same problem over the past year.  Somehow your file bookmark got corrupted.
This is no doubt a problem due to Bookmark+, but I don't yet know how/why.  I
would like to get more info, if possible.

The bottom line about the fix is that you will need to either revert to a backup
copy of your bookmark file or edit it by hand.  See below.  (See also option
`bookmark-version-control' - you might want to set it to `t' from now on, to be
sure of having a good backup file.)

Bookmark+ can optionally save propertized strings (e.g., the bookmark name) to
your bookmark file - see option 'bmkp-propertize-bookmark-names-flag'.  And
somehow the printout to your bookmark file produced bad `read' syntax, so the
file cannot be loaded.

The advantages of saving propertized strings include having multiple bookmarks
with the same name.  This is important for autofile bookmarks because the
bookmark name is only the non-directory part of the file name. This Bookmark+
feature lets you have different autofile bookmarks for files of the same name in
different directories.

The bookmark name saved in the bookmark has a text property that contains the
complete bookmark information, so that all that is needed is that string.  Such
a bookmark is (should be) saved like this:

#1=(#("foo" 0 13 (bmkp-full-record #1#))
    (filename . "c:/mydir/foo")
    (buffer-name . "foo")
    (front-context-string)
    (rear-context-string)
    (front-context-region-string)
    (rear-context-region-string)
    (visits . 0)
    (time 20442 4422 172000)
    (created 20442 4422 172000)
    (position . 1)
    (end-position . 1))

The bookmark name, `foo', is this propertized string:
#("foo" 0 13 (bmkp-full-record #1#)

The #1= and #1# syntax is how Emacs writes a circular reference.  #1 refers to
the entire bookmark structure, and you can see that the string "foo" is
propertized with property `bmkp-full-record' which has the value #1#, which is a
reference to #1, i.e., to the entire bookmark structure.

But somehow, with the problem you are seeing, it got saved like this, which has
invalid read syntax:

#("foo" 0 13 (bmkp-full-record #0))

See also these parts of the doc:
http://www.emacswiki.org/cgi-bin/wiki/BookmarkPlus#toc65
http://www.emacswiki.org/cgi-bin/wiki/BookmarkPlus#toc34

If you do any hand editing of your bookmarks file, be sure to
back it up first, even if it is corrupted.  It is a
plain-text file, so it can always be edited to fix things.

You will have to edit it by hand, or else revert to a backup copy of your
bookmark file.  The editing is no big deal (but could take a while if you have
many such invalid bookmarks): Just replace the #("..." ...) with "...".  So in
this case, you get (("lit fait mvmt" (filename ....) (buffer-name...)...)

Again, please feel free to follow up with me off list.  I would like to figure
out what is sometimes causing this problem.  Sorry for the trouble.

Thx - Drew


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Drew Adams  
View profile  
 More options Sep 24 2012, 12:37 pm
Newsgroups: gnu.emacs.help
From: "Drew Adams" <drew.ad...@oracle.com>
Date: Mon, 24 Sep 2012 09:36:33 -0700
Local: Mon, Sep 24 2012 12:36 pm
Subject: RE: Bookmarks: (invalid-read-syntax "#")

> Sent: Thursday, September 13, 2012 7:43 AM

This is a followup message to point to an explanation of the problem cited in
this thread, which a couple of Bookmark+ users ran into.  I have updated the
Bookmark+ doc to warn about it:
http://www.emacswiki.org/emacs/BookmarkPlus#Compatibility

See also Emacs bug #12503:
http://debbugs.gnu.org/cgi/bugreport.cgi?bug=12503

The bottom line is this: if you have bookmarks that you created using Bookmark+
then use Bookmark+, not vanilla Emacs, to access them.

Or if you will often be going back and forth between using Bookmark+ and using
vanilla Emacs, then customize option `bmkp-propertize-bookmark-names-flag' to
nil.

Setting the option to nil means you will forego being able to use multiple
bookmarks that have the same name, which is particularly useful for "autofiles".

An autofile is a bookmark whose name is the nondirectory part of the targeted
file name.  If the option is non-nil then you can have different autofiles in
different directories but with the same name.

You can use autofiles pretty much the same way you use files in Emacs, even
though they are actually bookmarks.  Because they are bookmarks, with Bookmark+
you can do things like tag them in various ways (a la Delicious).
http://www.emacswiki.org/emacs/BookmarkPlus#AutofileBookmarks

HTH.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »