thunderlink icon indicating copy to clipboard operation
thunderlink copied to clipboard

Compatibility with Thunderbird 68

Open ericdanan opened this issue 4 years ago • 20 comments

Hello,

Thanks for maintaining this add-on. At the moment Thunderlink support Thunderbird up to version 65 and is hence disable in the latest official version 68.0. I don't know how this could be fixed but I can offer to help with testing if this is useful.

ericdanan avatar Sep 04 '19 13:09 ericdanan

Oh, interesting. And you're welcome :-). Let me see if there are any things that would cause it to fail on 68 though this looks ominous:

Add-on support: Add-ons are only supported if add-on authors have adapted them

https://www.thunderbird.net/en-US/thunderbird/68.0/releasenotes/

My mac and ubuntu machines are still on 60.8.0 and haven't prompted to update so I hadn't noticed the new release

mikehardy avatar Sep 04 '19 18:09 mikehardy

Just leaving breadcrumbs here as I look through things:

https://developer.thunderbird.net/add-ons/tb68

They have moved a great deal of things that are fundamental to the add-on, forward-porting will take some time https://developer.thunderbird.net/add-ons/updates/tb68

My best recommendation at the moment is to stay with 60.8.0 if thunderlink is vital for you, while I plan some time to handle the changes. It may be a week or so, to set expectations.

If someone else wants to take up the work (you never know? and new collaborators are always welcome) my thinking is:

  • TB60->TB68 is going to be a breaking change, and maintaining compatibility with the prior versions will not be worth it
  • Following that: the migration should carry with it a new minimum version of 68 so that previous users don't see the forward-ported version (they will stay on the old version, no problem)
  • Following that: we can remove any of the TB<=60 compatibility items (like the install.rdf file etc)

In other words, any porting necessary to make it work on TB68 is fine and testing should only be performed on TB68+ for the changes, as we won't have to worry about backwards compatibility.

mikehardy avatar Sep 04 '19 18:09 mikehardy

My mac and ubuntu machines are still on 60.8.0 and haven't prompted to update so I hadn't noticed the new release

Same one Windows. At the moment 68.0 is the official release offered for download on the Thunderbird website but previous versions users will only be prompted to update when 68.1 comes out.

ericdanan avatar Sep 05 '19 09:09 ericdanan

A fresh user report indicates that it works well with TB68 as is, I will see if I can build and publish it https://addons.thunderbird.net/en-US/thunderbird/addon/thunderlink/reviews/1158735/

mikehardy avatar Oct 03 '19 15:10 mikehardy

I was able to simply increase the max compatible version on the add-ons site directly without even re-uploading. @ericdanan can you test and verify this worked for you?

mikehardy avatar Oct 03 '19 15:10 mikehardy

I was indeed able to update the add-on in the usual way. For me some things work and some don't:

  • Saving a link to clipboard using context menu -> working
  • Clicking the link to select the message in Thunderbird -> working only if Thunderbird is already open, otherwise Thunderbird launches but the message is not selected (and it seems to hang for longer than usual)
  • Thunderlink options dialog -> Not usable, it seems that only the text is displayed but not the window background Hope this helps, let me know if I can do any further testing

ericdanan avatar Oct 03 '19 20:10 ericdanan

that is more what I was thinking would happen - helps a lot - thank you!

mikehardy avatar Oct 03 '19 20:10 mikehardy

you' re welcome!

ericdanan avatar Oct 03 '19 20:10 ericdanan

Hi, I've found this add-on via https://vxlabs.com/2019/04/20/link-thunderbird-emails-from-emacs-orgmode/ and I'm using Thunderbird 68.3.1 on latest Windows 10.

Add-on can be installed and it writes thunderlink://[email protected] into my clipboard. Opening those links works in my software, as long as I modify the link to thunderlink://[email protected]. Since the configure screen of the add-on is not working at the moment: is there the possibility to manually change the format setting (for "String 7" or such) in some json file or similar? I could not locate anything in my profile directory so far...

novoid avatar Jan 09 '20 11:01 novoid

Hi @novoid :wave: - that's good sleuthing - sorry I haven't had time to update the plugin properly yet. This should be possible I think? Unless they also changed how preferences are done completely, you can see the code where specify the emitted strings here: https://github.com/mikehardy/thunderlink/blob/master/defaults/preferences/thunderlink.js

