Gnus development mailing list
 help / color / mirror / Atom feed
From: Reiner Steib <reinersteib+gmane@imap.cc>
To: Chong Yidong <cyd@stupidchicken.com>
Cc: emacs-devel@gnu.org, ding@gnus.org
Subject: Re: Mail mode vs message mode
Date: Tue, 17 Nov 2009 22:10:08 +0100	[thread overview]
Message-ID: <87iqd8rh73.fsf@marauder.physik.uni-ulm.de> (raw)
In-Reply-To: <876399p00j.fsf@stupidchicken.com> (Chong Yidong's message of "Tue, 17 Nov 2009 11:51:56 -0500")

[ You probably meant ding@gnus not ding@gnu;  Quote not trimmed. ]

On Tue, Nov 17 2009, Chong Yidong wrote:

> Chong Yidong <cyd@stupidchicken.com> writes:
>
>> 1. Variables that are straightfowardly duplicated by message-mode.
>>    These variables should be either made into variable aliases (assuming
>>    no one would ever want to have different behaviors between
>>    message-mode and mail-mode):
>>
>>    mail-from-style      message-from-style
>>    mail-envelope-from   message-envelope-from
>>    mail-interactive     message-interactive
>>    mail-yank-prefix     message-yank-prefix
>>    mail-signature       message-signature
>>    mail-signature-file  message-signature-file
>>    mail-default-headers message-default-headers
>>    mail-indentation-spaces         message-indentation-spaces

No difference here for me (Emacs 23.1).

>>    mail-mailer-swallows-blank-line message-mailer-swallows-blank-line

The latter is a defcustom.  Any other difference?

> After thinking about this some more, I think using defvaralias is a bad
> idea.
>
> Would anyone object to setting the default values for the message-mode
> variables to the corresponding mail-mode variables? e.g.,
>
> (defcustom message-from-style
>     (if (featurep 'xemacs) 'angles mail-from-style)
>     ....)

I don't like this.  The current default value of message-from-style
tries to avoid quoting if possible and therefore is preferable to
`angles'.  BTW, message-mode doesn't handle the value
`system-default'.

I'd certainly object to change the default `message-yank-prefix' to
nil!

If I understand the correctly, the goal is not to provide full
compatibility with mail-mode but to have a default mail composition
mode that handles MIME correctly.  So how about simply providing a
function, say `message-initalize-from-mail-mode' that initializes
message variables and hooks from the corresponding mail-mode ones?

Draft (we need to check if all possible values of mail-foo make sense
for message-foo):

(defun message-initalize-from-mail-mode ()
  (setq
   message-from-style                 mail-from-style
   message-envelope-from              mail-envelope-from
   message-interactive                mail-interactive
   message-yank-prefix                mail-yank-prefix
   message-signature                  mail-signature
   message-signature-file             mail-signature-file
   message-default-headers            mail-default-headers
   message-indentation-spaces         mail-indentation-spaces
   message-mailer-swallows-blank-line mail-mailer-swallows-blank-line)
  (setq
   ;; hooks
   message-mode-hook	 mail-mode-hook
   message-citation-hook mail-citation-hook
   message-setup-hook    mail-setup-hook
   message-send-hook     mail-send-hook))

>> 2. Hook variables.  I am not sure what to do about this, but the switch
>>    has bitten at least one use (Bug#3942).  Maybe we should make these
>>    variable aliases too:
>>
>>    mail-mode-hook     message-mode-hook
>>    mail-citation-hook message-citation-hook
>>    mail-setup-hook    message-setup-hook
>>    mail-send-hook     message-send-hook
>
> Any objections to adding a new user option message-run-mail-hooks,
> which, if non-nil, causes message mode to run the corresponding mail
> hooks as well?

Bye, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo---  |  PGP key available  |  http://rsteib.home.pages.de/



       reply	other threads:[~2009-11-17 21:10 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <87639beb4n.fsf@stupidchicken.com>
     [not found] ` <876399p00j.fsf@stupidchicken.com>
2009-11-17 21:10   ` Reiner Steib [this message]
2009-11-18 16:53     ` Chong Yidong
2009-11-18 19:20       ` Reiner Steib
2009-11-19 14:56         ` Teemu Likonen
2009-11-19 16:53         ` Chong Yidong
2009-11-20  0:07           ` Katsumi Yamaoka
2009-11-22 15:55             ` Reiner Steib
2009-11-24  9:19               ` Katsumi Yamaoka
2009-11-25 21:40                 ` Reiner Steib
2009-11-25 23:02                   ` Stefan Monnier
2009-11-25 23:13                     ` Chong Yidong
2009-11-26  1:27                       ` Stefan Monnier
2009-11-26  1:43                         ` Miles Bader
2009-11-28 13:47                           ` Stefan Monnier
2009-11-27  8:41                   ` Katsumi Yamaoka
2009-11-27 14:51                     ` Chong Yidong
2009-11-29  0:32                       ` Katsumi Yamaoka
2009-11-29 18:49                         ` Chong Yidong
2009-11-30  0:00                           ` Katsumi Yamaoka
2009-11-22 15:55           ` 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=87iqd8rh73.fsf@marauder.physik.uni-ulm.de \
    --to=reinersteib+gmane@imap.cc \
    --cc=Reiner.Steib@gmx.de \
    --cc=cyd@stupidchicken.com \
    --cc=ding@gnus.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).