Gnus development mailing list
 help / color / mirror / Atom feed
From: Michael Heerdegen <michael_heerdegen@web.de>
To: ding@lists.math.uh.edu
Subject: GCC field with `mail-user-agent' set to 'gnus-user-agent
Date: Thu, 09 Feb 2012 04:30:13 +0100	[thread overview]
Message-ID: <87zkcspttm.fsf@web.de> (raw)

Hi,

today I tried

  (setq mail-user-agent 'gnus-user-agent)

to avoid the need to start Gnus when I only want to compose some single
mail.  I'm using gnus-message-archive-group being "sent" all the time,
BTW.

If I now do M-x compose-mail without Gnus running, the GCC field is just
"sent", instead of "nnfolder+archive:sent" which I get when I start
composing a message directly form Gnus.  The difference comes from
`gnus-group-prefixed-name', I think.

Ok, no problem so far.  But if I now send the message, I get the
following error:

Debugger entered--Lisp error: (wrong-type-argument listp t)
  nth(2 t)
  (gnus-get-info group)
  (null (gnus-get-info group))
  (and (null (gnus-get-info group)) (eq (car (gnus-server-to-method gnus-message-archive-method)) (car (gnus-server-to-method (gnus-group-method group)))))
  (cond ((and (null (gnus-get-info group)) (eq (car (gnus-server-to-method gnus-message-archive-method)) (car (gnus-server-to-method (gnus-group-method group))))) gnus-message-archive-method) ((gnus-info-method (gnus-get-info group)) (gnus-info-method (gnus-get-info group))) (t (gnus-server-to-method (gnus-group-method group))))
  gnus-inews-group-method("sent")
  (setq method (gnus-inews-group-method group) group (mm-encode-coding-string group (gnus-group-name-charset method group)))
  (while (setq group (pop groups)) (setq method (gnus-inews-group-method group) group (mm-encode-coding-string group (gnus-group-name-charset method group))) (unless (gnus-check-server method) (error "Can't open server %s" (if (stringp method) method (car method)))) (unless (gnus-request-group group t method) (gnus-request-create-group group method)) (setq mml-externalize-attachments (if (stringp gnus-gcc-externalize-attachments) (string-match gnus-gcc-externalize-attachments group) gnus-gcc-externalize-attachments)) (save-excursion (nnheader-set-temp-buffer " *acc*") (setq message-options (with-current-buffer cur message-options)) (insert-buffer-substring cur) (message-encode-message-body) (save-restriction (message-narrow-to-headers) (let* ((mail-parse-charset message-default-charset) (newsgroups-field (save-restriction (message-narrow-to-headers-or-head) (message-fetch-field "Newsgroups"))) (followup-field (save-restriction (message-narrow-to-headers-or-head) (message-fetch-field "Followup-To"))) (group-field-charset (gnus-group-name-charset method (or newsgroups-field #1=""))) (followup-field-charset (gnus-group-name-charset method (or followup-field #1#))) (rfc2047-header-encoding-alist (append (when group-field-charset ...) (when followup-field-charset ...) rfc2047-header-encoding-alist))) (mail-encode-encoded-word-buffer))) (goto-char (point-min)) (when (re-search-forward (concat "^" (regexp-quote mail-header-separator) "$") nil t) (replace-match #1# t t)) (when (or (not (gnus-check-backend-function (quote request-accept-article) group)) (not (setq group-art (gnus-request-accept-article group method t t)))) (gnus-message 1 "Couldn't store article in group %s: %s" group (gnus-status-message method))) (when (stringp method) (setq method (gnus-server-to-method method))) (when (and (listp method) (gnus-native-method-p method)) (setq group (gnus-group-short-name group))) (when (and group-art (gnus-alive-p) (or gnus-gcc-mark-as-read (and (boundp (quote gnus-inews-mark-gcc-as-read)) (symbol-value (quote gnus-inews-mark-gcc-as-read))))) (gnus-group-mark-article-read group (cdr group-art))) (setq options message-options) (with-current-buffer cur (setq message-options options)) (kill-buffer (current-buffer))))
  (progn (message-remove-header "gcc") (widen) (setq groups (message-unquote-tokens (message-tokenize-header gcc " ,"))) (while (setq group (pop groups)) (setq method (gnus-inews-group-method group) group (mm-encode-coding-string group (gnus-group-name-charset method group))) (unless (gnus-check-server method) (error "Can't open server %s" (if (stringp method) method (car method)))) (unless (gnus-request-group group t method) (gnus-request-create-group group method)) (setq mml-externalize-attachments (if (stringp gnus-gcc-externalize-attachments) (string-match gnus-gcc-externalize-attachments group) gnus-gcc-externalize-attachments)) (save-excursion (nnheader-set-temp-buffer " *acc*") (setq message-options (with-current-buffer cur message-options)) (insert-buffer-substring cur) (message-encode-message-body) (save-restriction (message-narrow-to-headers) (let* ((mail-parse-charset message-default-charset) (newsgroups-field (save-restriction ... ...)) (followup-field (save-restriction ... ...)) (group-field-charset (gnus-group-name-charset method ...)) (followup-field-charset (gnus-group-name-charset method ...)) (rfc2047-header-encoding-alist (append ... ... rfc2047-header-encoding-alist))) (mail-encode-encoded-word-buffer))) (goto-char (point-min)) (when (re-search-forward (concat "^" (regexp-quote mail-header-separator) "$") nil t) (replace-match #1="" t t)) (when (or (not (gnus-check-backend-function (quote request-accept-article) group)) (not (setq group-art (gnus-request-accept-article group method t t)))) (gnus-message 1 "Couldn't store article in group %s: %s" group (gnus-status-message method))) (when (stringp method) (setq method (gnus-server-to-method method))) (when (and (listp method) (gnus-native-method-p method)) (setq group (gnus-group-short-name group))) (when (and group-art (gnus-alive-p) (or gnus-gcc-mark-as-read (and (boundp ...) (symbol-value ...)))) (gnus-group-mark-article-read group (cdr group-art))) (setq options message-options) (with-current-buffer cur (setq message-options options)) (kill-buffer (current-buffer)))))
  (if gcc (progn (message-remove-header "gcc") (widen) (setq groups (message-unquote-tokens (message-tokenize-header gcc " ,"))) (while (setq group (pop groups)) (setq method (gnus-inews-group-method group) group (mm-encode-coding-string group (gnus-group-name-charset method group))) (unless (gnus-check-server method) (error "Can't open server %s" (if (stringp method) method (car method)))) (unless (gnus-request-group group t method) (gnus-request-create-group group method)) (setq mml-externalize-attachments (if (stringp gnus-gcc-externalize-attachments) (string-match gnus-gcc-externalize-attachments group) gnus-gcc-externalize-attachments)) (save-excursion (nnheader-set-temp-buffer " *acc*") (setq message-options (with-current-buffer cur message-options)) (insert-buffer-substring cur) (message-encode-message-body) (save-restriction (message-narrow-to-headers) (let* ((mail-parse-charset message-default-charset) (newsgroups-field ...) (followup-field ...) (group-field-charset ...) (followup-field-charset ...) (rfc2047-header-encoding-alist ...)) (mail-encode-encoded-word-buffer))) (goto-char (point-min)) (when (re-search-forward (concat "^" (regexp-quote mail-header-separator) "$") nil t) (replace-match #1="" t t)) (when (or (not (gnus-check-backend-function ... group)) (not (setq group-art ...))) (gnus-message 1 "Couldn't store article in group %s: %s" group (gnus-status-message method))) (when (stringp method) (setq method (gnus-server-to-method method))) (when (and (listp method) (gnus-native-method-p method)) (setq group (gnus-group-short-name group))) (when (and group-art (gnus-alive-p) (or gnus-gcc-mark-as-read (and ... ...))) (gnus-group-mark-article-read group (cdr group-art))) (setq options message-options) (with-current-buffer cur (setq message-options options)) (kill-buffer (current-buffer))))))
  (when gcc (message-remove-header "gcc") (widen) (setq groups (message-unquote-tokens (message-tokenize-header gcc " ,"))) (while (setq group (pop groups)) (setq method (gnus-inews-group-method group) group (mm-encode-coding-string group (gnus-group-name-charset method group))) (unless (gnus-check-server method) (error "Can't open server %s" (if (stringp method) method (car method)))) (unless (gnus-request-group group t method) (gnus-request-create-group group method)) (setq mml-externalize-attachments (if (stringp gnus-gcc-externalize-attachments) (string-match gnus-gcc-externalize-attachments group) gnus-gcc-externalize-attachments)) (save-excursion (nnheader-set-temp-buffer " *acc*") (setq message-options (with-current-buffer cur message-options)) (insert-buffer-substring cur) (message-encode-message-body) (save-restriction (message-narrow-to-headers) (let* ((mail-parse-charset message-default-charset) (newsgroups-field (save-restriction ... ...)) (followup-field (save-restriction ... ...)) (group-field-charset (gnus-group-name-charset method ...)) (followup-field-charset (gnus-group-name-charset method ...)) (rfc2047-header-encoding-alist (append ... ... rfc2047-header-encoding-alist))) (mail-encode-encoded-word-buffer))) (goto-char (point-min)) (when (re-search-forward (concat "^" (regexp-quote mail-header-separator) "$") nil t) (replace-match #1="" t t)) (when (or (not (gnus-check-backend-function (quote request-accept-article) group)) (not (setq group-art (gnus-request-accept-article group method t t)))) (gnus-message 1 "Couldn't store article in group %s: %s" group (gnus-status-message method))) (when (stringp method) (setq method (gnus-server-to-method method))) (when (and (listp method) (gnus-native-method-p method)) (setq group (gnus-group-short-name group))) (when (and group-art (gnus-alive-p) (or gnus-gcc-mark-as-read (and (boundp ...) (symbol-value ...)))) (gnus-group-mark-article-read group (cdr group-art))) (setq options message-options) (with-current-buffer cur (setq message-options options)) (kill-buffer (current-buffer)))))
  (let ((gcc (or gcc (mail-fetch-field "gcc" nil t))) (cur (current-buffer)) groups group method group-art options mml-externalize-attachments) (when gcc (message-remove-header "gcc") (widen) (setq groups (message-unquote-tokens (message-tokenize-header gcc " ,"))) (while (setq group (pop groups)) (setq method (gnus-inews-group-method group) group (mm-encode-coding-string group (gnus-group-name-charset method group))) (unless (gnus-check-server method) (error "Can't open server %s" (if (stringp method) method (car method)))) (unless (gnus-request-group group t method) (gnus-request-create-group group method)) (setq mml-externalize-attachments (if (stringp gnus-gcc-externalize-attachments) (string-match gnus-gcc-externalize-attachments group) gnus-gcc-externalize-attachments)) (save-excursion (nnheader-set-temp-buffer " *acc*") (setq message-options (with-current-buffer cur message-options)) (insert-buffer-substring cur) (message-encode-message-body) (save-restriction (message-narrow-to-headers) (let* ((mail-parse-charset message-default-charset) (newsgroups-field ...) (followup-field ...) (group-field-charset ...) (followup-field-charset ...) (rfc2047-header-encoding-alist ...)) (mail-encode-encoded-word-buffer))) (goto-char (point-min)) (when (re-search-forward (concat "^" (regexp-quote mail-header-separator) "$") nil t) (replace-match #1="" t t)) (when (or (not (gnus-check-backend-function ... group)) (not (setq group-art ...))) (gnus-message 1 "Couldn't store article in group %s: %s" group (gnus-status-message method))) (when (stringp method) (setq method (gnus-server-to-method method))) (when (and (listp method) (gnus-native-method-p method)) (setq group (gnus-group-short-name group))) (when (and group-art (gnus-alive-p) (or gnus-gcc-mark-as-read (and ... ...))) (gnus-group-mark-article-read group (cdr group-art))) (setq options message-options) (with-current-buffer cur (setq message-options options)) (kill-buffer (current-buffer))))))
  (save-restriction (message-narrow-to-headers) (let ((gcc (or gcc (mail-fetch-field "gcc" nil t))) (cur (current-buffer)) groups group method group-art options mml-externalize-attachments) (when gcc (message-remove-header "gcc") (widen) (setq groups (message-unquote-tokens (message-tokenize-header gcc " ,"))) (while (setq group (pop groups)) (setq method (gnus-inews-group-method group) group (mm-encode-coding-string group (gnus-group-name-charset method group))) (unless (gnus-check-server method) (error "Can't open server %s" (if (stringp method) method (car method)))) (unless (gnus-request-group group t method) (gnus-request-create-group group method)) (setq mml-externalize-attachments (if (stringp gnus-gcc-externalize-attachments) (string-match gnus-gcc-externalize-attachments group) gnus-gcc-externalize-attachments)) (save-excursion (nnheader-set-temp-buffer " *acc*") (setq message-options (with-current-buffer cur message-options)) (insert-buffer-substring cur) (message-encode-message-body) (save-restriction (message-narrow-to-headers) (let* (... ... ... ... ... ...) (mail-encode-encoded-word-buffer))) (goto-char (point-min)) (when (re-search-forward (concat "^" ... "$") nil t) (replace-match #1="" t t)) (when (or (not ...) (not ...)) (gnus-message 1 "Couldn't store article in group %s: %s" group (gnus-status-message method))) (when (stringp method) (setq method (gnus-server-to-method method))) (when (and (listp method) (gnus-native-method-p method)) (setq group (gnus-group-short-name group))) (when (and group-art (gnus-alive-p) (or gnus-gcc-mark-as-read ...)) (gnus-group-mark-article-read group (cdr group-art))) (setq options message-options) (with-current-buffer cur (setq message-options options)) (kill-buffer (current-buffer)))))))
  (save-excursion (save-restriction (message-narrow-to-headers) (let ((gcc (or gcc (mail-fetch-field "gcc" nil t))) (cur (current-buffer)) groups group method group-art options mml-externalize-attachments) (when gcc (message-remove-header "gcc") (widen) (setq groups (message-unquote-tokens (message-tokenize-header gcc " ,"))) (while (setq group (pop groups)) (setq method (gnus-inews-group-method group) group (mm-encode-coding-string group (gnus-group-name-charset method group))) (unless (gnus-check-server method) (error "Can't open server %s" (if ... method ...))) (unless (gnus-request-group group t method) (gnus-request-create-group group method)) (setq mml-externalize-attachments (if (stringp gnus-gcc-externalize-attachments) (string-match gnus-gcc-externalize-attachments group) gnus-gcc-externalize-attachments)) (save-excursion (nnheader-set-temp-buffer " *acc*") (setq message-options (with-current-buffer cur message-options)) (insert-buffer-substring cur) (message-encode-message-body) (save-restriction (message-narrow-to-headers) (let* ... ...)) (goto-char (point-min)) (when (re-search-forward ... nil t) (replace-match #1="" t t)) (when (or ... ...) (gnus-message 1 "Couldn't store article in group %s: %s" group ...)) (when (stringp method) (setq method ...)) (when (and ... ...) (setq group ...)) (when (and group-art ... ...) (gnus-group-mark-article-read group ...)) (setq options message-options) (with-current-buffer cur (setq message-options options)) (kill-buffer (current-buffer))))))))
  gnus-inews-do-gcc()
  (progn (gnus-inews-do-gcc))
  (if (or gnus-plugged (not (gnus-agent-any-covered-gcc))) (progn (gnus-inews-do-gcc)))
  (when (or gnus-plugged (not (gnus-agent-any-covered-gcc))) (gnus-inews-do-gcc))
  gnus-agent-possibly-do-gcc()
  run-hooks(message-sent-hook)
  (save-excursion (run-hooks (quote message-sent-hook)))
  (progn (message-do-fcc) (save-excursion (run-hooks (quote message-sent-hook))) (message "Sending...done") (when (and (message-mail-alias-type-p (quote ecomplete)) (not message-inhibit-ecomplete)) (message-put-addresses-in-ecomplete)) (set-buffer-modified-p nil) (delete-auto-save-file-if-necessary t) (message-disassociate-draft) (message-do-send-housekeeping) (message-do-actions message-send-actions) t)
  (if (or dont-barf-on-no-method (and success sent)) (progn (message-do-fcc) (save-excursion (run-hooks (quote message-sent-hook))) (message "Sending...done") (when (and (message-mail-alias-type-p (quote ecomplete)) (not message-inhibit-ecomplete)) (message-put-addresses-in-ecomplete)) (set-buffer-modified-p nil) (delete-auto-save-file-if-necessary t) (message-disassociate-draft) (message-do-send-housekeeping) (message-do-actions message-send-actions) t))
  (when (or dont-barf-on-no-method (and success sent)) (message-do-fcc) (save-excursion (run-hooks (quote message-sent-hook))) (message "Sending...done") (when (and (message-mail-alias-type-p (quote ecomplete)) (not message-inhibit-ecomplete)) (message-put-addresses-in-ecomplete)) (set-buffer-modified-p nil) (delete-auto-save-file-if-necessary t) (message-disassociate-draft) (message-do-send-housekeeping) (message-do-actions message-send-actions) t)
  (let ((alist message-send-method-alist) (success t) elem sent dont-barf-on-no-method (message-options message-options)) (message-options-set-recipient) (while (and success (setq elem (pop alist))) (when (funcall (cadr elem)) (when (and (or (not (memq ... message-sent-message-via)) (message-fetch-field "supersedes") (if (or ... ...) (y-or-n-p ...) (error "Denied posting -- multiple copies"))) (setq success (funcall (caddr elem) arg))) (setq sent t)))) (unless (or sent (not success) (let ((fcc (message-fetch-field "Fcc")) (gcc (message-fetch-field "Gcc"))) (when (or fcc gcc) (or (eq message-allow-no-recipients (quote always)) (and (not ...) (setq dont-barf-on-no-method ...)))))) (error "No methods specified to send by")) (when (or dont-barf-on-no-method (and success sent)) (message-do-fcc) (save-excursion (run-hooks (quote message-sent-hook))) (message "Sending...done") (when (and (message-mail-alias-type-p (quote ecomplete)) (not message-inhibit-ecomplete)) (message-put-addresses-in-ecomplete)) (set-buffer-modified-p nil) (delete-auto-save-file-if-necessary t) (message-disassociate-draft) (message-do-send-housekeeping) (message-do-actions message-send-actions) t))
  message-send(nil)
  (and (message-send arg) (buffer-name buf))
  (if (and (message-send arg) (buffer-name buf)) (progn (message-bury buf) (if message-kill-buffer-on-exit (kill-buffer buf)) (message-do-actions actions) t))
  (when (and (message-send arg) (buffer-name buf)) (message-bury buf) (if message-kill-buffer-on-exit (kill-buffer buf)) (message-do-actions actions) t)
  (let ((buf (current-buffer)) (actions message-exit-actions)) (when (and (message-send arg) (buffer-name buf)) (message-bury buf) (if message-kill-buffer-on-exit (kill-buffer buf)) (message-do-actions actions) t))
  message-send-and-exit(nil)
  call-interactively(message-send-and-exit nil nil)

Have I hit a bug?  Or did I miss something?

Thanks for your help.


Michael.



             reply	other threads:[~2012-02-09  3:30 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-09  3:30 Michael Heerdegen [this message]
2012-02-09  5:48 ` Lars Ingebrigtsen
2012-02-09  8:25   ` Michael Heerdegen
2012-02-09 20:31     ` Lars Ingebrigtsen
2012-02-09 22:49       ` Katsumi Yamaoka
2012-02-09 22:54         ` Lars Ingebrigtsen
2012-02-10 20:40           ` Michael Heerdegen
2012-02-11  0:50             ` Lars Ingebrigtsen
2012-02-11  1:14               ` Michael Heerdegen
2012-02-11 15:32                 ` Lars Ingebrigtsen
2012-02-11 21:16                   ` Michael Heerdegen
2012-02-12 20:00                     ` Lars Ingebrigtsen
2012-02-13  0:57                       ` Michael Heerdegen
2012-02-13 19:44                         ` Lars Ingebrigtsen
2012-02-11  3:25       ` Rasmus

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=87zkcspttm.fsf@web.de \
    --to=michael_heerdegen@web.de \
    --cc=ding@lists.math.uh.edu \
    /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).