I have a prefs.js in my thunderbird profile that contains these items, and it could be hand-edited but only while thunderbird is not running I thnk (and I'd take a backup of the file just in case)

mikehardy avatar Jan 09 '20 12:01 mikehardy

Thanks @mikehardy, That worked:

  1. install "Thunderlink" add-on in Thunderbird
  2. close Thunderbird
  3. manually add the snippet below to the prefs.js of the Thunderbird profile (note the additional user_ in contrast to the snippet above)
  4. start Thunderbird
user_pref("extensions.thunderlink.custom-tl-string-1-title", "Org mode message-ID");
user_pref("extensions.thunderlink.custom-tl-string-1", "[[messageid:<messageid>][<subject>]]");
user_pref("extensions.thunderlink.custom-tl-string-1-selection-delimiter", " / ");
user_pref("extensions.thunderlink.custom-tl-string-1-clipboard-checkbox", true);
user_pref("extensions.thunderlink.custom-tl-string-1-tagcheckbox", false);
user_pref("extensions.thunderlink.custom-tl-string-1-tag", 1);
user_pref("extensions.thunderlink.custom-tl-string-1-appendtofile-checkbox", false);
user_pref("extensions.thunderlink.custom-tl-string-1-appendtofile-path", "");

... which results in [[messageid:[email protected]][[Things I wanted to say to you]] in my clipboard.

Is there an overview of all the possible <fields>? I'm interested in the date sent and so forth and don't want to start a large try&error project ;-)

Thanks!

novoid avatar Jan 09 '20 13:01 novoid

Cool - obviously not a great user experience vs having it all working, but getting the linking going is the important bit. Here's the list of possible placeholders: https://github.com/mikehardy/thunderlink/blob/master/chrome/thunderlink/content/preferences.xul#L108

mikehardy avatar Jan 09 '20 13:01 mikehardy

@novoid You can do it in Thunderlink settings. You don't have to edit files. Here is a picture of that configuration in the settings.

You can see that at the beginning of the window is also a list of possible tags that you can use.

MarioKusek avatar Jan 10 '20 07:01 MarioKusek

Hi @MarioKusek, No, I can't. The settings at my system look like this: https://ibb.co/gJmRbq5 I'm fine with JS editing myself.

novoid avatar Jan 10 '20 08:01 novoid

@novoid I am sorry :( I did not know that. Then go ahead and change it in JS. As you can see from my screenshot there is a list of tags that you can use: <thunderlink>, <messageid>, <subject>, <filteredSubject>, <sender>, <tbexe> and <time>.

As I understand you need the time of a message and for that, you can use <time>. If you come up with some other tags please let us know and we will see if we can implement it.

I personally use taskpaper for my tasks and have following template \t- <subject>\u2028\tFrom: <sender> on <time>\u2028\t<thunderlink>\n. I append that in a file.

MarioKusek avatar Jan 10 '20 08:01 MarioKusek

If I may ask for an additional feature, I'd ask for a format options:

1/10/2020 - 10:46:18 AM Karl Voit <[email protected]>: This is a test email is my current result.

I'd love to have this instead: 2020-01-09 Karl Voit: This is a test email

Therefore: an ISO date (instead of locale-formatted long time-stamp) and the sender name (without email address). Should I open up an extra issue for that?

novoid avatar Jan 10 '20 09:01 novoid

@novoid Yes, please open a new issue. Then we can there discuss details.

MarioKusek avatar Jan 10 '20 13:01 MarioKusek

Yes, please open a new issue. Then we can there discuss details.

See https://github.com/mikehardy/thunderlink/issues/49

novoid avatar Jan 10 '20 13:01 novoid

That worked:

  1. install "Thunderlink" add-on in Thunderbird
  2. close Thunderbird
  3. manually add the snippet below to the prefs.js of the Thunderbird profile (note the additional user_ in contrast to the snippet above)
  4. start Thunderbird
user_pref("extensions.thunderlink.custom-tl-string-1-title", "Org mode message-ID");
user_pref("extensions.thunderlink.custom-tl-string-1", "[[messageid:<messageid>][<subject>]]");
user_pref("extensions.thunderlink.custom-tl-string-1-selection-delimiter", " / ");
user_pref("extensions.thunderlink.custom-tl-string-1-clipboard-checkbox", true);
user_pref("extensions.thunderlink.custom-tl-string-1-tagcheckbox", false);
user_pref("extensions.thunderlink.custom-tl-string-1-tag", 1);
user_pref("extensions.thunderlink.custom-tl-string-1-appendtofile-checkbox", false);
user_pref("extensions.thunderlink.custom-tl-string-1-appendtofile-path", "");

... which results in [[messageid:[email protected]][[Things I wanted to say to you]] in my clipboard.

@novoid Instead to manually edit preferences in the file you can use "Config Editor" in Thunderbird and edit the same keys in the editor. To open "Config Editor" go to Thunderbird > Preferences, select the Advanced panel, select the General tab, and click "Config Editor…". Here are official instructions.

MarioKusek avatar Apr 20 '20 17:04 MarioKusek

I just want to point people to https://github.com/CamielBouchier/cb_thunderlink which is mentioned in the README of this project as a modern successor for thunderlink with the changed API of Thunderbird 78.x (and ongoing).

I was just following this issue here, missing the new opportunities of this other project.

novoid avatar Feb 27 '21 17:02 novoid