Re: Is it OK to use 'compile' and 'run' for hypertext documents?

From: mitchell <mforal.n....at.gmail.com>
Date: Fri, 9 Apr 2010 19:51:43 -0700 (PDT)

Hi,

On Apr 7, 12:11 pm, Robert <ro....at.web.de> wrote:
> On Apr 7, 4:36 am, mitchell <mforal.n....at.gmail.com> wrote:
>
> > Russell,
>
> > On Apr 6, 6:01 pm, phayz <russelldicken....at.gmail.com> wrote:
>
> > > In browsing Textadept's source code - specifically "run.lua" I
> > > discovered the customisation options for the 'run' and 'compile' menu
> > > options. I wonder if these could be applied to hypertext documents?
> > > For example, the 'compile' option could run the Tidy utility, which
> > > checks the validity of the document, and the 'run' option could open
> > > the document in the user's default web browser. I know that someone
> > > recently contributed code for the "open active buffer in user's
> > > default web browser" function. My hope is that the Tidy utility's
> > > messages could be output to the message buffer and errors on specific
> > > lines would allow the user to double click on the message and be taken
> > > to the line in which the warning or error occurs. If I understand
> > > "run.lua" correctly, this behaviour is native for the 'compile' option
> > > for files in various languages.
>
> > > Of course anything's possible - particularly with Textadept (:P) - but
> > > my main reason for asking was to check if this as an "abuse" of these
> > > options. Might there be some sort of horrible side effect in using
> > > 'compile' in the way I'm thinking of using it?
>
> > Sounds fine to me. I'll accept a patch.
>
> > Better yet I should have the module look in ~/.textadept/, huh
> > Robert? :)
>
> Hmm? Sorry, I must've been day-dreaming. Ohh... I would think this
> functionality would belong into the language modules. :-)

I like this idea. In hg (r559). Instead of creating lang modules, you
can add stuff to your init.lua. I put this on the wiki.

http://caladbolg.net/textadeptwiki/index.php?n=Main.RunSupplemental

Note this doesn't work in 2.2 beta, only latest hg.

Mitchell

> While talking about it, would it be possible to read the line-comment
> string from the definition in the respective lexer and have this used
> for the ctrl-q commenting function? So each language with a line-
> comment could be easily commented this way?
>
> Robert
Received on Fri 09 Apr 2010 - 22:51:43 EDT

This archive was generated by hypermail 2.2.0 : Thu 08 Mar 2012 - 11:42:28 EST