knowsnothing Posted July 14, 2020 Share Posted July 14, 2020 I'm making a snippet for Roam Research that involves their {{date}} command. However, when the snippet pastes {{date}} it inserts today's date. I'd like it to stop doing that. It could be just as easy as adding an arbitrary symbol in front of { deanishe and Terminal 2 Link to comment Share on other sites More sharing options...
deanishe Posted July 14, 2020 Share Posted July 14, 2020 (edited) I have a related problem with my Markdown to BBCode workflow. I write posts on this forum in Markdown and then convert them for the forum software. And every time I write a {date:…} macro or similar to show someone how to do something, Alfred expands it when I run the converter workflow (it turned that example into … so I had to rewrite it). The culprit in my case appears to be the Copy to Clipboard action, which is executing placeholder expansion on the contents of {query}. I appreciate the utility of being able to insert dynamic placeholders into script output and have them expanded by Alfred, but an element like the Copy to Clipboard action should be configurable to put the text I pass it on the clipboard without altering it. Edited July 14, 2020 by deanishe Link to comment Share on other sites More sharing options...
Andrew Posted July 14, 2020 Share Posted July 14, 2020 I'm definitely amenable to adding in options to prevent placeholder expansion. I'll have a think about the appropriate scope of this as I don't want to over complicate what will usually be considered as a corner case. Cheers, Andrew Link to comment Share on other sites More sharing options...
vitor Posted July 14, 2020 Share Posted July 14, 2020 17 hours ago, deanishe said: I have a related problem with my Markdown to BBCode workflow. The way I work around it in MarkdownTransform is by copying the transformation (pbcopy) and then using {clipboard} in the Copy to Clipboard Output (for pasting, marked as transient). Link to comment Share on other sites More sharing options...
deanishe Posted July 15, 2020 Share Posted July 15, 2020 6 hours ago, vitor said: then using {clipboard} in the Copy to Clipboard Output Interesting that it’s only {query} that gets processed for placeholders. 6 hours ago, vitor said: then using {clipboard} in the Copy to Clipboard Output (for pasting, marked as transient). Does that actually hide it from the history (given that you used pbcopy)? Link to comment Share on other sites More sharing options...
Andrew Posted July 15, 2020 Share Posted July 15, 2020 2 hours ago, deanishe said: Interesting that it’s only {query} that gets processed for placeholders. This is down to order of operations. The {query} placeholder is the first thing to be replaced out (essentially by design), and then the placeholders are processed. In the framework which processes placeholders, the {date} ones are done before {clipboard}. deanishe 1 Link to comment Share on other sites More sharing options...
vitor Posted July 15, 2020 Share Posted July 15, 2020 8 hours ago, deanishe said: Does that actually hide it from the history (given that you used pbcopy)? It does, as long as the Copy to Clipboard acts right away. Even adding a 0.1s delay between the Run Script and the Copy to Clipboard makes it not work. deanishe 1 Link to comment Share on other sites More sharing options...
Andrew Posted July 28, 2020 Share Posted July 28, 2020 I've added an addition for the upcoming 4.1.1 from the { } button popup menu (bottom left of relevant text fields) to allow for disabling of dynamic placeholders for the current item your configuring. This works in all areas where there is the { } button, such as Workflow Copy to Clipboard, Write File, Large Type, then Remote Clipboard / Snippet, and finally the Snippets. I should have a 4.1.1 pre-release out by next week Link to comment Share on other sites More sharing options...
Andrew Posted August 4, 2020 Share Posted August 4, 2020 If you update to the 4.1.1 pre-release, there is now an option under the { } snippet placeholder button which allows you to disable dynamic placeholder expansion per scenario. If you update, could you let me know how you get on Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now