And how to select only these \bookmark tags which have a given value of the first argument?
Then you can iterate it, and access it using tree-ref, for instance. Look for tree-ref in the documentation and read the file "High level modification routines". Say your bookmark macro has one argument, then you could display on the console all the arguments to bookmark tags with something like:
(for-each (lambda (item)
(display (tree->string (tree-ref item 0))))
(select (buffer-tree) '(:* bk)))
I doubt this is the best way to achieve it, but it's the one I came up with when looking for a way to update all the references I was automatically generating in my document.
________________
Miguel de Benito.
On Wed, Jul 27, 2011 at 21:18, Victor Porton
<address@hidden> wrote:
How can i get quickly the list of all <bookmark> tags in a document?
I want to make a menu which lists all bookmarks but don't know where to start.
Should I parse the entire document finding <bookmark> tags before every show of the menu. Isn't this to slow?
Should I code it in Scheme or in C++?
I think it is similar to the menu with choice of a section of the document, as it is in the focus toolbar. But where is the code which implements that?
--
Victor Porton - http://portonvictor.org
_______________________________________________
Texmacs-dev mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/texmacs-dev