OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]

Subject: Re: [docbook-apps] Docbook Editors

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
		     "^[ \t]*<title>\\(.*\\)</title>"
	    (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 :~)

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]