unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#11359: 24.1.50; Difficulty using report-emacs-bug with mew
@ 2012-04-27  7:55 Harald Hanche-Olsen
  2012-04-27 16:01 ` Glenn Morris
  0 siblings, 1 reply; 6+ messages in thread
From: Harald Hanche-Olsen @ 2012-04-27  7:55 UTC (permalink / raw)
  To: 11359

(Yes, I know mew is not part of emacs. Please bear with me.)

I am a mew user (mew is a mail package for emacs). When I wish to
report a bug using report-emacs-bug, I get a mew draft buffer to write
my bug report in, containing all the expected explanatory text. But
when I press C-c C-c (mew-draft-send-message), I first get a yes-or-no
question about whether I wish to send the message (ok), then a message
saying emacs is not set up to send mail, with three options about what
to do about it. This is wrong: Emacs is definitely set up to send
mail, just not using the standard package.

My workaround was to save the draft, kill the buffer, then reopen the
draft. Now the hooks installed by report-emacs-bug aren't there, and I
can send the message without any interference.

FYI, here are the relevant lines from .emacs:

(when (locate-library "mew")
  (autoload 'mew "mew" nil t)
  (autoload 'mew-send "mew" nil t)
  (autoload 'mew-user-agent-compose "mew" nil t)
  (define-mail-user-agent 'mew-user-agent 'mew-user-agent-compose
    'mew-draft-send-message 'mew-draft-kill 'mew-send-hook)
  (setq mail-user-agent 'mew-user-agent))

I think this should be sufficient for report-emacs-bug to understand
that emacs has indeed been configured to send mail.

In GNU Emacs 24.1.50.2 (x86_64-unknown-linux-gnu, GTK+ Version 2.20.1)
 of 2012-04-10 on fia.math.ntnu.no
Bzr revision: 107840 larsi@gnus.org-20120410112744-slbrfdrrjb0x1mfy
Windowing system distributor `The X.Org Foundation', version 11.0.10706000
Configured using:
 `configure 'prefix=/local/pkg/emacs/2012-04-10' '--with-gif=no''

- Harald





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#11359: 24.1.50; Difficulty using report-emacs-bug with mew
  2012-04-27  7:55 bug#11359: 24.1.50; Difficulty using report-emacs-bug with mew Harald Hanche-Olsen
@ 2012-04-27 16:01 ` Glenn Morris
  2012-04-27 18:01   ` Harald Hanche-Olsen
  0 siblings, 1 reply; 6+ messages in thread
From: Glenn Morris @ 2012-04-27 16:01 UTC (permalink / raw)
  To: Harald Hanche-Olsen; +Cc: 11359

Harald Hanche-Olsen wrote:

> (when (locate-library "mew")
>   (autoload 'mew "mew" nil t)
>   (autoload 'mew-send "mew" nil t)
>   (autoload 'mew-user-agent-compose "mew" nil t)
>   (define-mail-user-agent 'mew-user-agent 'mew-user-agent-compose
>     'mew-draft-send-message 'mew-draft-kill 'mew-send-hook)
>   (setq mail-user-agent 'mew-user-agent))
>
> I think this should be sufficient for report-emacs-bug to understand
> that emacs has indeed been configured to send mail.

I disagree. All that does is specify which package you want to use to
compose a mail. It does not show that Emacs has been configured to talk
to a mail server. It may happen that the old default settings happened
to work on your system, but in general there is no way for Emacs to know
that they work, so now it asks, once. The relevant variable is
send-mail-function, and there is no setting for that shown above.
Just answer the question the first time, and all should be fine.





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#11359: 24.1.50; Difficulty using report-emacs-bug with mew
  2012-04-27 16:01 ` Glenn Morris
@ 2012-04-27 18:01   ` Harald Hanche-Olsen
  2012-04-27 18:18     ` Glenn Morris
  0 siblings, 1 reply; 6+ messages in thread
From: Harald Hanche-Olsen @ 2012-04-27 18:01 UTC (permalink / raw)
  To: rgm; +Cc: 11359

Executive summary: I see now how this is supposed to work, but I think
the documentation is insufficient, and the experience was utterly
confusing.

[Glenn Morris <rgm@gnu.org> (2012-04-27 16:01:42 UTC)]

> Harald Hanche-Olsen wrote:
> 
> > (when (locate-library "mew")
> >   (autoload 'mew "mew" nil t)
> >   (autoload 'mew-send "mew" nil t)
> >   (autoload 'mew-user-agent-compose "mew" nil t)
> >   (define-mail-user-agent 'mew-user-agent 'mew-user-agent-compose
> >     'mew-draft-send-message 'mew-draft-kill 'mew-send-hook)
> >   (setq mail-user-agent 'mew-user-agent))
> >
> > I think this should be sufficient for report-emacs-bug to understand
> > that emacs has indeed been configured to send mail.
> 
> I disagree. All that does is specify which package you want to use to
> compose a mail. It does not show that Emacs has been configured to talk
> to a mail server. It may happen that the old default settings happened
> to work on your system, but in general there is no way for Emacs to know
> that they work, so now it asks, once. The relevant variable is
> send-mail-function, and there is no setting for that shown above.

Ah. I see. But then define-mail-user-agent seems incomplete. At the
very least, maybe the docstring for define-mail-user-agent should
mention send-mail-function? Also, section 35.6 of the info file
(Mail-Composition Methods) does mention message-user-agent, but not
send-mail-function. In fact, send-mail-function is mentioned only in
35.4.1 (Mail Sending), which is a subsection of Mail Mode. That does
not seem appropriate for a variable which is also important in
connection with other mail user agents.

> Just answer the question the first time, and all should be fine.

Except I didn't understand the question and the alternatives which
were as follows::

----------------
 Emacs is about to send an email message, but it has not been
 configured for sending email.  To tell Emacs how to send email:

 - Type `mail client' to start your default email client and
   pass it the message text.

 - Type `transport' to invoke the system's mail transport agent
   (the `/usr/sbin/sendmail' program).

 - Type `smtp' to send mail directly to an "outgoing mail" server.
   (Emacs may prompt you for SMTP settings).

 Emacs will record your selection and will use it thereafter.
 To change it later, customize the option `send-mail-function'.
----------------

When I saw this, I figured (wrongly, as it turned out) "default email
client" referred to an email client external to emacs. I don't have
any such client configured.

In other words, the confusion was total, and I ended up bailing out.

(I have now done the experiment, after altering the to address to
avoid spamming the bug tracker. The first alternative did in fact
work. Oddly enough, it set send-mail-function to mailclient-send-it,
and the message did in fact get sent, even though the file containing
the definition of mailclient-send-it did not even get loaded.)

- Harald





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#11359: 24.1.50; Difficulty using report-emacs-bug with mew
  2012-04-27 18:01   ` Harald Hanche-Olsen
@ 2012-04-27 18:18     ` Glenn Morris
  2012-04-27 18:32       ` Glenn Morris
  2012-04-27 18:42       ` Harald Hanche-Olsen
  0 siblings, 2 replies; 6+ messages in thread
From: Glenn Morris @ 2012-04-27 18:18 UTC (permalink / raw)
  To: Harald Hanche-Olsen; +Cc: 11359

Harald Hanche-Olsen wrote:

> Ah. I see. But then define-mail-user-agent seems incomplete. At the
> very least, maybe the docstring for define-mail-user-agent should
> mention send-mail-function? 

I don't think so. A mail user agent is a separate thing from a mail
transport agent. Also, define-mail-user-agent is not something a user
should call. The mail package should do it. So if Mew does not do that
for you, I'd say that is a Mew bug.

> In fact, send-mail-function is mentioned only in 35.4.1 (Mail
> Sending),

Seems like the right place for it (there is a link there from the very
top of the section about sending mail).

> which is a subsection of Mail Mode.

I don't see that (there is no "Mail Mode" section in the current manual).

Anyway, the whole point is that you don't really need to know about this
variable beforehand. Emacs will interactively prompt you to set it.

> When I saw this, I figured (wrongly, as it turned out) "default email
> client" referred to an email client external to emacs.

It does refer to that.

> The first alternative did in fact work. Oddly enough, it set
> send-mail-function to mailclient-send-it, and the message did in fact
> get sent, even though the file containing the definition of
> mailclient-send-it did not even get loaded.)

That doesn't seem right, and I have no idea how that could happen.





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#11359: 24.1.50; Difficulty using report-emacs-bug with mew
  2012-04-27 18:18     ` Glenn Morris
@ 2012-04-27 18:32       ` Glenn Morris
  2012-04-27 18:42       ` Harald Hanche-Olsen
  1 sibling, 0 replies; 6+ messages in thread
From: Glenn Morris @ 2012-04-27 18:32 UTC (permalink / raw)
  To: Harald Hanche-Olsen; +Cc: 11359


  - Type `transport' to invoke the system's mail transport agent
     (the `/usr/sbin/sendmail' program).

Maybe, just maybe, this should get an extra sentence along the lines of
"If you were successfully sending mail from an earlier version of Emacs
without having configured anything, this is probably the option you
should pick." But it would have to be OS-specific, since this is not
true on MS Windows. Yuck.





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#11359: 24.1.50; Difficulty using report-emacs-bug with mew
  2012-04-27 18:18     ` Glenn Morris
  2012-04-27 18:32       ` Glenn Morris
@ 2012-04-27 18:42       ` Harald Hanche-Olsen
  1 sibling, 0 replies; 6+ messages in thread
From: Harald Hanche-Olsen @ 2012-04-27 18:42 UTC (permalink / raw)
  To: rgm; +Cc: 11359

[Glenn Morris <rgm@gnu.org> (2012-04-27 18:18:57 UTC)]

> Harald Hanche-Olsen wrote:
> 
> > Ah. I see. But then define-mail-user-agent seems incomplete. At the
> > very least, maybe the docstring for define-mail-user-agent should
> > mention send-mail-function? 
> 
> I don't think so. A mail user agent is a separate thing from a mail
> transport agent.

Agreed. If emacs has managed to separate the two concepts to the point
where you can mix and match the two, that is good news. (I think they
used to be lumped together? In any case, I am pretty sure mew does not
at present take advantage of this.)

> Also, define-mail-user-agent is not something a user
> should call. The mail package should do it. So if Mew does not do that
> for you, I'd say that is a Mew bug.

Hmm. I am guessing the reasoning is that they want to just autoload
the whole package. But they could of course make a minimal file, call
it mew-setup, say, and ask the user to (require 'mew-setup). It would
lead to less clutter in peoples' .emacs files. I'll suggest that to
the mew maintainer.

> > which is a subsection of Mail Mode.
> 
> I don't see that (there is no "Mail Mode" section in the current manual).

Whoops. It turns out that I have been reading the emacs 23 manual.
Argh!! (My emacs is in a nonstandard location. I get the right manual
if I type g (emacs) in the Info buffer, but the wrong one if I pick
from the top-level menu. I should have realized that.

I'll go back and reread the manuals a bit, I guess. Both the emacs one
and the mew one.

- Harald





^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-04-27 18:42 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-27  7:55 bug#11359: 24.1.50; Difficulty using report-emacs-bug with mew Harald Hanche-Olsen
2012-04-27 16:01 ` Glenn Morris
2012-04-27 18:01   ` Harald Hanche-Olsen
2012-04-27 18:18     ` Glenn Morris
2012-04-27 18:32       ` Glenn Morris
2012-04-27 18:42       ` Harald Hanche-Olsen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).