Toggle Editing a clip moves other clips

Hello, here is a very simple plugin to toggle the option Editing a clip can move other clips. This was built in Audacity 2.4.2.
I hope that someone find this helpful.
EditingMovesOtherClips.ny (564 Bytes)

Nice :slight_smile:

Just a few points about the code (minor details):

  1. The headers should begin with a semicolon rather than a dollar sign.
    This isn’t very important and makes no difference to the plug-in working correctly, but the dollar symbol tells Audacity to look for translations in Audacity’s “locale” directories. The lookup will always fail because there are no translation for this plug-in compiled into Audacity. It’s a silent failure and Audacity falls back on using the literal strings.
    The dollar symbol should really be used only for plug-ins that are shipped with Nyquist (which will have translations compiled into Audacity).

When using a semicolon rather than the dollar, omit the “(_” and “)” around strings.
The syntax:

(_ "some text")

passes “some text” to a function called “underscore” (written literally as “_”) to be translated.
This function can be used in third party plug-ins, but not in plug-in headers. More info here:

2. The ;action header is now obsolete. Audacity now ignores this header and uses a standard message in the progress dialog.
Also, this plug-in is so fast that the progress dialog will not be shown at all.

3. The ;debugbutton header is redundant because the plug-in has no control widgets, so no GUI, so no buttons at all.

The full header, following the current “best practice” would look something like this:

;nyquist plug-in
;version 4
;type tool
;name "Toggle Editing Moves Other Clips"
;author "JH"
;release 2.4.2_v1
;copyright "Released under terms of the GNU General Public License version 2"
  1. The return value from the plug-in is, strictly speaking, an error. The final command in the plug-in is:
(AUD-DO-COMMAND "SetPreference" :Name "/GUI/EditClipCanMove" :Reload "0" :Value newstate)

which returns a list:

("" . T)

which is not a valid return value (Audacity ignores it and adds a warning message to the Audacity log).

As you don’t want Audacity to display anything on completion, the standard practice is to return an empty string. An empty string is a valid return value, which Audacity understands as “do nothing” (an empty string is a no-op in Nyquist plug-ins).

To pass an empty string as the return value, just add to the bottom of the file:


Hi Steve,
Thank you very much for all the explanation! I applied all your comments and I have also updated the attached plugin file in the first message.

Have a nice day!