Skip to content
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

Support Thunderbird 68 #577

Closed
Qqwy opened this issue Sep 9, 2019 · 41 comments
Closed

Support Thunderbird 68 #577

Qqwy opened this issue Sep 9, 2019 · 41 comments

Comments

@Qqwy
Copy link

Qqwy commented Sep 9, 2019

After updating to Thunderbird 68, the add-on has become disabled.

I would be very happy if it could be updated to work with this new version 🙂 .

@light-wizard
Copy link

Hi there!
First of all, I'd like to thank @adam-p for his amazing work: I use markdown-here in Thunderbird on a daily basis, and it works great!
For this very reason, I was really sad to see it disabled in Thunderbird 68. Is there any plan and ETA to make it supported again?

Thanks

@yhager
Copy link

yhager commented Sep 10, 2019

I don't know much (read: nothing) about add-ons development, but I really need this one to work on tb 68. I hacked the sources a bit and managed to install it. I don't know if it's good enough or not, but might be a start for whomever wants to take it further:

diff --git a/src/manifest.json b/src/manifest.json
index f3c5af4..4d1fae5 100644
--- a/src/manifest.json
+++ b/src/manifest.json
@@ -12,7 +12,7 @@
     "128": "common/images/icon128.png",
     "512": "common/images/icon512.png"
   },
-  "permissions": ["contextMenus", "storage"],
+  "permissions": ["menus", "storage"],
   "background": {"page": "chrome/background.html"},
   "content_scripts": [
     {
@@ -46,7 +46,15 @@
 
   ,"applications": {
     "gecko": {
-      "id": "markdown-here-webext@adam.pritchard"
+      "id": "markdown-here-webext@adam.pritchard",
+      "strict_min_version": "68.0"
+    }
+  }
+  ,"legacy": {
+    "type": "xul",
+    "options": {
+      "page": "common/options.html",
+      "open_in_tab": true
     }
   }
 }

I roughly followed this guide: https://developer.thunderbird.net/add-ons/updates

@dngray
Copy link

dngray commented Sep 11, 2019

This seems to be a duplicate of #536

@Qqwy
Copy link
Author

Qqwy commented Sep 11, 2019

This seems to be a duplicate of #536

Is it, though? That issue talks about Thunderbird version 64.

@sklages
Copy link

sklages commented Sep 11, 2019

This is probably a dead project by now .. a pity.
Interestingly there is no alternative to this add-on on addons.thunderbird.net.

@dngray
Copy link

dngray commented Sep 12, 2019

Is it, though? That issue talks about Thunderbird version 64.

Thunderbird 64 was the beta, which is now what Thunderbird 68 became. So anything after Thunderbird 60.x wasn't going to work with this, including Thunderbird 69 which is the next version.

ADD-ON SUPPORT: Restartless add-ons contineu to work if their authors have made the necessary minor adjustments. Non-restartless add-ons using XUL overlays are only supported if add-on authors have adapted them, and Lighting/Calendar is the only one we know that has been adapted.

Does this addon actually use XUL in any way? we should check the source.

It may require a fork as it seems that @adam-p isn't responding, he didn't respond to the email I sent him either clarifying whether or not he was still maintaining this. Though I do see he is still active based on his github contributions so who knows what is going on.

This is probably a dead project by now .. a pity.
Interestingly there is no alternative to this add-on on addons.thunderbird.net.

Yeah, and there is no alternative to Header Tools Lite that I know of either. It was when you want to reply to a mailing list, thread that you do not have in your email. You could edit the References to have the correct Message-ID, to maintain threading.

@Martii
Copy link

Martii commented Sep 22, 2019

@yhager (and perhaps everyone else too):

Thanks for that kick-start up there. 😸

Spent a little bit of time crash learning WebExtensions (still fresh). With your patch, #459, and along with the remainder of the build instructions enabled (clever build system btw) $ make build builds an install-able version here.

i.e.

diff --git a/src/manifest.json b/src/manifest.json
index f3c5af4..4d1fae5 100644
--- a/src/manifest.json
+++ b/src/manifest.json
@@ -12,7 +12,7 @@
     "128": "common/images/icon128.png",
     "512": "common/images/icon512.png"
   },
