Gnus development mailing list
 help / color / mirror / Atom feed
From: Reiner Steib <reinersteib+gmane@imap.cc>
To: Eli Zaretskii <eliz@gnu.org>
Cc: ding@gnus.org, emacs-devel@gnu.org
Subject: Differences between mail-mode and message-mode (was: message-mode is now default?)
Date: Sun, 19 Jul 2009 13:41:32 +0200	[thread overview]
Message-ID: <874ot8zyqb.fsf@marauder.physik.uni-ulm.de> (raw)
In-Reply-To: <83vdlqp0rt.fsf@gnu.org>

On Sat, Jul 18 2009, Eli Zaretskii wrote:

> I had a few spare moments, so I compared mail-mode and message-mode.
> The differences I found are below.
>
> Disclaimers:
>
>     Please note that I don't necessarily think all of them should be
>     changed to match mail-mode, in order for message-mode to be
>     compatible.  But I do think they all need to be _considered_.

Thanks for your analysis.  No matter in which direction a change will
go, this list will be a good basis for NEWS entries (either for
mail-mode or message-mode users).

>     I also don't pretend to have found all the important differences,
>     nor that all my conclusions below are correct.

>     Finally, what's below is based on inspection of the *Help* buffer
>     and defcustoms; I didn't actually try using message-mode, and
>     don't know anything about it, except what I saw just now.
>
> Here's what I found:
[ key bindings ]

Obviously the key bindings cannot be resolved without a change for
either mail-mode or message-mode users.  Maybe set the bindings
depending on some compatibility variable?

>  . In mail-mode C-c C-f C-f moves to FCC; in message-mode C-c C-f C-f
>    moves to Followup-To, and C-c C-f C-w moves to FCC.
>
>  . In mail-mode C-c C-f C-a moves to Mail-Reply-To; in message-mode
>    C-c C-f C-a runs the command
>    `message-generate-unsubscribed-mail-followup-to' and there doesn't
>    seem to be a command to move to Mail-Reply-To.
>
>  . In mail-mode C-c C-f C-l moves to Mail-Followup-To; in message-mode
>    C-c C-f C-m moves to Mail-Followup-To and C-c C-f C-l is undefined
>
>  . In mail-mode C-c C-t moves to message text; in message-mode this is
>    on C-c C-b, while C-c C-t runs `message-insert-to'.
>
>  . In mail-mode C-c C-v runs `mail-sent-via'; in message-mode it runs
>    `message-delete-not-region'.

What is "Sent-Via" about?  Neither Google nor grepping through the
RFCs gave me any useful result. [1]

>  . mail-mode runs `text-mode-hook' and `mail-mode-hook'; message-mode
>    says it runs `message-mode-hook' "in addition to any hooks its
>    parent mode `text-mode' might have run" -- it isn't clear to me if
>    these two are compatible wrt what text-mode does.

This text is from `derived-mode-make-docstring'.  message-mode is
derived from text-mode.

>  . message-mode overrides the following global key bindings:
>
>    - C-a runs `message-beginning-of-line'

This is somewhat similar to C-a in the minibuffer.  If you want to
move beyond the mail header (e.g. "Subject: "), just press C-a again.

>    - TAB runs `message-tab'

`message-tab' expand partially typed headers,
cf. `message-completion-alist'.

>    - M-; runs `comment-region'

AFAICS, in mail-mode, `M-;' runs `comment-dwim', which first asks for
a comment syntax since none is defined.

>  . message-mode's default value of `message-generate-new-buffers'
>    seems to generate buffer names in a way that is different from what
>    mail-mode does.

AFAICS, if I do `M-x message-mail RET', I get also get a "*mail*"
buffer.

>  . message-mode's default value of `message-fill-column' overrides the
>    global value of `fill-column'.

I used the recommendation from the relevant RFCs or GNKSA docs, IIRC.
Unlike `fill-column' which affects the user (and his co-workers, ...),
the fill column in mails (and news) should try to make sense for the
recipients.

>  . mail-mode uses `mail-setup-hook'; message-mode uses
>    `message-setup-hook'.

On Sat, Jul 18 2009, Miles Bader wrote:
| One issue, of course is hook names; would it work to simply have
| message-mode use the mail-mode hooks directly, and use variable-aliasing
| to accommodate people that use the message-foo-hook names?

Miles, is `defvaralias' what you have in mind?

  @@ -905,12 +923,13 @@
   (defcustom message-setup-hook nil
     "Normal hook, run each time a new outgoing message is initialized.
   The function `message-setup' runs this hook."
  [...] 
  +(defvaralias 'mail-setup-hook 'message-setup-hook)
  [...] 

>  . mail-mode uses `mail-yank-hooks'; message-mode doesn't appear to
>    have such a facility.

,----
| ;; FIXME make it really obsolete.
| (defvar mail-yank-hooks nil
|   "Obsolete hook for modifying a citation just inserted in the mail buffer.
| Each hook function can find the citation between (point) and (mark t).
| And each hook function should leave point and mark around the citation
| text as modified.
| 
| This is a normal hook, misnamed for historical reasons.
| It is semi-obsolete and mail agents should no longer use it.")
`----

Should we care about it if is obsolete?

