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

Re: [jasspa] Re: PHP validation/tags

Expand Messages
  • 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 1 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 2 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.