Florent Georges wrote:
> "Returns all the elements in the ancestor axis of the current
> element. If called interactively, show it in the echo area."
As you did see, the command show nothing. Here is the
corrected version:
(defun drkm-nxml:ancestor-axis-path (&optional print-message)
"Return all the elements in the ancestor axis of the current
element. If called interactively, show it in the echo area."
(interactive "p")
(nxml-ensure-scan-up-to-date)
(let ((path ""))
(save-excursion
(condition-case ()
(while t
(nxml-backward-up-element)
(setq path (concat
"/" (xmltok-start-tag-qname) path)))
(error nil)))
(when print-message
(message "%s" path))
path))
There could be improvement to take other kinds of node into account
(attributes, etc.), to put the path in the kill ring if C-u, etcetera.
Regards,
--drkm
___________________________________________________________________________
Nouveau : téléphonez moins cher avec Yahoo! Messenger. Appelez le monde entier
à partir de 0,012 ?/minute !
Téléchargez sur http://fr.messenger.yahoo.com
------------------------ Yahoo! Groups Sponsor --------------------~-->
Home is just a click away. Make Yahoo! your home page now.
http://us.click.yahoo.com/DHchtC/3FxNAA/yQLSAA/2U_rlB/TM
--------------------------------------------------------------------~->
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/emacs-nxml-mode/
<*> To unsubscribe from this group, send an email to:
emacs-nxml-mode-unsubscribe@xxxxxxxxxxxxxxx
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|