Run Command Variable Substitution $(FULL_CURRENT_PATH)

  • I used to be able to use this command as a run command:
    C:\emacs-24.1\bin\emacs.exe -batch $(FULL_CURRENT_PATH) -f vhdl-beautify-buffer -f save-buffer

    After upgrading to 7.4.1 from 7.3.x it fails with the following error:

    The symbols definition function is void “vhdl-beautify-buffer”

    After running some command line batch file tests I’ve determined than NPP in not substituting the $(FULL_CURRENT_PATH) correctly.

    If in the run command I manually substitute the desired path/file in place of $(FULL_CURRENT_PATH) the run command runs on the designated file.

    So my question is did that variable substitution change in 7.4.x? I spent some time looking for some kind reference for this variable but have not had any luck which is why I’m here.

    Ray Haynes

  • @Ray-Haynes

    if you use the following command with one of your files


    it should open a cmd window complaining about the substituted path not being a command.

    What does it show and what do you expect that it shows?


  • @Claudia-Frank said:


    F5 and paste the above command and I get this:

    ‘new’ is not recognized as an internal or external command,
    operable program or batch file.

    I have no idea what to make of that.

  • Does NPP pass the FULL_CURRENT_PATH as an environment variable? If so when the set command is run within in a command prompt created by the F5 run command I don’t see that variable in the list. I’m guessing that’s what the 'new" from my above experiment is from. If so it’s looking like it’s either a bug or some kind of permission issues. I’m running W7-64 with an admin login in so there’s not much I can do to improve the permission issue. I give a couple of days for responses then I’m going to post this to the bug section.

  • @Ray-Haynes said:

    I have no idea what to make of that.

    You ran the command on a “new 1” file (the number may be 1, 2, 3, etc.), which makes no real sense to do as those files haven’t been saved yet. Well, maybe it makes some sense, as the error you get is consistent with Notepad++ substituting “new 1” in for $(FULL_CURRENT_PATH) and then trying to run:

    cmd /K new 1

    To truly do what @Claudia-Frank asked, I’d suggest doing this cmd /K test with a file that has actually been saved into the file system.

    No, it doesn’t use environment variables to do this.

    Hold off on the bug report as there aren’t any clear signs that there is a bug here.

  • I can’t try 7.4.1 but with 7.4.2 if I try via the Run… menu:

    cmd /K dir $(FULL_CURRENT_PATH)

    with the Notepad++ readme.txt file in the editor window at the time, I get this output in the cmd window:

     Volume in drive C is OSDisk
     Volume Serial Number is 787E-4E38
     Directory of C:\Users\xxxxxxx\Desktop\npp.7.4.2.bin
    01/19/2017  04:26 AM             1,450 readme.txt
                   1 File(s)          1,450 bytes
                   0 Dir(s)  89,007,390,720 bytes free

    This seems to indicate that all is working OK with $(FULL_CURRENT_PATH) in this version.

    Note that I added the “dir” to the command for a more definitive test on my system.

  • Thanks for the replies. I uninstalled NPP and reinstalled it and now it works. Don’t know what happened.

  • Just in case anyone stumbles across this thread in the future there is a little detail about quotes. If you have spaces in your path you must put quotes around the $(FULL_CURRENT_PATH) variable, i.e. “$(FULL_CURRENT_PATH)”. The lack of quotes was complicating my trials above and I had some new issues today that were caused by the lack of quotes.

Log in to reply