all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* A debugging puzzle with XML
@ 2015-01-28 17:33 Marcin Borkowski
  2015-01-29 10:46 ` Nicolas Richard
  0 siblings, 1 reply; 3+ messages in thread
From: Marcin Borkowski @ 2015-01-28 17:33 UTC (permalink / raw
  To: Help Gnu Emacs mailing list

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



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-01-29 11:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-28 17:33 A debugging puzzle with XML Marcin Borkowski
2015-01-29 10:46 ` Nicolas Richard
2015-01-29 11:07   ` Marcin Borkowski

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.