In ngnus-0.11 gnus-dired behaved as I expected, after marking a file in
dired and using gnus-dired-attach a gnus message buffer popped up with
the file in question attached.
Not so in recent gnus-cvs. When I use gnus-dired-attach
VM is started. [1]
Now I looked at gnus-dired.el and there is the following change
(if (eq gnus-dired-mail-mode 'gnus-user-agent)
(gnus-setup-message 'message (message-mail))
;; FIXME: Is this the right thing?
(compose-mail))
is changed to
(let ((mail-user-agent gnus-dired-mail-mode)
;; A workaround to prevent Gnus from displaying the Gnus
;; logo when invoking this command without loading Gnus.
;; Gnus demonstrates it when gnus.elc is being loaded if
;; a command of which the name is prefixed with "gnus"
;; causes that autoloading. See the code in question,
;; that is the one first found in gnus.el by performing
;; `C-s this-command'.
(this-command (if (eq gnus-dired-mail-mode 'gnus-user-agent)
'gnoose-dired-attach
this-command)))
(compose-mail))
And that does not work as expected. So I can undo that change but I
would like to hear opinions about this recent change.
thanks
Uwe Brauer
Footnotes:
[1] I really loved VM but have given it up quite a while ago.
I am the very man who changed gnus-dired.el.
>>>>> Uwe Brauer wrote:
> Hello
> In ngnus-0.11 gnus-dired behaved as I expected, after marking a file in
> dired and using gnus-dired-attach a gnus message buffer popped up with
> the file in question attached.
> Not so in recent gnus-cvs. When I use gnus-dired-attach
> VM is started. [1]
No problem here. `gnus-dired-attach' gets `gnus-msg-mail' started
because:
(get gnus-dired-mail-mode 'composefunc)
=> gnus-msg-mail
In my case, the value of `gnus-dired-mail-mode' is `gnus-user-agent'
that is the default.
> Now I looked at gnus-dired.el and there is the following change
> (if (eq gnus-dired-mail-mode 'gnus-user-agent)
> (gnus-setup-message 'message (message-mail))
> ;; FIXME: Is this the right thing?
> (compose-mail))
It calls the `gnus-setup-message' macro directly, whereas
> is changed to
> (let ((mail-user-agent gnus-dired-mail-mode)
> ;; A workaround to prevent Gnus from displaying the Gnus
> ;; logo when invoking this command without loading Gnus.
> ;; Gnus demonstrates it when gnus.elc is being loaded if
> ;; a command of which the name is prefixed with "gnus"
> ;; causes that autoloading. See the code in question,
> ;; that is the one first found in gnus.el by performing
> ;; `C-s this-command'.
> (this-command (if (eq gnus-dired-mail-mode 'gnus-user-agent)
> 'gnoose-dired-attach
> this-command)))
> (compose-mail))
it always calls `compose-mail' which invokes a certain mail
command according to the value of `mail-user-agent'. Note that
`mail-user-agent' is bound to the value of `gnus-dired-mail-mode'
of which the defalut value is `gnus-user-agent' in that case.
By default `gnus-user-agent' is configured so that `gnus-msg-mail',
the mail command of Gnus, may be called. I improved Gnus's mail
command so as to work as a `mail-user-agent' (i.e., a servant of
`compose-mail'), and then changed that code.
> And that does not work as expected. So I can undo that change but I
> would like to hear opinions about this recent change.
I doubt you've changed the mail command of `gnus-user-agent' so
that it calls VM's mail command. In your init file don't you
have something like this?
(put 'gnus-user-agent 'composefunc 'vm-something-something)
> Hi,
> I am the very man who changed gnus-dired.el.
Good to know and thanks for the fast reply.
> No problem here. `gnus-dired-attach' gets `gnus-msg-mail' started
> because:
> (get gnus-dired-mail-mode 'composefunc)
> => gnus-msg-mail
> In my case, the value of `gnus-dired-mail-mode' is `gnus-user-agent'
> that is the default.
So it is for me
>> Now I looked at gnus-dired.el and there is the following change
>> (if (eq gnus-dired-mail-mode 'gnus-user-agent)
>> (gnus-setup-message 'message (message-mail))
>> ;; FIXME: Is this the right thing?
>> (compose-mail))
> It calls the `gnus-setup-message' macro directly, whereas
That works!
>> is changed to
>> (let ((mail-user-agent gnus-dired-mail-mode)
>> ;; A workaround to prevent Gnus from displaying the Gnus
>> ;; logo when invoking this command without loading Gnus.
>> ;; Gnus demonstrates it when gnus.elc is being loaded if
>> ;; a command of which the name is prefixed with "gnus"
>> ;; causes that autoloading. See the code in question,
>> ;; that is the one first found in gnus.el by performing
>> ;; `C-s this-command'.
>> (this-command (if (eq gnus-dired-mail-mode 'gnus-user-agent)
>> 'gnoose-dired-attach
>> this-command)))
>> (compose-mail))
> it always calls `compose-mail' which invokes a certain mail
> command according to the value of `mail-user-agent'. Note that
> `mail-user-agent' is bound to the value of `gnus-dired-mail-mode'
> of which the defalut value is `gnus-user-agent' in that case.
> By default `gnus-user-agent' is configured so that `gnus-msg-mail',
> the mail command of Gnus, may be called. I improved Gnus's mail
> command so as to work as a `mail-user-agent' (i.e., a servant of
> `compose-mail'), and then changed that code.
Right that all sounds fine to me but it simply does not work any more
for me. I tried to debug it but can't trace the error.
I am completely confused:
mail-user-agent is set for me
--8<------------------------schnipp------------------------->8---
mail-user-agent' is a variable declared in Lisp.
-- loaded from "/build/buildd/xemacs21-21.4.21/lisp/simple.elc"
Value: message-user-agent
--8<------------------------schnapp------------------------->8---
>> And that does not work as expected. So I can undo that change but I
>> would like to hear opinions about this recent change.
> I doubt you've changed the mail command of `gnus-user-agent' so
> that it calls VM's mail command. In your init file don't you
> have something like this?
> (put 'gnus-user-agent 'composefunc 'vm-something-something)
I don't!!!
gnus-user-agent gives me
--8<------------------------schnipp------------------------->8---
`gnus-user-agent' is a variable declared in Lisp.
-- loaded from "gnus"
Value: (emacs gnus type)
--8<------------------------schnapp------------------------->8---
Any ideas how to trace the problem?
Uwe
> Value: message-user-agent
> --8<------------------------schnapp------------------------->8---
In XEmacs 21.4.2x the default value for `mail-user-agent' is
`sendmail-user-agent'. So, you've customized it, haven't you?
Haven't you customized it further? Try evaluation the following
forms in the *scratch* buffer (type `C-j' at the end of every line):
(get 'message-user-agent 'composefunc)
(get 'message-user-agent 'sendfunc)
(get 'message-user-agent 'abortfunc)
(get 'message-user-agent 'hookvar)
In XEmacs 21.4.22 I got:
message-mail
message-send-and-exit
message-kill-buffer
message-send-hook
Furthermore, `message-mail' may be able to be customized to run
differently (to use a VM command for example). I don't know though.
How about to try changing the value of `mail-user-agent' to
`gnus-user-agent'? I.e.: (setq mail-user-agent 'gnus-user-agent)
>>>>> Uwe Brauer wrote:
>> Value: message-user-agent
>> --8<------------------------schnapp------------------------->8---
> In XEmacs 21.4.2x the default value for `mail-user-agent' is
> `sendmail-user-agent'. So, you've customized it, haven't you?
Yes to message-user-agent!
> Haven't you customized it further? Try evaluation the following
> forms in the *scratch* buffer (type `C-j' at the end of every line):
> (get 'message-user-agent 'composefunc)
> (get 'message-user-agent 'sendfunc)
> (get 'message-user-agent 'abortfunc)
> (get 'message-user-agent 'hookvar)
> In XEmacs 21.4.22 I got:
> message-mail
> message-send-and-exit
> message-kill-buffer
> message-send-hook
So do I!
> How about to try changing the value of `mail-user-agent' to
> `gnus-user-agent'? I.e.: (setq mail-user-agent 'gnus-user-agent)
I did this it does not change. I am desperate and I am thinking of using
the old code.
Uwe
> I am desperate and I am thinking of using the old code.
Please don't. This is a bug we need to find out why it fails for you.
Bye, Reiner.
--
,,,
(o o)
---ooO-(_)-Ooo--- | PGP key available | http://rsteib.home.pages.de/
>> I am desperate and I am thinking of using the old code.
> Please don't. This is a bug we need to find out why it fails for you.
Maybe Uwe has to discover by oneself what function of Gnus starts
VM. If what is started is the Lisp command `vm', one way is to
provide the dummy function named `vm' like the following:
(defun vm (&rest args)
(interactive)
(error "VM started!"))
Evaluate this form by typing `C-x C-e' at the end of the last
line. Type `M-x toggle-debug-on-error RET' to turn it on. Run
`gnus-dired-attach'. And you will see the function that calls
this version of `vm'. The backtrace may expose the real cause
in that single shot. Otherwise, what you want to do next will
be to run edebug on the function in question (that calls `vm').
Note that the command that starts VM may not be just `vm' but
`vm-something-something'. Good luck.
Thanks, I will try to see whether that will work.
Meanwhile I scanned my init files and the pkg loaded and indeed in one
of my vm-addons-file there is the culprit:
(defalias 'compose-mail 'vm-compose-mail)
that is from the time I was in love with vm.
Of course debugging vm-dired-attach did not help to find this error.
What I find strange is, that in the older version of gnus-dired-attach
*this* problem did not occur.
Uwe
> (defalias 'compose-mail 'vm-compose-mail)
> that is from the time I was in love with vm.
You should have customized `mail-user-agent'.
> Of course debugging vm-dired-attach did not help to find this error.
>
> What I find strange is, that in the older version of gnus-dired-attach
> *this* problem did not occur.
That a side effect of the changes made to gnus-dired.el to reduce Gnus
dependencies.
,----[ ChangeLog ]
| 2007-12-04 Reiner Steib <Reiner...@gmx.de>
|
| [...]
|
| * gnus-dired.el: Reduce Gnus dependencies.
| (gnus-ems, gnus-msg, gnus-util, message, mm-decode, mml): Don't
| require. Use autoloads instead.
| (mml-attach-file, mm-default-file-encoding, mailcap-extension-to-mime)
| (mailcap-mime-info, mm-mailcap-command, ps-print-preprint)
| (message-buffers, gnus-setup-message, gnus-print-buffer): Autoload.
| (gnus-dired-mode): Adjust doc string.
| (gnus-dired-mail-mode): New variable.
| (gnus-dired-mode-map): Avoid using `gnus-define-keys'.
| (gnus-dired-mode): Avoid using `gnus-run-hooks'.
| (gnus-dired-mail-buffers): New function. Return mail or message
| composition buffers.
| (gnus-dired-attach): Use it.
| (gnus-dired-find-file-mailcap): Call `mailcap-mime-info' with
| NO-DECODE.
| (gnus-dired-print): Use `gnus-print-buffer' depending on
| `gnus-dired-mail-mode'.
`----