emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bookmark.el and lisp/gnus/gnus-bookmark.el


From: Karl Fogel
Subject: Re: bookmark.el and lisp/gnus/gnus-bookmark.el
Date: Sun, 09 Mar 2008 22:29:09 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

Stefan Monnier <address@hidden> writes:
>> For now `bookmark-set' asks for an annotation (if required), sends it to
>> `bookmark-make' which calls `bookmark-make-record-function' with the
>> annotation as an argument.
>
>> IIUC Tassilo suggested that the annotation should be directly handled by
>> `bookmark-make-record-function', which seems correct to me.  What you
>> propose is to handle annotation in `bookmark-set' (or preferrably in
>> `bookmark-make') -- this is _feasible_, but it looks weird to me since
>> the annotation is really part of the record.
>
> The record has various parts: a name to select it, an annotation,
> a bunch of data to find the place, there could be more (date the record
> was created, when it was last used, ...).
>
> The bookmark-make-record-function should only concern itself with
> providing the data to find the place.  It may also provide a default
> name, a default annotation, ... but it's better if it doesn't need to
> handle annotations since those are (or rather should be) handled
> identically for *all* bookmark-make-record-function.

I agree with Stefan's analysis here.  A bookmark record is not an opaque
object: it is okay for `bookmark-set' or any other bookmark.el function
to supply parts of the record that are not specific to the mode
generating the bookmark.  The external mode code should concern itself
with the location data -- that code is both producer and consumer of
that data.  Since bookmark.el is always the consumer of the annotation
data, it should be the producer of that data as well.

Fortunately, we're using alists here, so all data is labeled in
comprehensible ways.  It should be easy to keep things straight.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]