From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Florent Georges Newsgroups: gmane.emacs.nxml.general,gmane.emacs.help 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) Message-ID: <20060518081653.68924.qmail@web25810.mail.ukl.yahoo.com> References: <446B638D.5070201@student.lu.se> Reply-To: emacs-nxml-mode@yahoogroups.com NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: sea.gmane.org 1147940246 1671 80.91.229.2 (18 May 2006 08:17:26 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 18 May 2006 08:17:26 +0000 (UTC) Cc: help-gnu-emacs@gnu.org Original-X-From: sentto-10952198-1345-1147940229-geng-emacs-nxml-mode=m.gmane.org@returns.groups.yahoo.com Thu May 18 10:17:23 2006 Return-path: Envelope-to: geng-emacs-nxml-mode@m.gmane.org Original-Received: from n17a.bullet.scd.yahoo.com ([66.94.237.46]) by ciao.gmane.org with smtp (Exim 4.43) id 1Fgdh5-00054M-1y for geng-emacs-nxml-mode@m.gmane.org; Thu, 18 May 2006 10:17:15 +0200 Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=lima; d=yahoogroups.com; b=tGjDYKF6x9WeJhihHGt16gJ2uN9ULupKq89Lt7UHdxW8hivF1WPWQKJKXCQpxI2uf2To7r8Pl1wVLdq1uhoDlmxFv6PiazpfTFyZ8S5QckygkUlBpmNHPcfs19J8rXxd; Original-Received: from [66.218.69.4] by n17.bullet.scd.yahoo.com with NNFMP; 18 May 2006 08:17:09 -0000 Original-Received: from [66.218.66.33] by t4.bullet.scd.yahoo.com with NNFMP; 18 May 2006 08:17:09 -0000 X-Yahoo-Newman-Property: groups-email X-Yahoo-Newman-Id: 10952198-m1345 X-Sender: darkman_spam@yahoo.fr X-Apparently-To: emacs-nxml-mode@yahoogroups.com Original-Received: (qmail 38034 invoked from network); 18 May 2006 08:17:08 -0000 Original-Received: from unknown (66.218.66.166) by m27.grp.scd.yahoo.com with QMQP; 18 May 2006 08:17:08 -0000 Original-Received: from unknown (HELO web25810.mail.ukl.yahoo.com) (217.12.10.195) by mta5.grp.scd.yahoo.com with SMTP; 18 May 2006 08:17:08 -0000 Original-Received: (qmail 68926 invoked by uid 60001); 18 May 2006 08:16:53 -0000 Original-Received: from [193.178.209.194] by web25810.mail.ukl.yahoo.com via HTTP; Thu, 18 May 2006 10:16:53 CEST Original-To: emacs-nxml-mode@yahoogroups.com, arndt.jonasson@gmail.com In-Reply-To: <446B638D.5070201@student.lu.se> X-Originating-IP: 217.12.10.195 X-eGroups-Msg-Info: 1:12:0:0 X-Yahoo-Profile: darkman_spam Original-Sender: emacs-nxml-mode@yahoogroups.com Mailing-List: list emacs-nxml-mode@yahoogroups.com; contact emacs-nxml-mode-owner@yahoogroups.com List-Id: Precedence: bulk List-Unsubscribe: Xref: news.gmane.org gmane.emacs.nxml.general:1232 gmane.emacs.help:35129 Archived-At: Lennart Borgman wrote: > arndt.jonasson@gmail.com wrote: Hi > > > > > > > > oh > > > > > > > > point is here > > > > > > > > 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/