New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Thunderbird plain text and html editor #455
Comments
Hey @sphh,
That's a good question. Unfortunately, I don't have any idea to solve the problem at the moment. Cheers :) |
I had a fresh look at this issue using the latest version 0.7.3. I removed the entry for the filter_class: "Thunderbird|TeXstudio"
#backend: Clipboard Looks like espanso now inserts the replacement both into the html and plain text editors! That's very good! But I noticed the following, when playing with matches:
- trigger: ":kr"
markdown: |-
Kind regards
Max becomes in the plain text editor:
(AI at work translating it on the fly to Chinese?) The same for matches:
- trigger: ":kr"
html: |-
Kind regards<br />
Max ⇒
|
Hey @sphh, Thank you for the investigation!
That's interesting, does it happen on every application or in Thunderbird only? If Cheers :) |
Good question regarding other applications!
Have you asked at https://github.com/astrand/xclip/ to support multiple targets? These bug reports might be related: astrand/xclip#93 astrand/xclip#94 |
@sphh Thank you for the detailed investigation! This information will be very useful.
No, I haven't. Besides the fact that the project does not seem very active, I'm investigating possible alternatives to xclip, as I'm currently working on a major refactor. Hopefully, we will be able to fix that issue and remove the xclip dependency :) |
Thanks for taking care of this. Looking already forward towards the refactored program! |
@sphh Thanks, I'll make sure to create a tracking issue in the next few days so that we can all keep track of the refactoring |
Thanks for the continuing work on this program! I upgraded to 2.1.2-alpha and tested this again. I created an application specific config file for Thunderbird: filter_class: "Thunderbird"
backend: Auto
#backend: Clipboard
#backend: Inject and dis/enabled the different backends (edited on the fly with Espanso notifying me, that the configuration was reloaded as soon as I save the file). All of them show the same behaviour:
|
Hey @sphh, Thanks for investigating! The v2 comes with a built-in patch for thunderbird, which might be interfering with your experiment: https://github.com/federico-terzi/espanso/blob/master/espanso/src/patch/patches/linux/thunderbird_x11.rs#L37-L40 One thing you might try is editing the app-specific config for thunderbird you created, adding this line: paste_shortcut: "SHIFT+INSERT"
backend: Clipboard Let me know if that helps :) Also you might want to type Cheers :) |
Thanks. I tested it with this configuration ( filter_class: "Thunderbird"
paste_shortcut: "SHIFT+INSERT"
backend: Clipboard
extra_includes:
- "../match/_correspondance.yml"
title: 'Write: (no subject) - Thunderbird'
exec: '/usr/lib/thunderbird/thunderbird'
class: 'Thunderbird' and [espanso config: "/home/user/.config/espanso/config/thunderbird.yml (PATCHED: thunderbird_x11)"]
backend: Clipboard
enable: true
paste_shortcut: Some("CTRL+SHIFT+V")
inject_delay: Some(15)
key_delay: Some(15)
apply_patch: true
word_separators: [" ", ",", ".", "?", "!", "\r", "\n", "\u{16}"]
preserve_clipboard: true
clipboard_threshold: 100
disable_x11_fast_inject: false
pre_paste_delay: 100
paste_shortcut_event_delay: 10
toggle_key: None
auto_restart: true
restore_clipboard_delay: 300
backspace_limit: 5
search_trigger: Some("jkj")
search_shortcut: Some("ALT+SPACE")
keyboard_layout: None
show_icon: true
show_notifications: true
secure_input_notification: true
x11_use_xclip_backend: false
win32_exclude_orphan_events: true
win32_keyboard_layout_cache_interval: 2000
match_paths: [
"/home/user/Data/dotConfig/espanso/match/_correspondance.yml",
[...]
] As you can see, |
@sphh Thanks! Ok, that looks correct
You're right! That's because the patch overrides the custom config you specified. To avoid that, you can add this option to your
Let me know if that helps :) |
Thanks. With
This behaviour is independent of the setting of the But if I switch back to My working filter_class: "Thunderbird"
apply_patch: false
backend: Auto
extra_includes:
- "../match/_correspondance.yml" and [espanso config: "/home/user/.config/espanso/config/thunderbird.yml"]
backend: Auto
enable: true
paste_shortcut: None
inject_delay: None
key_delay: None
apply_patch: false
word_separators: [" ", ",", ".", "?", "!", "\r", "\n", "\u{16}"]
preserve_clipboard: true
clipboard_threshold: 100
disable_x11_fast_inject: false
pre_paste_delay: 100
paste_shortcut_event_delay: 10
toggle_key: None
auto_restart: true
restore_clipboard_delay: 300
backspace_limit: 5
search_trigger: Some("jkj")
search_shortcut: Some("ALT+SPACE")
keyboard_layout: None
show_icon: true
show_notifications: true
secure_input_notification: true
x11_use_xclip_backend: false
win32_exclude_orphan_events: true
win32_keyboard_layout_cache_interval: 2000
match_paths: [
"/home/user/Data/dotConfig/espanso/match/_correspondance.yml",
[...]
] |
@sphh Thanks! That's interesting
So if you keep |
Yes.
I wouldn't be surprised, if it depends on the version of Thunderbird :( The version I currently use is I just noticed another problem with expansions, but this problem shows in Thunderbird HTML editor and
Is this the behaviour, the thunderbird patch try to resolve? If not, I am happy to open a separate bug. |
@sphh Thanks!
I've originally added the patch due to this issue: #351, it seems I mistakenly added the Regarding the other problems you mentioned, perhaps slowing down the injection a bit might help: inject_delay: 15
key_delay: 15 Cheers :) |
Unfortunately that does not help: I can remove the It does not matter, if I have And I noticed something else: I have Thunderbird message editor and a terminal open (to edit Espanso's config file). I type BTW, sometimes the expansion works and it works fast. But whenever the current contents of the clipboard gets inserted as described above, it takes a while for it to appear. EDIT: Detailed the behaviour of what gets inserted and added the section about the delay. |
@sphh I see, thanks! Another thing you might try is increasing the And also the For more info: https://espanso.org/docs/next/configuration/options/#options-reference
This is interesting, how do you switch to the terminal window? (using the mouse, keyboard shortcut, something else?). Pressing backspace immediately after an expansion "reverts" it due to the |
Thank you for your patience! I just added I switch to the terminal window by mouse: I use |
Sorry, the all clear came to early. I again experience this behaviour! To recap:
I increased all timeouts to very large values: filter_class: "Thunderbird"
apply_patch: false
backend: Clipboard
pre_paste_delay: 1000
key_delay: 300
inject_delay: 300
restore_clipboard_delay: 1000
extra_includes:
- "../match/_correspondance.yml" |
@sphh Thank you for the details!
This is likely the cause of the
No worries! this one is really tricky... I think we tried pretty much all the available options. One last attempt might be to try adding this configuration line to use an alternative clipboard backend (note this requires the latest 2.1.2-alpha version and x11_use_xclip_backend: true Cheers :) |
Re the focus follow mouse: Your explanation makes absolute sense! I now tested it with and without clicking into the terminal window. I can confirm, that this behaviour only shows, if I do not click into the terminal window. But as a bonus I can switch back to the first window by pointing the mouse over it and So far the Do you have any idea, why Thunderbird (and BTW this is now my config file for filter_class: "Xed"
x11_use_xclip_backend: true |
@sphh Nice!
I have absolutely no idea :) Previous Espanso versions used The |
Thanks for your explanation. Now that there is a workaround (use Put please announce – maybe with an pop-up? –, that Thank you for your patience and support and this wonderful and very, very useful application!!!! I use it so often, that I don't notice it, because it's entirely automatic 😃 |
@sphh Thanks! I've updated an existing issue on the Hopefully, we'll be able to figure something out :) |
I just noticed, that espanso behaves differently in Thunderbird's plain text and html editor.
I need multiline expansions, so according to #285 (comment) I have:
I get the following results:
(Yes, nothing)
With
(
paste_shortcut: CtrlShiftV
commented out)I get the following results:
And with just
(
backend: Clipboard
also commented out):I tried to differentiate the two message editors by their window properties, but no luck, because
espanso detect
returns the same for both:Any idea how to get a consistent behaviour for both editors?
The text was updated successfully, but these errors were encountered: