From: Florent Georges <darkman_spam@yahoo.fr>
Cc: help-gnu-emacs@gnu.org
Subject: RE: Re: Command in nxml-mode to show the current place in the structure (path)?
Date: Thu, 18 May 2006 10:16:53 +0200 (CEST) [thread overview]
Message-ID: <20060518081653.68924.qmail@web25810.mail.ukl.yahoo.com> (raw)
In-Reply-To: <446B638D.5070201@student.lu.se>
Lennart Borgman wrote:
> arndt.jonasson@gmail.com wrote:
Hi
> > <e>
> > <a>
> > <b>
> > oh
> > </b>
> > <c/>
> > <d>
> > point is here
> > </d>
> > </a>
> > </e>
> > The command in question should show something like /e/a/d
> Maybe you will have more luck asking this on the nxml-mode
> mailing list?
I took the code of the OP, and did a few changes, then I
have:
(defun drkm-nxml:ancestor-axis-path ()
"Returns all the elements in the ancestor axis of the current
element. If called interactively, show it in the echo area."
(interactive)
(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)))
path))
This seems to work. But I didn't check all cases nor
functions used. There is still the problem of the
namespaces. And the trick with the CONDITION-CASE is not
satisfactory, IMHO.
But it could be usable in some cases.
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 --------------------~-->
You can search right from your browser? It's easy and it's free. See how.
http://us.click.yahoo.com/_7bhrC/NGxNAA/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@yahoogroups.com
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
next prev parent reply other threads:[~2006-05-18 8:16 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-17 14:52 Command in nxml-mode to show the current place in the structure (path)? arndt.jonasson
2006-05-17 16:02 ` Command in nxml-mode to show the current place in the structure(path)? Drew Adams
2006-05-17 18:02 ` Lennart Borgman
2006-05-17 17:55 ` Command in nxml-mode to show the current place in the structure (path)? Lennart Borgman
2006-05-18 8:16 ` Florent Georges [this message]
2006-05-18 8:30 ` Florent Georges
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060518081653.68924.qmail@web25810.mail.ukl.yahoo.com \
--to=darkman_spam@yahoo.fr \
--cc=emacs-nxml-mode@yahoogroups.com \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).