Espanso: Multiline text not expanded in newline in RoamResearch

Created on 12 Jul 2020  路  5Comments  路  Source: federico-terzi/espanso

Hey @federico-terzi,

First of all, thank you so much for creating Espanso. I'm grateful that you're sharing this tool and I've been using it for emoji and date replacements. Very happy with it!

In RoamResearch, I have been trying to use Espanso for creating metadara 'templates' where I enter an Espanso command to get a set of related metadata tags. These prompts should be returned in multiline format.

Here is a sample of expected output for :article:

Author::
Source::
Tags:: #article

Plus expected output on Roam's WYSIWYM editor:
Screenshot 2020-07-12 at 7 21 38 PM

Instead, I am getting the text on a single line with the line breaks empty:

Screenshot 2020-07-12 at 7 23 09 PM

I tried the options outlined in Espanso docs:

  - trigger: ":test1"
    replace: "line one\nline two"

  - trigger: ":test2"
    replace: |
              line one
              line two

Here's a demo of what happens in Roam:

https://www.loom.com/share/f4357ce867ed46959f793ffd2647b712

I can also verify that the newline feature is working fine on another app, like MacOS Notes.

Potentially related issue: https://github.com/federico-terzi/espanso/issues/121

Thank you for looking into it!

Most helpful comment

Hey @herrowna,

Thank you for the kind words! My first suggestion would be to try using the force_clipboard: true parameter on that match, such as:

  - trigger: ":test1"
    replace: "line one\nline two"
    force_clipboard: true

Let me know if that helps

Cheers :)

All 5 comments

Hey @herrowna,

Thank you for the kind words! My first suggestion would be to try using the force_clipboard: true parameter on that match, such as:

  - trigger: ":test1"
    replace: "line one\nline two"
    force_clipboard: true

Let me know if that helps

Cheers :)

Hey @federico-terzi ,

That trick worked flawlessly. Thank you for your time! 馃

Glad you sorted that out :)

@herrowna in my experience, this results in an entry like:

- line one
  line two

Instead of:

- line one
- line two

Is that what you see as well, and if so, are you keeping all of your metadata refs together in a single bullet?

@jacquestardie On Roam it checks out fine, here's a screenshot:

Screenshot 2020-10-27 at 9 19 07 AM

In certain cases I do get the single bullet entry like you, e.g. when using Eloquent for Roam.
Screenshot 2020-10-27 at 9 19 34 AM

Was this page helpful?
0 / 5 - 0 ratings

Related issues

hos4m picture hos4m  路  3Comments

psyguy picture psyguy  路  3Comments

Adam13531 picture Adam13531  路  7Comments

owzim picture owzim  路  6Comments

pedrorrivero picture pedrorrivero  路  6Comments