From: Marcin Borkowski <mbork@wmi.amu.edu.pl>
To: Help Gnu Emacs mailing list <help-gnu-emacs@gnu.org>
Subject: A debugging puzzle with XML
Date: Wed, 28 Jan 2015 18:33:52 +0100 [thread overview]
Message-ID: <87a912ernj.fsf@wmi.amu.edu.pl> (raw)
Hi there,
as we all know, everything is better with XML, so here's a puzzle for
all interested (I call it a puzzle and not a bug because I finally
solved it).
Download the xmlgen library (https://github.com/philjackson/xmlgen) and
execute this code:
(require 'xmlgen)
(with-temp-file "foo.xml"
(insert (xmlgen '(hello (world (of (xml) "!")))))).
Visit file foo.xml, do this:
C-x h M-x sgml-pretty-print
and enjoy your beautifully formatted (and indented!) XML code.
Now rinse and repeat, but with one change:
(require 'xmlgen)
(with-temp-file "foo.xml"
(insert (xmlgen '(hello (world (of (xml) "!")))))
(sgml-pretty-print (point-min) (point-max)))
and answer this question: where have all the indents go?
;-D
Best,
--
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Faculty of Mathematics and Computer Science
Adam Mickiewicz University
next reply other threads:[~2015-01-28 17:33 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-28 17:33 Marcin Borkowski [this message]
2015-01-29 10:46 ` A debugging puzzle with XML Nicolas Richard
2015-01-29 11:07 ` Marcin Borkowski
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87a912ernj.fsf@wmi.amu.edu.pl \
--to=mbork@wmi.amu.edu.pl \
--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.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.