Loading ...
Sorry, an error occurred while loading the content.

Using rng*.el for css mode

Expand Messages
  • Lennart Borgman
    Would it be possible to use the rng*.el files that comes with nxml-mode to write a new mode for CSS files? Any tips about what is needed to do that?
    Message 1 of 9 , Jul 19 5:15 PM
    • 0 Attachment
      Would it be possible to use the rng*.el files that comes with nxml-mode
      to write a new mode for CSS files? Any tips about what is needed to do that?
    • Florent Georges
      Lennart Borgman wrote: Hi ... It depends what you want to do. I guess this is about completion against a schema? So you can use rng-c-parse-file to parse
      Message 2 of 9 , Jul 20 9:35 AM
      • 0 Attachment
        Lennart Borgman wrote:

        Hi

        > Would it be possible to use the rng*.el files that comes with
        > nxml-mode to write a new mode for CSS files? Any tips about
        > what is needed to do that?

        It depends what you want to do. I guess this is about completion
        against a schema? So you can use 'rng-c-parse-file' to parse an RNC
        schema. The structure of its result is documented at the top of
        rng-pttrn.el.

        Regards,

        --drkm



























        ___________________________________________________________________________
        Découvrez un nouveau moyen de poser toutes vos questions quelque soit le sujet !
        Yahoo! Questions/Réponses pour partager vos connaissances, vos opinions et vos expériences.
        http://fr.answers.yahoo.com
      • Chris Chiasson
        isn t there already an emacs major mode for css? ... -- http://chris.chiasson.name/
        Message 3 of 9 , Jul 20 9:54 AM
        • 0 Attachment
          isn't there already an emacs major mode for css?

          On 7/20/06, Florent Georges <darkman_spam@...> wrote:
          > Lennart Borgman wrote:
          >
          > Hi
          >
          > > Would it be possible to use the rng*.el files that comes with
          > > nxml-mode to write a new mode for CSS files? Any tips about
          > > what is needed to do that?
          >
          > It depends what you want to do. I guess this is about completion
          > against a schema? So you can use 'rng-c-parse-file' to parse an RNC
          > schema. The structure of its result is documented at the top of
          > rng-pttrn.el.
          >
          > Regards,
          >
          > --drkm
          >
          >
          >
          >
          >
          >
          >
          >
          >
          >
          >
          >
          >
          >
          >
          >
          >
          >
          >
          >
          >
          >
          >
          >
          >
          >
          >
          > ___________________________________________________________________________
          > Découvrez un nouveau moyen de poser toutes vos questions quelque soit le sujet !
          > Yahoo! Questions/Réponses pour partager vos connaissances, vos opinions et vos expériences.
          > http://fr.answers.yahoo.com
          >
          >
          >
          >
          >
          > Yahoo! Groups Links
          >
          >
          >
          >
          >
          >
          >
          >


          --
          http://chris.chiasson.name/
        • Edward O'Connor
          [This is a re-send; apologies if it shows up on the list twice.] ... Several even. I ve tried several and have been most happy with this one:
          Message 4 of 9 , Jul 20 10:43 AM
          • 0 Attachment
            [This is a re-send; apologies if it shows up on the list twice.]

            Chris Chiasson wrote:

            > isn't there already an emacs major mode for css?

            Several even. I've tried several and have been most happy with this one:

            http://www.garshol.priv.no/download/software/css-mode/css-mode.el


            Ted

            --
            Edward O'Connor
            hober0@...

            Ense petit placidam sub libertate quietem.
          • Florent Georges
            ... I didn t study it in details, but it seems to not support completion against a schema. Since Lennart (mmh, he was Lennart, right?) spook about rng-*.el
            Message 5 of 9 , Jul 20 11:28 AM
            • 0 Attachment
              Edward O'Connor wrote:

              > > isn't there already an emacs major mode for css?

              > Several even. I've tried several and have been most happy with this
              > one:

              > http://www.garshol.priv.no/download/software/css-mode/css-mode.el

              I didn't study it in details, but it seems to not support completion
              against a schema. Since Lennart (mmh, he was Lennart, right?) spook
              about rng-*.el libraries, I guess he plans to provide such a completion
              system (it is just a guess).

              As I never wrote a complex CSS file, I don't know if it could be
              usefull (but I guess so).

              Regards,

              --drkm




























              ___________________________________________________________________________
              Découvrez un nouveau moyen de poser toutes vos questions quelque soit le sujet !
              Yahoo! Questions/Réponses pour partager vos connaissances, vos opinions et vos expériences.
              http://fr.answers.yahoo.com
            • Lennart Borgman
              ... Thanks drkm, that was what I had in mind. Context sensitive completion. I will have a look and see how much trouble it is.
              Message 6 of 9 , Jul 20 12:44 PM
              • 0 Attachment
                Florent Georges wrote:
                > Lennart Borgman wrote:
                >
                > Hi
                >
                >
                >> Would it be possible to use the rng*.el files that comes with
                >> nxml-mode to write a new mode for CSS files? Any tips about
                >> what is needed to do that?
                >>
                >
                > It depends what you want to do. I guess this is about completion
                > against a schema? So you can use 'rng-c-parse-file' to parse an RNC
                > schema. The structure of its result is documented at the top of
                > rng-pttrn.el.
                >
                > Regards,
                >
                > --drkm
                >
                Thanks drkm, that was what I had in mind. Context sensitive completion.
                I will have a look and see how much trouble it is.
              • Florent Georges
                Lennart Borgman wrote: Hi ... You can also take a look at nxml-complete to see an example of use. Note I never look at this code, so I don t know if it is
                Message 7 of 9 , Jul 20 12:53 PM
                • 0 Attachment
                  Lennart Borgman wrote:

                  Hi

                  > Thanks drkm, that was what I had in mind. Context sensitive
                  > completion.
                  > I will have a look and see how much trouble it is.

                  You can also take a look at 'nxml-complete' to see an example of use.
                  Note I never look at this code, so I don't know if it is complex or
                  not (it has to deal with the context maintained by nXML, but in this
                  context I guess that's not too complex).

                  Regards,

                  --drkm


























                  ___________________________________________________________________________
                  Découvrez un nouveau moyen de poser toutes vos questions quelque soit le sujet !
                  Yahoo! Questions/Réponses pour partager vos connaissances, vos opinions et vos expériences.
                  http://fr.answers.yahoo.com
                • Lennart Borgman
                  ... Thanks Ted. I know about these modes (from http://www.emacswiki.org/cgi-bin/wiki/CascadingStyleSheetMode). However does any of those have context sensitive
                  Message 8 of 9 , Jul 20 1:04 PM
                  • 0 Attachment
                    Edward O'Connor wrote:
                    > [This is a re-send; apologies if it shows up on the list twice.]
                    >
                    > Chris Chiasson wrote:
                    >
                    >
                    >> isn't there already an emacs major mode for css?
                    >>
                    >
                    > Several even. I've tried several and have been most happy with this one:
                    >
                    > http://www.garshol.priv.no/download/software/css-mode/css-mode.el
                    >
                    Thanks Ted. I know about these modes (from
                    http://www.emacswiki.org/cgi-bin/wiki/CascadingStyleSheetMode). However
                    does any of those have context sensitive completion?
                  • Lennart Borgman
                    ... I have played a little bit with nxtml-complete in nxhtml-mode and I did find it rather complex. However in the case of css it looks much easier to restart
                    Message 9 of 9 , Jul 20 1:11 PM
                    • 0 Attachment
                      Florent Georges wrote:
                      > Lennart Borgman wrote:
                      >
                      > Hi
                      >
                      >
                      >> Thanks drkm, that was what I had in mind. Context sensitive
                      >> completion.
                      >> I will have a look and see how much trouble it is.
                      >>
                      >
                      > You can also take a look at 'nxml-complete' to see an example of use.
                      > Note I never look at this code, so I don't know if it is complex or
                      > not (it has to deal with the context maintained by nXML, but in this
                      > context I guess that's not too complex).
                      >
                      I have played a little bit with nxtml-complete in nxhtml-mode and I did
                      find it rather complex. However in the case of css it looks much easier
                      to restart the parsing.

                      A problem is of course that much of this is over my head. But since
                      someone (JC) has done the difficult parts maybe it is possible to borrow
                      some small things ... ;-)
                    Your message has been successfully submitted and would be delivered to recipients shortly.