Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

ComposeMessage issues

16 views
Skip to first unread message

rene

unread,
Oct 13, 2019, 11:42:09 AM10/13/19
to dev-apps-t...@lists.mozilla.org
Hi,

while working on https://bugzilla.mozilla.org/show_bug.cgi?id=1518025
I'm trying to understand how MessageCompose is done in Thunderbird. Some
questions came up, as usual, the more you learn about some area the more
questions you've got.

Message-Compose is done after a preparation in
mailCommands.js:ComposeMessage in
nsMsgComposeService::OpenComposeWindow. At this point Drafts, Templates
and EditAsNew messages are parsed through a mime reader
(LoadDraftOrTemplate) and Reply-Messages are opened via
OpenComposeWindowWithParams without parsing the complete message.

Having the message not parsed completely on Replys has different effects.

Assume for instance you only show headers for your IMAP-mails and
prevent previews of the message by hiding the preview area. If you try
to forward such a message, everything will be ok. If you are going to
reply, you will end with an empty message without some recipient in your
compose-window (tested with daily 71.0a1)

Question: Is there a special reason why there are different ways for
Templates-etc. and Reply's?

I've also run into issues with the pre-selected identity via
mailCommands.js:ComposeMessage->findDeliveredToIdentityEmail . Probably
nobody uses a "delivered-to" header, but if you do, the detection of
this header and therefore the selected identity for your Reply is
dependent on your display settings as well. No preview, no header,
different identity.

Is there anybody who can help me understanding the Why and WhyNots of
MessageCompose?

Best regards, Rene

Jörg Knobloch

unread,
Oct 13, 2019, 4:34:28 PM10/13/19
to dev-apps-t...@lists.mozilla.org
On 13/10/2019 17:41, rene wrote:
> Is there anybody who can help me understanding the Why and WhyNots of
> MessageCompose?

A compose peer?

As you discovered, the ways of compose are twisted and replying works
completely differently to forward/edit as new/edit draft.

I once tried to work out how it works and attached my findings to a bug,
but it's faster to add the document here.

Jörg.

Compose pipeline.txt

rene

unread,
Oct 14, 2019, 11:11:30 AM10/14/19
to dev-apps-t...@lists.mozilla.org
Hi Jörg,

thanks for the overview... seems to match my impression.

you wrote in your attachment:
"We can userstand so far that the compose types that go through the MIME
processing here have an advantage since they parsed the exising message
with MIME. The remaining types, especially all the reply types, don't
seem to know about the original message so far."

So, why there are two way of handling Compose-Types, 'historical'
reasons? Why not sending all types trough mime processing?

Until now I thought the only difference between forwarding some or
replying to an email should be the auto-insertion of the recipient
address in the reply case... Am I missing something here?

Regards, Rene
> _______________________________________________
> dev-apps-thunderbird mailing list
> dev-apps-t...@lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-apps-thunderbird
>

Jörg Knobloch

unread,
Oct 14, 2019, 3:50:23 PM10/14/19
to dev-apps-t...@lists.mozilla.org
On 14/10/2019 17:11, rene wrote:
> So, why there are two way of handling Compose-Types, 'historical'
> reasons? Why not sending all types trough mime processing?
>
> Until now I thought the only difference between forwarding some or
> replying to an email should be the auto-insertion of the recipient
> address in the reply case... Am I missing something here?

That stuff existed before I joined the project, so I don't know.

For replies, which are inserted as a quote, the work happens in
QuotingOutputStreamListener::OnStopRequest().

Jörg.

ishikawa

unread,
Oct 21, 2019, 4:45:35 AM10/21/19
to Jörg Knobloch
Dear Jörg,

I found the call flow analysis very useful.

Have you created the relationship paragraphs using, say VS 201x addon tool
or something?
(I understand you develop TB under Windows.)

I have been trying to find a good call flow graph/diagram generator which is
detailed enough to
help occasional patch submitters like me to understand the C-C TB code.
(Even a crude call-relationship description a la cflow for C program would
be fine.)
Doxygen is not good enough (not complete) for a patch developer: not many
functions are annotated to begin with :-(

I have searched for such a tool a few weeks ago, but none seems to fit the bill.

If there is a good addon tool for VS201x suite, I may simply install the
tool just for obtaining the call-callee listing.

I am currently only interested in C++ source files.

TIA


Buddy Butterfly

unread,
Oct 21, 2019, 4:54:03 AM10/21/19
to dev-apps-t...@lists.mozilla.org

Hi,

call graphs and navigation is built-in in Netbeans.
Install latest netbeans 11.1, enable the update source
for version 8.2 (last tab in update window) and install
c++ support. You can get from any point a call graph
with switching directions. Also nice is the macro expansion.

Cheers,
Matt


Am 21.10.19 um 10:45 schrieb ishikawa:
Dear Jörg,

I found the call flow analysis very useful.

Have you created the relationship paragraphs using, say VS 201x addon tool
or something?
(I understand you develop TB under Windows.)

I have been trying to find a good call flow graph/diagram generator which is
detailed enough to
help occasional patch submitters like me to understand the C-C TB code.
(Even a crude call-relationship description a la cflow for C program would
be fine.)
Doxygen is not good enough (not complete) for a patch developer: not many
functions are annotated to begin with :-(

I have searched for such a tool a few weeks ago, but none seems to fit the bill.

If there is a good addon tool for VS201x suite, I may simply install the
tool just for obtaining the call-callee listing.

I am currently only interested in C++ source files.

TIA


_______________________________________________
dev-apps-thunderbird mailing list
dev-apps-t...@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-apps-thunderbird

ishikawa

unread,
Oct 23, 2019, 7:06:45 AM10/23/19
to
Thank you for the tips.

I have not installed serious IDE for a while now. I tinkered with Eclipse
several years ago, but gave up due to the slowness on my then not so
powerful PC.

Maybe I should give a serious IDE a try again now that my PC has multi core
CPU (8 real core to boot!) and 16GB memory: Actually, I do most of the work
under linux in Virtualbox hosted under Windows 10 due to driver issues.
Now I split CPU cores and memory between the host Windows 10 and guest
linux. Today, guest linux has 7 virtual cores and 16GB while the host
Windows have 9 virtual cores and can use the rest of 32 GB real memory. Back
when I tinkered with Eclipse, I think the total core was four and the memory
as a whole is 16GB.
(My CPU is Ryzen 1700: it has 8 real core with hyperthreading. It is very
low-power and thus I could build very quiet computer using the stock fan
that came with the CPU package. With 16MB cache, it is a very fast CPU when
I run C-C TB under valgrind even. )

I will report back my finding after I install Netbeans and experiment with it.

Chiaki

ishikawa

unread,
Oct 23, 2019, 9:16:08 PM10/23/19
to
After installing netbeans, I realize one thing.
It only supports GNU Make as build scheme. (Maybe there are later additions,
but I don't know.)

On the other hand, Eclispse *seems* to be supported by |mach|.
|mach ide eclipse| seems to create the project template for use with Eclipse.

Given the necessary massaging to let Netbeans know the used file set and
dependencies, I decided
try Eclipse instead.

Netbeans dynamic call status viewer, also called Call Diagram or some such
(using dynamic profiling support of Linux kernel) seems very promising.
I wonder if Eclipse has something similar. I will try investigating this as
well.
My initial and foremost interest is the static call graph to help me/us in
understanding the code structure.

TIA

Chiaki

PS: I am pleasantly surprised that
Netbeans boots rather quickly thanks to today's CPU power.
I wonder how Eclipse will fare on my PC. Many years ago when I tried Eclipse,
it was so slow that I had to ditch it in a day.

I will report the progress.

ISHIKAWA,chiaki

unread,
Oct 24, 2019, 5:08:33 PM10/24/19
to dev-apps-t...@lists.mozilla.org
Intermediate result.

I am trying Eclipse.

Installing Eclipse under Debian GNU/Linux needs one blackmagic.
Without the tips in the following post, installation won't proceed at
all (!)

https://superuser.com/questions/1455397/debian-9-org-eclipse-swt-swterror-no-more-handles-immediately-after-opening-ec

It seems to have something to do with multi-octet unicode input system
such as for Japanese.
(I have no idea how that can affect Eclipse installer.)

But ten, unfortunately, |mach ide eclipse| fails with a missing module
or something.

See https://bugzilla.mozilla.org/show_bug.cgi?id=1591229

Stay tuned...

Chiaki
0 new messages