-  "permissions": ["contextMenus", "storage"],
+  "permissions": ["menus", "storage"],
   "background": {"page": "chrome/background.html"},
   "content_scripts": [
     {
@@ -46,7 +46,15 @@
 
   ,"applications": {
     "gecko": {
-      "id": "markdown-here-webext@adam.pritchard"
+      "id": "markdown-here-webext@adam.pritchard",
+      "strict_min_version": "68.0"
+    }
+  }
+  ,"legacy": {
+    "type": "xul",
+    "options": {
+      "page": "common/options.html",
+      "open_in_tab": true
     }
   }
 }
diff --git a/utils/build.js b/utils/build.js
index 9274aab..7a32bf1 100644
--- a/utils/build.js
+++ b/utils/build.js
@@ -9,7 +9,7 @@
 var fs = require('fs');
 var file = require('file');
 var archiver = require('archiver');
-var MetaScript = require('MetaScript');
+var MetaScript = require('metascript');
 
 
 var BASE_DIR = '..';
@@ -22,7 +22,7 @@ var THUNDERBIRD_EXTENSION = file.path.join(DIST_DIR, 'thunderbird.xpi');
 
 var CHROME_INPUT = [/^manifest\.json$/, /^common(\\|\/)/, /^chrome(\\|\/)/, /^_locales(\\|\/)/];
 var FIREFOX_INPUT = CHROME_INPUT;
-var THUNDERBIRD_INPUT = [/^chrome.manifest$/, /^install.rdf$/, /^common(\\|\/)/, /^firefox(\\|\/)/];
+var THUNDERBIRD_INPUT = [/^manifest\.json$/, /^chrome.manifest$/, /^install.rdf$/, /^common(\\|\/)/, /^firefox(\\|\/)/, /^_locales(\\|\/)/];
 
 var CHROME_PLATFORM = 'chrome';
 var FIREFOX_PLATFORM = 'firefox';

This is the bare minimum I think to get it at least working "out of the box". I never used the Options of this extension so I have no idea what was working versus what wasn't/isn't. I might spend a little more time on a diff patch that can be applied with $ git apply < diff.diff.txt if I have time to debug.

Refs:

@Martii
Copy link

Martii commented Sep 22, 2019

P.S. Don't forget to do:

$ cd utils
$ npm install
$ cd ..

... before building since the routine currently utilizes node.


@dngray

Does this addon actually use XUL in any way? we should check the source.

See adam-p/markdown-here/blob/1df5aee/src/chrome.manifest. Some targets that still utilize XUL and plenty of overlays.

@Martii
Copy link

Martii commented Sep 22, 2019

Noticed a glitch with the manifest.json.

Needs:

diff --git a/src/manifest.json b/src/manifest.json
index 4d1fae5..e496210 100644
--- a/src/manifest.json
+++ b/src/manifest.json
@@ -50,11 +50,5 @@
       "strict_min_version": "68.0"
     }
   }
-  ,"legacy": {
-    "type": "xul",
-    "options": {
-      "page": "common/options.html",
-      "open_in_tab": true
-    }
-  }
+  ,"legacy": true
 }

... which seems to correct it so there aren't two entries in the menu (Tools -> Add-on Preferences)... one being "dead". The remaining options dialog menu entry still opens and opens in a new tab here. The duplication is possibly from the install.rdf <em:optionsURL>... entry and maybe how the XUL component works in this Thunderbird. IDK atm.


Doesn't appear to save (or retrieve which seems to be why the alert box shows up) preferences (Options) either. More work todo perhaps. Again I only utilize the basic functions of this AO so haven't twiddled beyond that.

@EBoisseauSierra
Copy link

Kudos to @Martii for the patch.
I've cloned the repo and applied it, done the npm install bit… but then I'm a bit lost regarding how to build/enable the patched add-on in TB.
➥ Could you please details a bit more the required steps?

@light-wizard
Copy link

light-wizard commented Sep 23, 2019

@Martii , thanks for the patch, it works like a charm (at least for the functionalities I use...)

It may require a fork as it seems that @adam-p isn't responding, he didn't respond to the email I sent him either clarifying whether or not he was still maintaining this. Though I do see he is still active based on his github contributions so who knows what is going on.

I agree with @dngray , this is too good a project to die like this, it should be forked. Still, @adam-p should have a say in it. Let's hope he gets back in touch...

