Audacity Bug Summary
••• Introduction •••
••• Keywords •••
    Audacity 3.0.3 development began 19th April 2021

Audacity Bugzilla



Bug 2295 - ENH: cannot add a comment in a Macro with Audacity
ENH: cannot add a comment in a Macro with Audacity
Status: RESOLVED FIXED
Product: Audacity
Classification: Unclassified
Component: User Interface
2.4.0
Per OS All
: P3 Enhancement
Assigned To: Default Assignee for New Bugs
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2020-01-26 07:11 UTC by Peter Sampson
Modified: 2020-08-17 07:28 UTC (History)
7 users (show)

See Also:
Steps To Reproduce:
1) Tools > Manage Macros 2) try to add a comment in the Macro 3) Observe: you can't
Release Note:
Group Macros: *It is not possible to add a comment to a Macro from within Audacity, Audacity's Manage Macros command.
First Git SHA:
Group: ---
Workaround:
Edit the TXT file of you Macro with a text editor. The Macros are stored in the "Macros" folder in Audacity's folder for application data: * '''Windows:''' Users\<username>\AppData\Roaming\audacity\Macros * '''Mac:''' ~/Library/Application Support/audacity/Macros * '''Linux:''' ~/.audacity-data/Macros
Closed: 2020-08-17 00:00:00
petersampsonaudacity: Test‑OK‑Win+
petersampsonaudacity: Test‑OK‑Mac+
stevethefiddle: Test‑OK‑Lin+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Sampson 2020-01-26 07:11:02 UTC
It is impossible to use Audacity to add a comments to a Macro (in Manage Macros).  Comments can be very useful in longer or more complex Macros (Macros are effectively a form of programming language)

It can be done but the user has to "discover" where their Macros are stored and then text edit the TXT file.  There is no way to "discover" the location from the app so a RTFM is required.  This is this esoteric advanced/expert user stuff.
Comment 1 Peter Sampson 2020-07-24 10:18:20 UTC
Steve wrote offline
>Lines of text that are not recognised Macro commands are simply ignored. 
>I don't think this is an intentional "feature", but it is useful to be able 
>to add comments to a Macro script. A downside of this "unofficial feature" 
>is that if you modify the the Macro with the Macro Editor, the "comment" 
>lines are stripped out.

If and when this feature is implemented we need to ensure that such somment lines do not get stripped out when the Macro is edited in Audacity.
Comment 2 James Crook 2020-08-16 15:24:22 UTC
DEVEL - FIX MADE
https://github.com/audacity/audacity/commit/894867d692e92a3893741b23dc0769b3c304ba5a

Use the 'comment' command from the edit macros dialog.
Comment 3 Peter Sampson 2020-08-17 05:54:04 UTC
(In reply to James Crook from comment #2)
Testing on W10 with Audacity 3.0.0 894867d

This fails on W10 - I used the new Comment command edited the parameters adding some text.  When I try to run the Macro it stops (silently - nor error or warning) when it hits the comment.
Comment 4 James Crook 2020-08-17 06:25:39 UTC
Ooops.  That was an embarrassing mistake.  Try now:
https://github.com/audacity/audacity/commit/a278eff55bb8dd647ffec91dbdd212bfacec0ca2

I had the comment command set to always fail!
Comment 5 Steve Daulton 2020-08-17 06:32:57 UTC
(In reply to Peter Sampson from comment #3)
On Linux, the Macro appears to not run at all if there is a "Comment:"

(In reply to James Crook from comment #4)
Oops :)
That fixes it.
Comment 6 Peter Sampson 2020-08-17 07:20:48 UTC
(In reply to James Crook from comment #4)
testing on W10 with Audacity 3.0.0 a278eff

Fixes it on W10 too
Comment 7 Peter Sampson 2020-08-17 07:28:59 UTC
(In reply to James Crook from comment #4)
testing on macOS 10.15.6 Catalina with Audacity 3.0.0 a278eff

Fixes it on Mac too