>  . message-mode's default value of `message-citation-line-format'
>    seems to produce different results compared to what `r' in Rmail
>    produces.

AFAICS, `r' doesn't cite at all and produce not citation line (neither
does `C-c C-y' (`mail-yank-original').

>  . message-mode's default values of `message-yank-cited-prefix' and
>    `message-yank-empty-prefix' are different from the results produced
>    by the default value of `mail-yank-prefix', and the names of the
>    options are also different.

You mean the indentation?  I think message mode's default are much
better.

>  . message-mode's default value of `message-signature' is different
>    from mail-mode's `mail-signature', 

I think using ~/.signature by default is reasonable.

>    and the names of the options are different.

See above -> Alias?

>  . mail-mode uses `mail-signature-file'; message-mode uses
>    `message-signature-file'.

See above -> Alias?

>  . mail-mode uses `mail-default-directory' for auto-saving mail
>    buffers; message-mode uses `message-auto-save-directory', 

See above -> Alias?

>    and the default values are also different.

message-mode tries to write all it's files under ~/Mail .  Many users
like to sync their mail stuff between different computers.
message-mode's default makes this easier.

>  . mail-mode uses `mail-mode-syntax-table'; message-mode uses
>    `message-mode-syntax-table.  The default values are also
>    different.

I don't know why message mode additionally contains `>' and `<'.
message-mode also copies `text-mode-syntax-table'.

>  . mail-mode uses `mail-send-hook'; message-mode uses
>    `message-send-mail-hook' and `message-send-hook'.

See above -> Alias?

>  . mail-mode's `mail-bury' tries to show the Rmail buffer if
>    `mail-bury-selects-summary' is non-nil.  message-mode's
>    `message-bury' doesn't seem to have a comparable feature.  (This is
>    important when reading mail on a text terminal.)

Probably we should call code like `mail-bury' to `message-bury' if
`rmail-summary-buffer' is non-nil.

>  . message-mode doesn't seem to have an equivalent of `mail-use-dsn'.

We could add the `mail-use-dsn' code to `message-send-mail-with-sendmail'.

Bye, Reiner.

[1] http://www.google.com/search?q=%2B"Sent-Via"+mail+header+rfc

    $ dpkg -l 'doc-rfc-*'
    [...]
    ii  doc-rfc-0001-0999        20030621-1               Other RFCs
    ii  doc-rfc-1000-1999        20030621-1               Other RFCs
    ii  doc-rfc-2000-2999        20030621-1               Other RFCs
    ii  doc-rfc-3000-3999        20030621-1               Other RFCs
    ii  doc-rfc-experimental     20030621-1               Experimental RFCs
    ii  doc-rfc-fyi-bcp          20030621-1               FYI and BCP RFCs
    ii  doc-rfc-misc             20030621-1               Miscellaneous RFCs
    ii  doc-rfc-old-std          20030621-1               Old Standard RFCs
    ii  doc-rfc-std              20030621-1               Standard RFCs
    ii  doc-rfc-std-proposed     20030621-1               Proposed Standard RFCs
    
    /usr/share/doc/RFC$ zgrep -ie Sent-Via */*.txt.gz
    /usr/share/doc/RFC$ 
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo---  |  PGP key available  |  http://rsteib.home.pages.de/




       reply	other threads:[~2009-07-19 11:41 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <E1MRmmG-0006yL-WB@fencepost.gnu.org>
     [not found] ` <E1MRn3w-0003wj-QT@fencepost.gnu.org>
     [not found]   ` <E1MRxo5-00037n-1N@fencepost.gnu.org>
     [not found]     ` <878wimdbzp.fsf@catnip.gol.com>
     [not found]       ` <87tz1av8ik.fsf@bzg.ath.cx>
     [not found]         ` <83vdlqp0rt.fsf@gnu.org>
2009-07-19 11:41           ` Reiner Steib [this message]
2009-07-19 12:32             ` Differences between mail-mode and message-mode Sven Joachim
2009-07-19 17:51             ` Eli Zaretskii
2009-07-19 18:11               ` Eli Zaretskii
2009-07-22  7:35             ` Differences between mail-mode and message-mode (was: message-mode is now default?) Stephen J. Turnbull
2009-07-22 18:46               ` Differences between mail-mode and message-mode Reiner Steib
2009-07-23  3:05                 ` Stephen J. Turnbull
2009-07-23  5:03                   ` Miles Bader
     [not found]         ` <jwviqhq14u9.fsf-monnier+emacs@gnu.org>
     [not found]           ` <E1MSRQV-0006zG-40@fencepost.gnu.org>
     [not found]             ` <873a8tc92j.fsf@lola.goethe.zz>
     [not found]               ` <E1MSU0K-0005kX-PZ@fencepost.gnu.org>
2009-07-19 11:56                 ` Differences between mail-mode and message-mode - sending mail (was: message-mode is now default?) Reiner Steib
     [not found]           ` <E1MSO9K-00030v-Go@fencepost.gnu.org>
     [not found]             ` <87k525mfo7.fsf@catnip.gol.com>
     [not found]               ` <87eisb715o.fsf@stupidchicken.com>
2009-07-20 20:42                 ` message-mode is now default? Reiner Steib

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=874ot8zyqb.fsf@marauder.physik.uni-ulm.de \
    --to=reinersteib+gmane@imap.cc \
    --cc=Reiner.Steib@gmx.de \
    --cc=ding@gnus.org \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).