@EBoisseauSierra (and/or anyone who's interested), here's the procedure I followed to make it work:

  1. Clone the repo with git or svn $ git clone https://github.com/adam-p/markdown-here.git

  2. Apply the patch $ git apply < path/to/diff/file/diff.diff.txt

  3. Install modules with npm and return to root folder

     $ cd utils
     $ npm install
     $ cd ..
    
  4. Build an install-able version $ make build

  5. Built extensions files will be saved in "dist" sub-folder

  6. Open Thunderbird, go to the Add-ons Preferences page, click on the gear icon and choose "Install Add-on From File..."

  7. Install .xpi built addon

  8. Thunderbird will need to restart in order to enable the Add-on

  9. Enjoy!

Cheers!

@StuntsPT
Copy link

@light-wizard Thank you for the detailed instructions. I have this extension working again in thunderbird 68.0.
And of course, thank you to @Martii @yhager for the patch.
But indeed, a fork might be in order. I was involved in a similar fork two years ago, and the project moved from a single author to community driven.
Of course, everything was done with full approval of the original author. Maybe markdown-here could benefit from a similar event? If only @adam-p could let us know his plans for this awesome project...

@Martii
Copy link

Martii commented Sep 24, 2019

Sure wish https://developer.mozilla.org/docs/Mozilla/Add-ons/WebExtensions/manifest.json/permissions had better explanations of the permissions. Chromium/Chromes references at https://developer.chrome.com/apps/declare_permissions seems to be filled in a bit more.

The reason why I say this... is the change of permissions doesn't seem to be even needed for TB, in legacy mode, but does need to be there for, at least, Chromium/Chrome. So the:

-  "permissions": ["contextMenus", "storage"],
+  "permissions": ["menus", "storage"],

... probably breaks building the extension .zip for the other applicable browsers because menus isn't symmetric between browsers (yet?). Anywho... topic is Thunderbird so I'll stick to that for the time being.


On another brief tangent...

"Important: Chrome will be removing support for Chrome Apps on Windows, Mac, and Linux." * https://developer.chrome.com/apps/declare_permissions , https://blog.chromium.org/2016/08/from-chrome-apps-to-web.html , and https://developers.chrome.com/apps/migration

Oh dear. There goes several clients web cam apps. :\ This explains why it took forever to find one Chrome App for a specific cam series I think. It wasn't searchable in the Chrome Web Store but referenced in the cam software. Blehh.

@Martii
Copy link

Martii commented Sep 24, 2019

Hmmm... converting the preferences (Options) store to a WebExtension seems to have hit a wall/hiccup (mine or TB's IDK atm). chrome is currently undefined when creating a new message. It throws many errors when trying to access chrome.storage. I am able to retrieve and save the preferences from the Options tab, because chrome.storage there exists, but when I go to compose a message chrome isn't there to get the values necessary to do the markdown conversion.

In simple, resultant, English that means it breaks using markdown for sending a message completely. I think I see why dev is stalled here.

I need some rest and perhaps look at this fresh after a wee break.

@Martii
Copy link

Martii commented Sep 26, 2019

Composed a rather complex markdown message in TB 68.1.x and it failed to send with diff.diff.txt only. Had to revert to TB 60.x. Not sure latest TB is ready for this AO yet even slightly modified.

@gbstan
Copy link

gbstan commented Oct 9, 2019

Could the .xpi be posted here please? I am not sure I can follow these instructions. If some users have already built a version compatible with TB 68 it would really be useful to be able to have the .xpi install file.

@StuntsPT
Copy link

StuntsPT commented Oct 9, 2019

@gbstan I have uploaded my build here. Comes with absolutely no warranty of any kind. You can use it if you decide that you trust me, a perfectly random stranger on the internet.

markdown_here.tar.gz

See how I got you to hesitate? That's why no one had posted a build before. It is actually quite buggy, but if you really need to use it, it kind of sort of works.

I think the whole extension needs a lot of work to be usable on an everyday basis.

@gbstan
Copy link

gbstan commented Oct 9, 2019 via email

@KoSukeWork
Copy link

@gbstan I have uploaded my build here. Comes with absolutely no warranty of any kind. You can use it if you decide that you trust me, a perfectly random stranger on the internet.

markdown_here.tar.gz

See how I got you to hesitate? That's why no one had posted a build before. It is actually quite buggy, but if you really need to use it, it kind of sort of works.

I think the whole extension needs a lot of work to be usable on an everyday basis.

Thank you ! Your build is very convenient and I think you are credible

@dngray
Copy link

dngray commented Oct 30, 2019

I have moved on from this and found a better solution using pandoc. I haven't been happy with Thunderbird for some time for these reasons:

  1. Able to use a proper text editor when writing emails which is useful for re-formatting badly formatted incoming email: eg:
    • Replying to Gmail messages where quoted text occurs.
    • Blue 'quoted text' cannot simply be copied to a text editor and then back into Thunderbird
  2. Far less memory resources, which can be used for useful computing such as local VMs.
  3. Easily able to edit headers eg :set edit_headers useful for replying to email on mailing lists where I do not have References:, In-Reply-To: and MessageID set (this keeps conversation threading). There was an extension but it is now unmaintained and messing with about:config settings is annoying
  4. Extensible and flexible
  5. I don't use the RSS support, I use newsboat instead. I rarely use Lightning and am going to use Calcurse instead.
  6. Enigmail is going away in Thunderbird 78 so none of those options are going to be relevant. It also seems that the PGP used will not use Gnupg's keyring, therefore requiring import/export between two keyring storage systems.
  7. Text config files can be committed to a dotfiles repository
  8. Multi platform
  9. Can be used remotely over SSH.
  10. Allows for an offline storage and synchronization with mbsync in Maildir format. I prefer this to Mbox as I can easily make cold-storage backups with rsync ie rsync -av --delete ~/.local/share/mail {{ backup location }} I am aware of the experimental Maildir support in Thunderbird however the above issues are not solved.

For new users I suggest mutt-wizard.
Videos demonstrating it's abilities 1, 2

Also I am keeping an eye on Aerc and Meli.

I very rarely send emails in markdown or HTML as it is rarely needed. This secret sauce looks to be just the thing I need on the occasion I do need to.

@GaVenga
Copy link

GaVenga commented Nov 3, 2019

With Manjaro AND Ubuntu 18.04 I get this ERROR:
(Thunderbird 68.2 launched in Terminal (bash))
JavaScript error: resource://gre/modules/AsyncShutdown.jsm, line 551: uncaught exception: undefined

when closing Thunderbird

@cgustave
Copy link

cgustave commented Nov 4, 2019

Thanks for the Th 68 tuto, happy to see markdown back.
Great add-on, hope it can be officially maintained again.

@dohliam
Copy link

dohliam commented Dec 14, 2019

The build shared by @StuntsPT above doesn't seem to work at all on Thunderbird 68.2.2 unfortunately.

A workaround for the meantime is to run Markdown text through something like Remarkable and just copy-paste the result into Thunderbird. Obviously this is not as convenient as markdown-here, but at least it produces a more-or-less usable result.

@dngray
Copy link

dngray commented Dec 15, 2019

I have been using Mutt Secret Sauce now for a while. It makes fairly nice emails, and also sends a plain-text part using multipart/alternative. The template can be fully customized to your needs.

It uses Pandoc which is likely to be maintained well into the future. You can actually use any markup language you like, not just Markdown, but AsciiDoc or whatever else you fancy.

One of the features I really like about it, is the rendering with MIMEmbellish occurs when you send the email, which means the markdown copy gets saved in your outbox. This really handy if you need to reply to it, and make corrections as you get to keep the email in markdown format.

If you can handle the learning curve of using Mutt, it's an awesome option. That said the mutt-wizard makes that a fair bit easier.

@fulster
Copy link

fulster commented Jan 13, 2020

@gbstan I have uploaded my build here. Comes with absolutely no warranty of any kind. You can use it if you decide that you trust me, a perfectly random stranger on the internet.

markdown_here.tar.gz

See how I got you to hesitate? That's why no one had posted a build before. It is actually quite buggy, but if you really need to use it, it kind of sort of works.

I think the whole extension needs a lot of work to be usable on an everyday basis.

Thanks a lot ! For now, it's working like a charm !

@earboxer
Copy link

Maybe somebody should open a WIP Pull request so we can all report issues/make fixes/suggestions toward it.

neilmayhew added a commit to neilmayhew/markdown-here that referenced this issue Jan 15, 2020
neilmayhew added a commit to neilmayhew/markdown-here that referenced this issue Jan 15, 2020
@neilmayhew
Copy link

There's an insane number of forks of this repo (7.6K)! However, most of them are way behind the upstream repo.

I've added my own fork and created a release using the patches from this issue.

The binary build in the release is identical to the one posted by StuntsPT except that it has the additional patch from Martii added. You can verify this by unpacking both .xpi files and comparing the directories.

The preferences dialog still doesn't work properly, although checking the box for TeX math support did work for me. Unfortunately, I'm not knowledgeable and motivated enough to fix the preferences dialog myself, but I'd welcome PRs from anyone who wants to work in this area.

@neilmayhew
Copy link

FWIW, I also created a PR (#592) but it seems unlikely @adam-p will be interested in merging it.

@neilmayhew
Copy link

I don't know what it would take to get a new binary uploaded to the add-ons store. If anyone has thoughts about that, please let me know.

@dngray
Copy link

dngray commented Jan 16, 2020

I don't know what it would take to get a new binary uploaded to the add-ons store. If anyone has thoughts about that, please let me know.

It most likely won't. It will also break again with Thunderbird 78 without further development as a lot of that XUL stuff is being removed completely meaning that updating the manifest isn't going to be enough.

Someone will need to make a hard fork, check out code, and make changes. Uploading an tarball here is not sufficient.

The code will have to go through the review process:

@dngray
Copy link

dngray commented Jan 16, 2020

There's an insane number of forks of this repo (7.6K)! However, most of them are way behind the upstream repo.

That does not mean there is active development. Many click the fork button instead of the star. You can get a more accurate view of what the forks actually have done https://github.com/adam-p/markdown-here/network (which is basically nothing), scroll along to the end of the adam-p base repo.

@neilmayhew
Copy link

The network view wasn't showing yesterday. It said there were too many forks and it just listed them. However, presumably due to my creating a new fork with commits in it, the network view is showing again.

The great majority of recent commits in the network are bots, either fixing dependencies or optimizing images. There are also a lot that appear to be plain mistakes (people adding stuff to the wrong repo) and others making changes that are useful only to the committer. I didn't see anything useful that isn't already in a PR to the upstream repo.

@foxpluto
Copy link

Hi to all,

just to let you know I am very interested in this plugin too!

Regards,
Stefano

@DoctorSubtilis
Copy link

@gbstan I have uploaded my build here. Comes with absolutely no warranty of any kind. You can use it if you decide that you trust me, a perfectly random stranger on the internet.

markdown_here.tar.gz

See how I got you to hesitate? That's why no one had posted a build before. It is actually quite buggy, but if you really need to use it, it kind of sort of works.

I think the whole extension needs a lot of work to be usable on an everyday basis.

Thank you very much. It works with e-mails.
But (how) could it works with tasks as well? It would be wonderful...

@bojanra
Copy link

bojanra commented May 10, 2020

@gbstan I have uploaded my build here. Comes with absolutely no warranty of any kind. You can use it if you decide that you trust me, a perfectly random stranger on the internet.

markdown_here.tar.gz

See how I got you to hesitate? That's why no one had posted a build before. It is actually quite buggy, but if you really need to use it, it kind of sort of works.

I think the whole extension needs a lot of work to be usable on an everyday basis.

I went into same problems after upgrading to Thunderbird 68.7.0.
The build works like perfect. Thanks!

@Wheest
Copy link

Wheest commented Oct 18, 2020

I was using a version I'd patched and built for a while, however my package manager finally updated to Thunderbird 78.3.1. This means the add-on will no longer work.

It will be a moderate development job to get it updated, and I don't know enough JS, let alone add-on development to update it.

Anyone that's looking for a less-than-ideal solution could try what I'm doing for now:

Using pandoc, convert your email in markdown to HTML:

pandoc email.md -t html -o email.html

Then copy the raw HTML, and in your Thunderbird compose window select Insert->HTML. This will render your HTML.

As well as being more time consuming, pandoc also has different the behaviour. E.g. I use a lot of &nbsp; in some of my markdown emails, which pandoc converts to spaces, which Thunderbird ignores.

@ljakab
Copy link

ljakab commented Dec 11, 2020

Has anyone started an effort to get the extension migrated to MailExtensions? I wonder if some interested folks could get organized in a chat room, see what has been done, avoid duplicating effort, and use everyone's strengths and limited free time to revive the project?

@Wheest
Copy link

Wheest commented Dec 11, 2020

@ljakab see #644, where we are discussing possible ways forward.

@ljakab
Copy link

ljakab commented Dec 11, 2020

@ljakab see #644, where we are discussing possible ways forward.

Yeah, I saw that issue too, but I thought posting here might have a wider blast radius for finding people willing to do some technical work on it. It looks like there is no current ongoing effort that we know of.

@neilmayhew
Copy link

See the important new development on #644. @Qqwy, I think this issue can be closed now.

@Qqwy Qqwy closed this as completed Jan 2, 2021
@Qqwy
Copy link
Author

Qqwy commented Jan 2, 2021

@neilmayhew Thank you for reaching out.

I'll close this issue, and eagerly look forward to progress in #644. 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests