all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bookmark structure
@ 2008-04-05  0:02 Drew Adams
  2008-04-05 14:15 ` Stefan Monnier
  0 siblings, 1 reply; 4+ messages in thread
From: Drew Adams @ 2008-04-05  0:02 UTC (permalink / raw)
  To: bug-gnu-emacs

The doc string of bookmark-alist says each entry has this form:
 
(NAME
  (filename . FILE)
  (front-context-string . FRONT-STR)
  (rear-context-string  . REAR-STR)
  (position . POS)
  (info-node . POS)
  (annotation . ANNOTATION))
 
There should not be two occurrences of POS, unless they always have
the same value. The doc string says that info-node is optional, but it
doesn't say that annotation is optional. And the syntax description
doesn't reflect the fact that these are optional (no brackets).
 
The comments in the code, on the other hand, say that this is the(new)
structure:
 
;;        (bookmark-name ((filename . FILENAME)
;;                        (front-context-string . string-in-front)
;;                        (rear-context-string  . string-behind)
;;                        (position . POINT)
;;                        (annotation . annotation)
;;                        (whatever   . VALUE)
;;                        ...
;;                        ))
 
bookmark-name, string-in-front, string-behind, and the second
occurrence of annotation here should be uppercase here.
 
Compared to the doc string, there is an additional level of parens
here for the body, info-node is missing, and additional kinds of
entries (whatever . VALUE)..., are acceptable.
 
The two descriptions should be similar.  It seems that neither is
quite correct. The doc string is missing a level of parens, at least.
 

In GNU Emacs 22.2.1 (i386-mingw-nt5.1.2600)
 of 2008-03-26 on RELEASE
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (3.4)'
 





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

* Re: bookmark structure
  2008-04-05  0:02 bookmark structure Drew Adams
@ 2008-04-05 14:15 ` Stefan Monnier
  2008-04-05 16:53   ` Drew Adams
  0 siblings, 1 reply; 4+ messages in thread
From: Stefan Monnier @ 2008-04-05 14:15 UTC (permalink / raw)
  To: Drew Adams; +Cc: bug-gnu-emacs

> The doc string of bookmark-alist says each entry has this form:
> (NAME
>   (filename . FILE)
>   (front-context-string . FRONT-STR)
>   (rear-context-string  . REAR-STR)
>   (position . POS)
>   (info-node . POS)
>   (annotation . ANNOTATION))
 
That's already fixed in the trunk.


        Stefan




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

* RE: bookmark structure
  2008-04-05 14:15 ` Stefan Monnier
@ 2008-04-05 16:53   ` Drew Adams
  2008-04-05 18:02     ` Stefan Monnier
  0 siblings, 1 reply; 4+ messages in thread
From: Drew Adams @ 2008-04-05 16:53 UTC (permalink / raw)
  To: 'Stefan Monnier'; +Cc: bug-gnu-emacs

> > The doc string of bookmark-alist says each entry has this form:
> > (NAME
> >   (filename . FILE)
> >   (front-context-string . FRONT-STR)
> >   (rear-context-string  . REAR-STR)
> >   (position . POS)
> >   (info-node . POS)
> >   (annotation . ANNOTATION))
>  
> That's already fixed in the trunk.

Still doesn't look right to me:

 "where each BOOKMARK is typically of the form

 \(NAME
  (\(filename . FILE\)
   \(front-context-string . FRONT-STR\)
   \(rear-context-string  . REAR-STR\)
   \(position . POS\)
   \(annotation . ANNOTATION\)\))

 So the cdr of each bookmark is an alist too."

Aside from the unnecessary \'s (not a problem, but harder to read the code), the
last sentence is misleading (and unnecessary). The cdr of each bookmark is a
singleton list whose element is an alist.

And what I said about the code comment still holds:

> bookmark-name, string-in-front, string-behind, and the second
> occurrence of annotation here should be uppercase here.





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

* Re: bookmark structure
  2008-04-05 16:53   ` Drew Adams
@ 2008-04-05 18:02     ` Stefan Monnier
  0 siblings, 0 replies; 4+ messages in thread
From: Stefan Monnier @ 2008-04-05 18:02 UTC (permalink / raw)
  To: Drew Adams; +Cc: bug-gnu-emacs

> last sentence is misleading (and unnecessary). The cdr of each bookmark is a
> singleton list whose element is an alist.

Actually, the text was right in this case, the example was wrong.

> And what I said about the code comment still holds:

>> bookmark-name, string-in-front, string-behind, and the second
>> occurrence of annotation here should be uppercase here.

Should both be fixed now, thanks,


        Stefan




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

end of thread, other threads:[~2008-04-05 18:02 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-05  0:02 bookmark structure Drew Adams
2008-04-05 14:15 ` Stefan Monnier
2008-04-05 16:53   ` Drew Adams
2008-04-05 18:02     ` Stefan Monnier

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.