unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* htmlize.sh
@ 2009-03-27 20:25 Volkan YAZICI
  2009-03-27 22:30 ` htmlize.sh Marek Kubica
  2009-04-04 21:32 ` htmlize.sh Thien-Thi Nguyen
  0 siblings, 2 replies; 4+ messages in thread
From: Volkan YAZICI @ 2009-03-27 20:25 UTC (permalink / raw)
  To: help-gnu-emacs

Hi,

I've been looking for a syntax highlighter to integrate into texinfo
to be able to colorize @lisp ... @end blocks. Actually, not just a
syntax highlighting tool, I also want to be able to supply links to
certain commands. (E.g. CLHS and MOP links to related Common Lisp
commands.) Below are some of my experiences during my research.

- I first tried my luck with Syntax::Highlight::Engine::Kate module.
(Hey, texi2html is also written in Perl, should be easy to integrate.)
But it doesn't take long to figure out that it is quite broken for
Lisp family of programming languages.

- You know that flashy http://paste.lisp.org/ pastebin, and it's code
is a F/OSS. Despite it took a half of a day to decouple lisppaste from
its unnecessary dependencies (e.g. araneida web server!), at the end
I'm disappointed by the fact that I need to implement my own parsing
routines for every other programming language.

Long story, eh? At last, I end up with writing a small emacs shell
script, called htmlize.sh[1][2], wrapped around htmlize.el[3].
Furthermore, htmlize.sh has an extensible syntax  recognition
enhancement module that you can introduce new functionalities
relatively in ease;  e.g., it provides CLHS and MOP symbol linking
capabities for lisp-mode. I hope you find it useful too. (Did I say
htmlize.sh is capable of syntax highlighting every piece of code that
emacs is capable of?)


Regards.

P.S. Sorry for cross-posting. I thought Scheme guys might want to
contribute some RNRS linking stuff too.

[1] http://www.students.itu.edu.tr/~yazicivo/files/htmlize.tar.gz
[2] http://www.students.itu.edu.tr/~yazicivo/files/htmlize.README.txt
[3] http://www.emacswiki.org/emacs/Htmlize


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

* Re: htmlize.sh
  2009-03-27 20:25 htmlize.sh Volkan YAZICI
@ 2009-03-27 22:30 ` Marek Kubica
  2009-03-28  6:49   ` htmlize.sh Volkan YAZICI
  2009-04-04 21:32 ` htmlize.sh Thien-Thi Nguyen
  1 sibling, 1 reply; 4+ messages in thread
From: Marek Kubica @ 2009-03-27 22:30 UTC (permalink / raw)
  To: help-gnu-emacs

On Fri, 27 Mar 2009 13:25:10 -0700 (PDT)
Volkan YAZICI <volkan.yazici@gmail.com> wrote:

> Hi,
> 
> I've been looking for a syntax highlighter to integrate into texinfo
> to be able to colorize @lisp ... @end blocks. Actually, not just a
> syntax highlighting tool, I also want to be able to supply links to
> certain commands. (E.g. CLHS and MOP links to related Common Lisp
> commands.) Below are some of my experiences during my research.
> 
> - I first tried my luck with Syntax::Highlight::Engine::Kate module.
> (Hey, texi2html is also written in Perl, should be easy to integrate.)
> But it doesn't take long to figure out that it is quite broken for
> Lisp family of programming languages.
> 
> - You know that flashy http://paste.lisp.org/ pastebin, and it's code
> is a F/OSS. Despite it took a half of a day to decouple lisppaste from
> its unnecessary dependencies (e.g. araneida web server!), at the end
> I'm disappointed by the fact that I need to implement my own parsing
> routines for every other programming language.

Well, you probably could've used Pygments. It has a (LaTeX) interface
called Texments, maybe that would help you?
It supports Common Lisp, Scheme (to some extent, some things are
missing yet) and Clojure.

regards,
Marek


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

* Re: htmlize.sh
  2009-03-27 22:30 ` htmlize.sh Marek Kubica
@ 2009-03-28  6:49   ` Volkan YAZICI
  0 siblings, 0 replies; 4+ messages in thread
From: Volkan YAZICI @ 2009-03-28  6:49 UTC (permalink / raw)
  To: help-gnu-emacs

On Mar 28, 12:30 am, Marek Kubica <ma...@xivilization.net> wrote:
> Well, you probably could've used Pygments. It has a (LaTeX) interface
> called Texments, maybe that would help you?

(I didn't know about Texments, I'll check that.) I tried Pygments too,
but I also needed to hack the sources to be able to introduce CLHS,
MOP, etc. linking stuff. I found it easier to hack some elisp file on-
the-fly via emacs, than hacking a piece of python code that I'm not
familiar with.

> It supports Common Lisp, Scheme (to some extent, some things are
> missing yet) and Clojure.

I like the *completeness* of emacs in such scenarios. (On the other
hand, if I'm not mistaken, emacs supports much more languages than any
other syntax highlighting tools in the wild.)


Regards.


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

* Re: htmlize.sh
  2009-03-27 20:25 htmlize.sh Volkan YAZICI
  2009-03-27 22:30 ` htmlize.sh Marek Kubica
@ 2009-04-04 21:32 ` Thien-Thi Nguyen
  1 sibling, 0 replies; 4+ messages in thread
From: Thien-Thi Nguyen @ 2009-04-04 21:32 UTC (permalink / raw)
  To: Volkan YAZICI; +Cc: help-gnu-emacs

() Volkan YAZICI <volkan.yazici@gmail.com>
() Fri, 27 Mar 2009 13:25:10 -0700 (PDT)

   P.S. Sorry for cross-posting. I thought Scheme guys might want to
   contribute some RNRS linking stuff too.

No worries.  Thanks for making that code available.  FWIW, i wrap
htmlize.el as well, but do Scheme-specific styling (in Scheme)...

For example, <http://www.gnuvola.org/software/ttn-do/scm-html/>
  (specifically htmlize-scheme.scm.html.gz)

The more general approach (and sticking w/ Emacs Lisp) is appealing,
however.  Maybe a good time to try out htmlize.sh.

thi




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

end of thread, other threads:[~2009-04-04 21:32 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-27 20:25 htmlize.sh Volkan YAZICI
2009-03-27 22:30 ` htmlize.sh Marek Kubica
2009-03-28  6:49   ` htmlize.sh Volkan YAZICI
2009-04-04 21:32 ` htmlize.sh Thien-Thi Nguyen

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).