Macros disappear on v8.6.8
-
I always hate updating N++ because I seem to always have a fight with Macros. I had a version AFTER 8.5.3 and had them working fine. I back up the shortcuts.xml file every time and copy it back in no big deal, they work fine. Today I updated to v8.6.8 and they will not work. I have copied them over from a working backup file to the new shortcuts.xml. I have copied the backup and just renamed it to shortcuts.xml and I have created a new quick macro just to find the correct shortcuts.xml file. When copy over the backup to the new shortcuts file then try to save a macro it wipes out the data that is in there and replaces it with the new macro, instead of adding it. I’m not sure what do try now. Can someone point me to the setting or correction to get the macros working?
Here is my debug info
Notepad++ v8.6.8 (64-bit)
Build time : Jun 4 2024 - 00:30:00
Path : C:\Program Files\Notepad++\notepad++.exe
Command Line :
Admin mode : OFF
Local Conf mode : OFF
Cloud Config : OFF
Periodic Backup : ON
OS Name : Windows 11 Enterprise (64-bit)
OS Version : 23H2
OS Build : 22631.3737
Current ANSI codepage : 1252
Plugins :
mimeTools (3.1)
NppConverter (4.6)
NppExport (0.4) -
Make sure you aren’t doing the
shortcuts.xml
copy when you have Notepad++ open, otherwise it will overwrite the file you just copied. The right sequence is- Close Notepad++ (all copies)
- Copy backup
shortcuts.xml
to%AppData%\Notepad++\shortcuts.xml
- Open Notepad++
If you do it in that sequence, Notepad++ should not lose the macros.
-
@PeterJones Yes that is what I did. In fact I just redid it in those steps. For some reason the new version will not pickup the shortcuts.xml file, and display the information in there. Although if I create a macro in the new version and save it, the existing data in the shortcuts file is removed and the new macro is saved. I even changed the name of the existing shortcuts file and opened N++ to get a new file created, then copied in the old macro info and it will not detect it. I then created a test macro and it deleted all the info I copied into the shortcuts file and replaced it with the new macro info. Not sure what is going on but I can’t do through and recreate all my macros. I even changed the name of the shortcuts folder, reloaded N++ to see if the newly created file would work. Nope doesn’t. This worked flawlessly on the previous version I had installed, which I believe was 8.6
-
If there’s nothing secret in your macros, can you share the contents of the
shortcuts.xml
that you are trying to copy into%AppData%\Notepad++
? Maybe there’s something weird going on in your specificshortcuts.xml
, because Notepad++ behaves exactly as I described for me.If you share, use the
</>
button on the forum toolbar, and paste the contents of yourshortcuts.xml
overtop thecode_text
``` code_text ```
-
@PeterJones unfortunately it will not let me put my shortcuts file up here as it is longer than ~16k characters. I did however get it to work. I copied macro’s one or two at a time from the old file to the new file and checked it after each copy and it worked fine. It did get messed up a couple times, but I just removed the last macro I added and saved it and it worked fine. Then I just copied one at at time and it worked. A little bit of a pain, but I only have about 15 macros so it wasn’t terrible. I’m not sure why it didn’t take it from the beginning, but alas it didn’t. Appreciate the help, and now I have another troubleshooting method if it happens again :) .
-
@firstblackboy said in Macros disappear on v8.6.8:
I’m not sure why it didn’t take it from the beginning, but alas it didn’t.
My guess is you had some “bad data” somewhere in the XML. And by doing it in pieces, you avoided that bad data.