From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 19 15:07:36 2017 Received: (at submit) by debbugs.gnu.org; 19 Aug 2017 19:07:36 +0000 Received: from localhost ([127.0.0.1]:45827 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dj95s-0000mk-9e for submit@debbugs.gnu.org; Sat, 19 Aug 2017 15:07:36 -0400 Received: from eggs.gnu.org ([208.118.235.92]:36561) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dj95q-0000mW-0Z for submit@debbugs.gnu.org; Sat, 19 Aug 2017 15:07:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dj95j-0003lQ-Nm for submit@debbugs.gnu.org; Sat, 19 Aug 2017 15:07:28 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:52369) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dj95j-0003lJ-Kd for submit@debbugs.gnu.org; Sat, 19 Aug 2017 15:07:27 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55765) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dj95i-0000U1-H9 for bug-gnu-emacs@gnu.org; Sat, 19 Aug 2017 15:07:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dj95f-0003jK-AP for bug-gnu-emacs@gnu.org; Sat, 19 Aug 2017 15:07:26 -0400 Received: from forward106j.mail.yandex.net ([5.45.198.249]:42859) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dj95e-0003hK-Qu for bug-gnu-emacs@gnu.org; Sat, 19 Aug 2017 15:07:23 -0400 Received: from mxback6o.mail.yandex.net (mxback6o.mail.yandex.net [IPv6:2a02:6b8:0:1a2d::20]) by forward106j.mail.yandex.net (Yandex) with ESMTP id 090871804368 for ; Sat, 19 Aug 2017 22:07:19 +0300 (MSK) Received: from web32j.yandex.ru (web32j.yandex.ru [5.45.198.135]) by mxback6o.mail.yandex.net (nwsmtp/Yandex) with ESMTP id yztfxtV4VT-7IUS7hTR; Sat, 19 Aug 2017 22:07:18 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1503169638; bh=T8mAt/60fqXXJu7sIBoSNbCImxkre/1lOrg61UGJyiM=; h=From:To:Subject:Message-Id:Date; b=BF8aJ7DDA7vtFSYmbSKJN2j0yo5NyXcMuDeTCPPHcuLlOTgKF14Ac4F6gVuB0fLqi gu+PZGyh/8YUgEpJhBqRgyPtKT68GD5vL0y8mpwFSi+yC+Q2Em9+Tnxrf9hSdtno/o Cx1z4Qn7hVrdMxgKcgRXZ7zD9N8nKeiMcKIwLth0= Authentication-Results: mxback6o.mail.yandex.net; dkim=pass header.i=@yandex.ru Received: by web32j.yandex.ru with HTTP; Sat, 19 Aug 2017 22:07:18 +0300 From: =?utf-8?B?0KDQtdC50YUg0JrQvtC90YHRgtCw0L3RgtC40L0=?= Envelope-From: reich-cv@yandex.ru To: bug-gnu-emacs@gnu.org Subject: mail-compose doesnot work correctly with gnus-user-agent MIME-Version: 1.0 Message-Id: <968221503169638@web32j.yandex.ru> X-Mailer: Yamail [ http://yandex.ru ] 5.0 Date: Sat, 19 Aug 2017 22:07:18 +0300 Content-Transfer-Encoding: 7bit Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) Hi, I noticed that if Gnus isn't running, mail-compose doesnot use gnus even if i set (setq mail-user-agent 'gnus-user-agent) The reason is that gnus-msg-mail uses plain Message mode if gnus isn't running. Is this a bug or feature? It seems reasonable to assume that if I set gnus-user-agent I want to use gnus, nothing else. One can define new mail user agent like: diff --git a/lisp/gnus/gnus-msg.el b/lisp/gnus/gnus-msg.el index 85969edc81..bb65d3aaab 100644 --- a/lisp/gnus/gnus-msg.el +++ b/lisp/gnus/gnus-msg.el @@ -574,6 +574,24 @@ instead." 'gnus-msg-mail 'message-send-and-exit 'message-kill-buffer 'message-send-hook) +(define-mail-user-agent 'gnus-user-agent-2 + 'gnus-msg-mail-2 'message-send-and-exit + 'message-kill-buffer 'message-send-hook) + +(defun gnus-msg-mail-2 (&optional to subject other-headers continue switch-action yank-action send-actions return-action) + "Start editing a mail message to be sent. +Like `gnus-msg-mail', but if Gnus isn't running, start it" + (interactive) + (if (not (gnus-alive-p)) + (save-window-excursion + (let ((inhibit-redisplay t)) + (gnus)))) + (gnus-msg-mail to subject other-headers continue switch-action yank-action send-actions return-action) + ) + + + + (defun gnus-setup-posting-charset (group) (let ((alist gnus-group-posting-charset-alist) (group (or group "")) Or even redefine the function gnus-msg-mail: diff --git a/lisp/gnus/gnus-msg.el b/lisp/gnus/gnus-msg.el index 85969edc81..c2952b671f 100644 --- a/lisp/gnus/gnus-msg.el +++ b/lisp/gnus/gnus-msg.el @@ -528,32 +528,30 @@ Thank you for your help in stamping out bugs. "Start editing a mail message to be sent. Like `message-mail', but with Gnus paraphernalia, particularly the Gcc: header for archiving purposes. -If Gnus isn't running, a plain `message-mail' setup is used -instead." +If Gnus isn't running, start it." (interactive) (if (not (gnus-alive-p)) - (progn - (message "Gnus not running; using plain Message mode") - (message-mail to subject other-headers continue - nil yank-action send-actions return-action)) - (let ((buf (current-buffer)) - ;; Don't use posting styles corresponding to any existing group. - (group-name gnus-newsgroup-name) - mail-buf) - (unwind-protect - (progn - (setq gnus-newsgroup-name "") - (gnus-setup-message 'message - (message-mail to subject other-headers continue - nil yank-action send-actions return-action))) - (with-current-buffer buf - (setq gnus-newsgroup-name group-name))) - (when switch-action - (setq mail-buf (current-buffer)) - (switch-to-buffer buf) - (apply switch-action mail-buf nil)) - ;; COMPOSEFUNC should return t if succeed. Undocumented ??? - t))) + (save-window-excursion + (let ((inhibit-redisplay t)) + (gnus)))) + (let ((buf (current-buffer)) + ;; Don't use posting styles corresponding to any existing group. + (group-name gnus-newsgroup-name) + mail-buf) + (unwind-protect + (progn + (setq gnus-newsgroup-name "") + (gnus-setup-message 'message + (message-mail to subject other-headers continue + nil yank-action send-actions return-action))) + (with-current-buffer buf + (setq gnus-newsgroup-name group-name))) + (when switch-action + (setq mail-buf (current-buffer)) + (switch-to-buffer buf) + (apply switch-action mail-buf nil)) + ;; COMPOSEFUNC should return t if succeed. Undocumented ??? + t)) ;;;###autoload (defun gnus-button-mailto (address) From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 19 15:34:05 2017 Received: (at 28150) by debbugs.gnu.org; 19 Aug 2017 19:34:05 +0000 Received: from localhost ([127.0.0.1]:45848 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dj9VV-0001Pp-4v for submit@debbugs.gnu.org; Sat, 19 Aug 2017 15:34:05 -0400 Received: from eggs.gnu.org ([208.118.235.92]:39186) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dj9VT-0001PM-GM for 28150@debbugs.gnu.org; Sat, 19 Aug 2017 15:34:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dj9VL-00005J-B1 for 28150@debbugs.gnu.org; Sat, 19 Aug 2017 15:33:58 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_40,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:34555) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dj9VL-00005F-83; Sat, 19 Aug 2017 15:33:55 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:3697 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dj9VJ-0008WM-M0; Sat, 19 Aug 2017 15:33:55 -0400 Date: Sat, 19 Aug 2017 22:33:32 +0300 Message-Id: <83y3qfcpyr.fsf@gnu.org> From: Eli Zaretskii To: =?utf-8?B?0KDQtdC50YUg0JrQvtC90YHRgtCw0L3RgtC40L0=?= , Lars Ingebrigtsen In-reply-to: <968221503169638@web32j.yandex.ru> (reich-cv@yandex.ru) Subject: Re: bug#28150: mail-compose doesnot work correctly with gnus-user-agent References: <968221503169638@web32j.yandex.ru> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 28150 Cc: 28150@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > From: Рейх Константин > > Date: Sat, 19 Aug 2017 22:07:18 +0300 > > I noticed that if Gnus isn't running, mail-compose doesnot use gnus even if i set > (setq mail-user-agent 'gnus-user-agent) > > The reason is that gnus-msg-mail uses plain Message mode if gnus isn't running. Is this a bug or feature? It must be a feature, because it was explicitly added in commit 7582f844. Perhaps Lars can shed some light on this. From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 13 14:20:33 2017 Received: (at 28150) by debbugs.gnu.org; 13 Sep 2017 18:20:33 +0000 Received: from localhost ([127.0.0.1]:38737 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dsCH3-000445-9S for submit@debbugs.gnu.org; Wed, 13 Sep 2017 14:20:33 -0400 Received: from hermes.netfonds.no ([80.91.224.195]:56734) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dsCH1-00043x-FR for 28150@debbugs.gnu.org; Wed, 13 Sep 2017 14:20:31 -0400 Received: from cm-84.209.243.26.getinternet.no ([84.209.243.26] helo=mouse) by hermes.netfonds.no with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dsCGy-0005H2-VM; Wed, 13 Sep 2017 20:20:30 +0200 From: Lars Ingebrigtsen To: =?utf-8?B?0KDQtdC50YUg0JrQvtC90YHRgtCw0L3RgtC40L0=?= Subject: Re: bug#28150: mail-compose doesnot work correctly with gnus-user-agent References: <968221503169638@web32j.yandex.ru> Date: Wed, 13 Sep 2017 20:20:28 +0200 In-Reply-To: <968221503169638@web32j.yandex.ru> (=?utf-8?B?ItCg0LXQudGF?= =?utf-8?B?INCa0L7QvdGB0YLQsNC90YLQuNC9Iidz?= message of "Sat, 19 Aug 2017 22:07:18 +0300") Message-ID: <8760cme9zn.fsf@mouse.gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 28150 Cc: 28150@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) =D0=A0=D0=B5=D0=B9=D1=85 =D0=9A=D0=BE=D0=BD=D1=81=D1=82=D0=B0=D0=BD=D1=82= =D0=B8=D0=BD writes: > The reason is that gnus-msg-mail uses plain Message mode if gnus isn't > running. Is this a bug or feature? It's a feature -- starting Gnus can take a long time, and you need to have Gnus started to use stuff like Gcc: and the like from Message mode. So I think the current behaviour makes sense. --=20 (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 13 14:20:44 2017 Received: (at control) by debbugs.gnu.org; 13 Sep 2017 18:20:44 +0000 Received: from localhost ([127.0.0.1]:38740 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dsCHE-00044X-IF for submit@debbugs.gnu.org; Wed, 13 Sep 2017 14:20:44 -0400 Received: from hermes.netfonds.no ([80.91.224.195]:56741) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dsCHC-00044P-RB for control@debbugs.gnu.org; Wed, 13 Sep 2017 14:20:43 -0400 Received: from cm-84.209.243.26.getinternet.no ([84.209.243.26] helo=mouse) by hermes.netfonds.no with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dsCHA-000632-Lc for control@debbugs.gnu.org; Wed, 13 Sep 2017 20:20:42 +0200 Date: Wed, 13 Sep 2017 20:20:40 +0200 Message-Id: <874ls6e9zb.fsf@mouse.gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #28150 X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) tags 28150 notabug close 28150 From unknown Sat Aug 09 19:20:20 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 12 Oct 2017 11:24:05 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator