@matheusbsbs / matheus-bagliano / commits / dc53151f02
Fork 0

Documentation: hints for sending patches inline with Thunderbird

The standard reference for this information is the article "Plain text e-mail - Thunderbird#Completely_plain_email" at kb.mozillazine.org, but the hints hidden away in git's SubmittingPatches file are more complete. Move them to the "git format-patch" manual so they can be installed with git and read by a wide audience. While at it, make some tweaks: - update "Approach #1" so it might work with Thunderbird 3; - remove ancient version numbers from the descriptions of both approaches so current readers might have more reason to complain if they don't work. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Jonathan Nieder committed Apr 14, 2011 at 21:28 UTC dc53151f02ce05f21641895f08808ff7caa9854f
2 files changed +84 -80
Documentation/SubmittingPatches
+1 -80
@@ -416,86 +416,7 @@ it.
416 Thunderbird
417 -----------
418
419 -(A Large Angry SCM)
420 -
421 -By default, Thunderbird will both wrap emails as well as flag them as
422 -being 'format=flowed', both of which will make the resulting email unusable
423 -by git.
424 -
425 -Here are some hints on how to successfully submit patches inline using
426 -Thunderbird.
427 -
428 -There are two different approaches. One approach is to configure
429 -Thunderbird to not mangle patches. The second approach is to use
430 -an external editor to keep Thunderbird from mangling the patches.
431 -
432 -Approach #1 (configuration):
433 -
434 -This recipe is current as of Thunderbird 2.0.0.19. Three steps:
435 - 1. Configure your mail server composition as plain text
436 - Edit...Account Settings...Composition & Addressing,
437 - uncheck 'Compose Messages in HTML'.
438 - 2. Configure your general composition window to not wrap
439 - Edit..Preferences..Composition, wrap plain text messages at 0
440 - 3. Disable the use of format=flowed
441 - Edit..Preferences..Advanced..Config Editor. Search for:
442 - mailnews.send_plaintext_flowed
443 - toggle it to make sure it is set to 'false'.
444 -
445 -After that is done, you should be able to compose email as you
446 -otherwise would (cut + paste, git-format-patch | git-imap-send, etc),
447 -and the patches should not be mangled.
448 -
449 -Approach #2 (external editor):
450 -
451 -This recipe appears to work with the current [*1*] Thunderbird from Suse.
452 -
453 -The following Thunderbird extensions are needed:
454 - AboutConfig 0.5
455 - http://aboutconfig.mozdev.org/
456 - External Editor 0.7.2
457 - http://globs.org/articles.php?lng=en&pg=8
458 -
459 -1) Prepare the patch as a text file using your method of choice.
460 -
461 -2) Before opening a compose window, use Edit->Account Settings to
462 -uncheck the "Compose messages in HTML format" setting in the
463 -"Composition & Addressing" panel of the account to be used to send the
464 -patch. [*2*]
465 -
466 -3) In the main Thunderbird window, _before_ you open the compose window
467 -for the patch, use Tools->about:config to set the following to the
468 -indicated values:
469 - mailnews.send_plaintext_flowed => false
470 - mailnews.wraplength => 0
471 -
472 -4) Open a compose window and click the external editor icon.
473 -
474 -5) In the external editor window, read in the patch file and exit the
475 -editor normally.
476 -
477 -6) Back in the compose window: Add whatever other text you wish to the
478 -message, complete the addressing and subject fields, and press send.
479 -
480 -7) Optionally, undo the about:config/account settings changes made in
481 -steps 2 & 3.
482 -
483 -
484 -[Footnotes]
485 -*1* Version 1.0 (20041207) from the MozillaThunderbird-1.0-5 rpm of Suse
486 -9.3 professional updates.
487 -
488 -*2* It may be possible to do this with about:config and the following
489 -settings but I haven't tried, yet.
490 - mail.html_compose => false
491 - mail.identity.default.compose_html => false
492 - mail.identity.id?.compose_html => false
493 -
494 -(Lukas Sandström)
495 -
496 -There is a script in contrib/thunderbird-patch-inline which can help
497 -you include patches with Thunderbird in an easy way. To use it, do the
498 -steps above and then use the script as the external editor.
419 +See the MUA-SPECIFIC HINTS section of git-format-patch(1).
420
421 Gnus
422 ----
Documentation/git-format-patch.txt
+83
@@ -332,6 +332,89 @@ If it does not apply correctly, there can be various reasons.
332 patch e-mail should come after the three-dash line that signals
333 the end of the commit message.
334
335 +MUA-SPECIFIC HINTS
336 +------------------
337 +Here are some hints on how to successfully submit patches inline using
338 +various mailers.
339 +
340 +Thunderbird
341 +~~~~~~~~~~~
342 +By default, Thunderbird will both wrap emails as well as flag
343 +them as being 'format=flowed', both of which will make the
344 +resulting email unusable by git.
345 +
346 +There are two different approaches. One approach is to configure
347 +Thunderbird to not mangle patches. The second approach is to use
348 +an external editor to keep Thunderbird from mangling the patches.
349 +
350 +Approach #1 (configuration)
351 +^^^^^^^^^^^^^^^^^^^^^^^^^^^
352 +Three steps:
353 +
354 +1. Configure your mail server composition as plain text:
355 + Edit...Account Settings...Composition & Addressing,
356 + uncheck "Compose Messages in HTML".
357 +
358 +2. Configure your general composition window to not wrap.
359 ++
360 +In Thunderbird 2:
361 +Edit..Preferences..Composition, wrap plain text messages at 0
362 ++
363 +In Thunderbird 3:
364 +Edit..Preferences..Advanced..Config Editor. Search for
365 +"mail.wrap_long_lines".
366 +Toggle it to make sure it is set to `false`.
367 +
368 +3. Disable the use of format=flowed:
369 +Edit..Preferences..Advanced..Config Editor. Search for
370 +"mailnews.send_plaintext_flowed".
371 +Toggle it to make sure it is set to `false`.
372 +
373 +After that is done, you should be able to compose email as you
374 +otherwise would (cut + paste, 'git format-patch' | 'git imap-send', etc),
375 +and the patches will not be mangled.
376 +
377 +Approach #2 (external editor)
378 +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
379 +
380 +The following Thunderbird extensions are needed:
381 +AboutConfig from http://aboutconfig.mozdev.org/ and
382 +External Editor from http://globs.org/articles.php?lng=en&pg=8
383 +
384 +1. Prepare the patch as a text file using your method of choice.
385 +
386 +2. Before opening a compose window, use Edit->Account Settings to
387 + uncheck the "Compose messages in HTML format" setting in the
388 + "Composition & Addressing" panel of the account to be used to
389 + send the patch.
390 +
391 +3. In the main Thunderbird window, 'before' you open the compose
392 + window for the patch, use Tools->about:config to set the
393 + following to the indicated values:
394 ++
395 +----------
396 + mailnews.send_plaintext_flowed => false
397 + mailnews.wraplength => 0
398 +----------
399 +
400 +4. Open a compose window and click the external editor icon.
401 +
402 +5. In the external editor window, read in the patch file and exit
403 + the editor normally.
404 +
405 +Side note: it may be possible to do step 2 with
406 +about:config and the following settings but no one's tried yet.
407 +
408 +----------
409 + mail.html_compose => false
410 + mail.identity.default.compose_html => false
411 + mail.identity.id?.compose_html => false
412 +----------
413 +
414 +There is a script in contrib/thunderbird-patch-inline which can help
415 +you include patches with Thunderbird in an easy way. To use it, do the
416 +steps above and then use the script as the external editor.
417 +
418
419 EXAMPLES
420 --------