Developing addons for Thunderbird 52+ // Where's the beef?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Developing addons for Thunderbird 52+ // Where's the beef?

Ralph Seichter
Hello folks,

I was looking for Thunderbird plugins that use the headers described in
https://datatracker.ietf.org/doc/rfc2369/ (List-Help, List-Unsubscribe
etc.) to provide convenience functions for mailing lists, similar to
TB's existing "Reply List" function. The following seem related, but are
apparently no longer being maintained:

  https://addons.mozilla.org/en-US/thunderbird/addon/display-mailing-list-header/
  https://addons.mozilla.org/en-US/thunderbird/addon/unsubscribe-from-mailing-list/

I then said to myself "I shall develop my own plugin", but after having
spent several evenings in vain trying to find up-to-date documentation
and tutorials on how to develop Thunderbird extensions, I feel sobered.
Among the more official sources I used are:

  https://developer.mozilla.org/en-US/Add-ons/Thunderbird
  https://developer.mozilla.org/en-US/Add-ons/Thunderbird/Building_a_Thunderbird_extension
  https://addons.mozilla.org/en-US/developer_faq (focuses on Firefox, no
  mention of Thunderbird any more)

Information appears to be marked as outdated or obsolete(*), and
unfortunately I don't know where/how to start. The archives here show
that, as expected, I am not the only hopeful TB plugin developer asking
for advice. Can you point me in the right direction to get started? I
have briefly considered writing directly to plugin authors to ask for
pointers, but that seems a bit rude.

Your help is appreciated.

-Ralph

(*) My current target platforms are macOS and Windows with TB 52.x,
which might not matter much, given that plugins are written in JS.

_______________________________________________
dev-apps-thunderbird mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-apps-thunderbird
Reply | Threaded
Open this post in threaded view
|

Re: Developing addons for Thunderbird 52+ // Where's the beef?

opto

>
> Information appears to be marked as outdated or obsolete(*), and
> unfortunately I don't know where/how to start.

yes, that is about the same experience that I made. Some info on MDN is correct, some isn't, sometimes things don't work that should do according to documentation. That can take hours to understand or to find a workaround.

There are quite a few examples on stackoverflow, examples on MDN, on Beonex (old MDN). They work or do not.

I just downloaded working addons and had a look at their code. Sometimes, I get answers here in this forum if the questions are not too specialised.

Sometimes, it helps to look at comm central code. But it is so huge that it can take hours to find something. Finding is the problem, not understanding the code - that is written pretty much ok. (e.g. ... where is this dammed folderpicker defined?? does it want folderURI or nsIMessageFolder as parameter?)

On specialised questions, I sometimes have the impression that the codebase is so big that nobody knows any longer. Or that there are so few knowing that they do not have the time to help in this forum.

So sometimes, even simplest things seem to take an excessive time to do. (BTW, I am programming now for > 30 years - but not JS not TB).


Klaus
_______________________________________________
dev-apps-thunderbird mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-apps-thunderbird
Reply | Threaded
Open this post in threaded view
|

Re: Developing addons for Thunderbird 52+ // Where's the beef?

ISHIKAWA,chiaki

> On specialised questions, I sometimes have the impression that the codebase is so big that nobody knows any longer. Or that there are so few knowing that they do not have the time to help in this forum.
>
> So sometimes, even simplest things seem to take an excessive time to do. (BTW, I am programming now for > 30 years - but not JS not TB).

I have tried to fix some bugs and deficiencies of TB.
I have been programming for close to 40 years (the first was on punched
card FORTRAN code), and feel exactly the same, especially when nobody
seems to know why a pointer variable can become nullptr and
cause SIGSEGV, and as a kludge, we check for the nullness before
referencing through it.

It would be interesting develop an AI program to understand a huge
codebase such as TB so that we can ask "Where is this variable set?" or
"Can I set this variable here and the code would work elsewhere?" and
the AI can deduce a useful answer. The first question may look easy
superficially, but given that some variables are passed by reference to
functions which may or may not set the value, mere textual search is not
enough. (dxr allows us to search textually very quickly.) We need
partial execution and dataflow analysis, etc. to figure out where the
variable can be set, or it has undesirable side-effect, etc. [of course,
we have the halting problem. So there are dead code that can never be
executed, etc. Some things cannot be known by static analysis alone and
for that matter, cannot be proven in principle even.)


_______________________________________________
dev-apps-thunderbird mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-apps-thunderbird
Reply | Threaded
Open this post in threaded view
|

Re: Developing addons for Thunderbird 52+ // Where's the beef?

Ralph Seichter
In reply to this post by opto
On 04.09.2017 22:54, opto wrote:

> I just downloaded working addons and had a look at their code.

I tried that as well, starting with Enigmail. This extension is actively
maintained (version 1.9.8.2 is marked for Thunderbird 52-55), and I find
it extremely useful. Unfortunately Enigmail seems quite complex (not
surprising in light of all it can do), so it might not be the optimal
addon to base my first steps on. Then again, Enigmail touches various
different aspects of Thunderbird, like message content, complex dialogs,
calling external programs, etc., so there is a lot of material to mine.

Do you have particular addons in mind? Based on my use case, it would
probably be a good idea to extend the "Reply List" popup menu, or add a
similar menu, if List-* headers are found in the currently displayed
message. An additional option would be to show existing List-* headers
in Thunderbird's message header section, with http and mailto URLs the
user can click.

> So sometimes, even simplest things seem to take an excessive time to
> do. (BTW, I am programming now for > 30 years - but not JS not TB).

Like Chiaki and yourself I have extensive programming experience (35+
years in my case, all hail the geezers), but I cannot remember finding
it so difficult to get started with anything previously. Information
seems to pass from master to apprentice, or by copying others, rather
than through documentation. ;-)

-Ralph
_______________________________________________
dev-apps-thunderbird mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-apps-thunderbird