On Mon, Jul 02, 2007 at 02:27:52PM +0200, Stefano Sabatini wrote:
> Unfortunately both seem to lack tagging feature, to show up the layout
> of the document displayed, which is fundamental to me while editing a
> complex document, to understand where I am and to easily jump from one
> section to another one
One could make use of "imenu" and/or "speedbar". imenu and
speedbar are parts of Emacs 21 and 22, AFAIK. Try this:
(require 'imenu)
(require 'speedbar)
(defvar dbk-imenu-generic-expression nil
"Imenu generic expression for DocBook. See `imenu-generic-expression'.")
(add-hook 'nxml-mode-hook
(lambda ()
(speedbar-add-supported-extension ".dbk")
(setq dbk-imenu-generic-expression
'((nil
"^[ \t]*<title>\\(.*\\)</title>"
1)))
(setq imenu-generic-expression dbk-imenu-generic-expression
imenu-case-fold-search nil)
(imenu-add-to-menubar "DocBook")))
Now call M-x speedbar, when you are in nxml-mode. It does not
really reflect the document structure, but maybe it helps a bit
to see all titles in the right order. speedbar lets you jump to
the right place, as does the menu "DocBook".
Cheers, WB
> Linux user number 337176 (see http://counter.li.org)
Registered Linux user 7456 :~)
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]