all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#3646: 23.0.95; bookmark format upgrade is incorrect
@ 2009-06-22  0:26 Drew Adams
  2012-10-02 23:10 ` bug#3646: "bookmark format upgrade is incorrect" Karl Fogel
  2012-10-03  5:05 ` Karl Fogel
  0 siblings, 2 replies; 7+ messages in thread
From: Drew Adams @ 2009-06-22  0:26 UTC (permalink / raw)
  To: emacs-pretest-bug

(defun bookmark-upgrade-version-0-alist (old-list)
  "Upgrade a version 0 alist OLD-LIST to the current version."
  (mapcar
   (lambda (bookmark)
     (let* ((name...))
       (list
        name
        `((filename             .    ,filename)
          (front-context-string .    ,(or front-str ""))
          (rear-context-string  .    ,(or rear-str  ""))
          (position             .    ,position)
          (annotation           .    ,ann)))))
   old-list))
 
The bookmark entry format being output by that code is this:
 
(NAME ((filename . FILE)
       (front-context-string . FRONT-STR)
       (rear-context-string  . REAR-STR)
       (position . POS)
       (annotation . ANNOTATION)))
 
And that is what is called the "old deprecated" format in the doc
string of `bookmark-alist'.  Upgrade should upgrade to the latest
format, not an old, deprecated one.
 
Further, "the old deprecated one" should be replaced by a precise
reference to the last Emacs version that _produced_ such a deprecated
format.  Things are currently doubly confusing because we "upgrade"
from the bookmark version 0 format to an "old deprecated" format - and
there is yet a third format: the current format.
 
 
In GNU Emacs 23.0.95.1 (i386-mingw-nt5.1.2600)
 of 2009-06-19 on SOFT-MJASON
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (3.4)'
 






^ permalink raw reply	[flat|nested] 7+ messages in thread
* bug#3646: "bookmark format upgrade is incorrect"
@ 2009-10-09  6:29 Karl Fogel
  0 siblings, 0 replies; 7+ messages in thread
From: Karl Fogel @ 2009-10-09  6:29 UTC (permalink / raw)
  To: 3646

The actual situation is much, much worse than even this.

Because the recent format upgrade (to the "third" format) did not bump
`bookmark-file-format-version', ever since at least rev 1.114 (and
possibly before) bookmark.el has been potentially writing
`bookmark-alist' in a mixture of formats: some of the bookmarks in the
alist might be in format 2, and some might be in format 1.

I'm working on a fix.  It should be possible to detect 1 and migrate it
to 2 at the individual bookmark record level.





^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2012-10-03 12:53 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-22  0:26 bug#3646: 23.0.95; bookmark format upgrade is incorrect Drew Adams
2012-10-02 23:10 ` bug#3646: "bookmark format upgrade is incorrect" Karl Fogel
2012-10-03  0:04   ` Drew Adams
2012-10-03  5:05 ` Karl Fogel
2012-10-03  5:18   ` Drew Adams
2012-10-03 12:53   ` Andreas Schwab
  -- strict thread matches above, loose matches on Subject: below --
2009-10-09  6:29 Karl Fogel

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.