logo       
Google Custom Search
    AddThis Social Bookmark Button
-->

RE: Re: Command in nxml-mode to show the current place in the structure (pa: msg#00013

Subject: RE: Re: Command in nxml-mode to show the current place in the structure (path)?
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/
 





<Prev in Thread] Current Thread [Next in Thread>