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

Re: PHP validation/tags

Expand Messages
  • smithno999
    A quick work around until you can get the syntax check on save working is to set up the syntax check as a tool. It s pretty straight forward to do and is
    Message 1 of 6 , May 19, 2005
    • 0 Attachment
      A quick work around until you can get the syntax check on save working
      is to set up the syntax check as a tool. It's pretty straight forward
      to do and is already built in. I did that to parse SGML documents
      with NSGMLS.

      Norm

      --- In jasspa@yahoogroups.com, first last <prelude_2_murder@y...>
      wrote:
      > Hi everyone,
      >
      > after using Eclipse for a while, there's a couple of things that I
      > would like to implement in ME (well, quite a few, apart from the
      > slowness).
      >
      > -Syntax check on save. Initially I plan to use php -l (lint), which
      > gives you an error message and the line where it fails (just one).
      My
      > intention is to have a small bottom window open with the error code
      (if
      > any) and then have it highlight the line in red (the highlight
      should
      > dissapear as soon as the line changes). On the long term I plan to
      > find/write a decent parser to check the full syntax and issue
      warnings
      > apart from errors.
      >
    • first last
      Thanks, that works great. Now... how can I run it on saving a php file? Also, has the ^C^D shortcut (change dir) been removed? Doesn t seem to work here
      Message 2 of 6 , May 19, 2005
      • 0 Attachment
        Thanks, that works great. Now... how can I run it on saving a php file?

        Also, has the ^C^D shortcut (change dir) been removed? Doesn't seem to
        work here (linux, latest ME version)

        --- smithno999 <smithno@...> wrote:
        ---------------------------------
        A quick work around until you can get the syntax check on save working
        is to set up the syntax check as a tool. It's pretty straight forward
        to do and is already built in. I did that to parse SGML documents
        with NSGMLS.

        Norm

        --- In jasspa@yahoogroups.com, first last <prelude_2_murder@y...>
        wrote:
        > Hi everyone,
        >
        > after using Eclipse for a while, there's a couple of things that I
        > would like to implement in ME (well, quite a few, apart from the
        > slowness).
        >
        > -Syntax check on save. Initially I plan to use php -l (lint), which
        > gives you an error message and the line where it fails (just one).
        My
        > intention is to have a small bottom window open with the error code
        (if
        > any) and then have it highlight the line in red (the highlight
        should
        > dissapear as soon as the line changes). On the long term I plan to
        > find/write a decent parser to check the full syntax and issue
        warnings
        > apart from errors.
        >





        __________________________________________________________________________

        This is an unmoderated list. JASSPA is not responsible for the content
        of
        any material posted to this list.

        To unsubscribe, send a mail message to

        mailto:jasspa-unsubscribe@yahoogroups.com

        or visit http://groups.yahoo.com/group/jasspa and
        modify your account settings manually.






        ---------------------------------
        Yahoo! Groups Links

        To visit your group on the web, go to:
        http://groups.yahoo.com/group/jasspa/

        To unsubscribe from this group, send an email to:
        jasspa-unsubscribe@yahoogroups.com

        Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



        ___________________________________________________________
        How much free photo storage do you get? Store your holiday
        snaps for FREE with Yahoo! Photos http://uk.photos.yahoo.com
      • Steven Phillips
        ... I would create a new php-save-buffer function which called save-buffer first and then your processing stuff and then in your my-fhook-php (which should be
        Message 3 of 6 , May 19, 2005
        • 0 Attachment
          > Subject: [jasspa] Re: PHP validation/tags
          > From: first last <prelude_2_murder@...>
          > Date: Thursday, May 19, 2005, 3:22:03 PM
          > To: jasspa@yahoogroups.com

          > Thanks, that works great. Now... how can I run it on saving a php file?

          I would create a new php-save-buffer function which called save-buffer first
          and then your processing stuff and then in your my-fhook-php (which should be
          in the file myphp.emf) use buffer-bind-key to bind your new php-save-buffer to
          C-x C-s (or which ever binding you use. i.e.

          ---- myphp.emf -----
          define-macro php-save-buffer
          save-buffer @mna
          ....
          !emacro

          define-macro my-fhook-php
          buffer-bind-key php-save-buffer "C-x C-s"
          !emacro
          -------------------

          > Also, has the ^C^D shortcut (change dir) been removed? Doesn't seem to
          > work here (linux, latest ME version)

          This function was removed as redundant, it's only use was to change the base
          path of commands when run from a buffer with no file name, as the path could
          not be queried I fould it too dangerous to rely on (in macros etc) so it was
          and should not and now cannot be used.

          The safer method is to simply load the directory (use C-x C-f as normal) and
          run the command from that buffer, this will have the same effect and you will
          know for sure which directory it is running from.

          Steve

          > --- smithno999 <smithno@...> wrote:
          > ---------------------------------
          > A quick work around until you can get the syntax check on save working
          > is to set up the syntax check as a tool. It's pretty straight forward
          > to do and is already built in. I did that to parse SGML documents
          > with NSGMLS.

          > Norm

          > --- In jasspa@yahoogroups.com, first last <prelude_2_murder@y...>
          > wrote:
          >> Hi everyone,
          >>
          >> after using Eclipse for a while, there's a couple of things that I
          >> would like to implement in ME (well, quite a few, apart from the
          >> slowness).
          >>
          >> -Syntax check on save. Initially I plan to use php -l (lint), which
          >> gives you an error message and the line where it fails (just one).
          > My
          >> intention is to have a small bottom window open with the error code
          > (if
          >> any) and then have it highlight the line in red (the highlight
          > should
          >> dissapear as soon as the line changes). On the long term I plan to
          >> find/write a decent parser to check the full syntax and issue
          > warnings
          >> apart from errors.
          >>





          > __________________________________________________________________________

          > This is an unmoderated list. JASSPA is not responsible for the content
          > of
          > any material posted to this list.

          > To unsubscribe, send a mail message to

          > mailto:jasspa-unsubscribe@yahoogroups.com

          > or visit http://groups.yahoo.com/group/jasspa and
          > modify your account settings manually.






          > ---------------------------------
          > Yahoo! Groups Links

          > To visit your group on the web, go to:
          > http://groups.yahoo.com/group/jasspa/

          > To unsubscribe from this group, send an email to:
          > jasspa-unsubscribe@yahoogroups.com

          > Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



          > ___________________________________________________________
          > How much free photo storage do you get? Store your holiday
          > snaps for FREE with Yahoo! Photos http://uk.photos.yahoo.com


          > __________________________________________________________________________

          > This is an unmoderated list. JASSPA is not responsible for the content of
          > any material posted to this list.

          > To unsubscribe, send a mail message to

          > mailto:jasspa-unsubscribe@yahoogroups.com

          > or visit http://groups.yahoo.com/group/jasspa and
          > modify your account settings manually.



          > Yahoo! Groups Links
        • Jon Green
          ... If you want to run something on saving then the best thing to do is rebind C-x C-s save-buffer to php-save-buffer (say) using a buffer key binding and
          Message 4 of 6 , May 19, 2005
          • 0 Attachment
            first last wrote:
            > Thanks, that works great. Now... how can I run it on saving a php file?

            If you want to run something on saving then the best thing to do is rebind "C-x C-s"
            save-buffer to php-save-buffer (say) using a buffer key binding and then do what you need to
            do in "php-save-buffer" including the actual buffer save. If the check failed then I guess
            you leave the user in the buffer. See "Writing MicroEmacs Macros" on main help page towards
            the bottom for some information on writing macros.

            >
            > Also, has the ^C^D shortcut (change dir) been removed? Doesn't seem to
            > work here (linux, latest ME version)
            >

            Alas ^C^D has died a death due to the fact it had no real use. The buffer location
            effectivelly tracks the directory location. ^X^F to open a file you can change the directory
            and create a new file, the file is created in the given directory.
            You could bind ^C^D to file-browser i.e

            global-bind-key "C-x C-d" file-browser

            Change log says following:-

            [041210] Removed the change-directory commands, a change in directory is
            achieved by changing the "$buffer-fname" value such that the path
            defines the location of the command. All macros operated relative
            to the buffer location and never explicitly changed the directory
            location.


            Jon.

            > --- smithno999 <smithno@...> wrote:
            > ---------------------------------
            > A quick work around until you can get the syntax check on save working
            > is to set up the syntax check as a tool. It's pretty straight forward
            > to do and is already built in. I did that to parse SGML documents
            > with NSGMLS.
            >
            > Norm
            >
            > --- In jasspa@yahoogroups.com, first last <prelude_2_murder@y...>
            > wrote:
            >
            >>Hi everyone,
            >>
            >>after using Eclipse for a while, there's a couple of things that I
            >>would like to implement in ME (well, quite a few, apart from the
            >>slowness).
            >>
            >>-Syntax check on save. Initially I plan to use php -l (lint), which
            >>gives you an error message and the line where it fails (just one).
            >
            > My
            >
            >>intention is to have a small bottom window open with the error code
            >
            > (if
            >
            >>any) and then have it highlight the line in red (the highlight
            >
            > should
            >
            >>dissapear as soon as the line changes). On the long term I plan to
            >>find/write a decent parser to check the full syntax and issue
            >
            > warnings
            >
            >>apart from errors.
            >>
          • Jon Green
            ... Opps! or rather: global-bind-key file-browser C-x C-d
            Message 5 of 6 , May 19, 2005
            • 0 Attachment
              Jon Green wrote:
              > first last wrote:
              >
              >>Thanks, that works great. Now... how can I run it on saving a php file?
              >
              >
              > If you want to run something on saving then the best thing to do is rebind "C-x C-s"
              > save-buffer to php-save-buffer (say) using a buffer key binding and then do what you need to
              > do in "php-save-buffer" including the actual buffer save. If the check failed then I guess
              > you leave the user in the buffer. See "Writing MicroEmacs Macros" on main help page towards
              > the bottom for some information on writing macros.
              >
              >
              >>Also, has the ^C^D shortcut (change dir) been removed? Doesn't seem to
              >>work here (linux, latest ME version)
              >>
              >
              >
              > Alas ^C^D has died a death due to the fact it had no real use. The buffer location
              > effectivelly tracks the directory location. ^X^F to open a file you can change the directory
              > and create a new file, the file is created in the given directory.
              > You could bind ^C^D to file-browser i.e
              >
              > global-bind-key "C-x C-d" file-browser

              Opps! or rather:
              global-bind-key file-browser "C-x C-d"
            Your message has been successfully submitted and would be delivered to recipients shortly.