From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Katsumi Yamaoka Newsgroups: gmane.emacs.bugs Subject: bug#14166: 24.3.50; report-emacs-bug and mail-user-agent == 'gnus-user-agent Date: Thu, 11 Apr 2013 09:41:38 +0900 Organization: Emacsen advocacy group Message-ID: References: <87mwt7wzy6.fsf@web.de> <87mwt64i9y.fsf@web.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: ger.gmane.org 1365640945 21207 80.91.229.3 (11 Apr 2013 00:42:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 11 Apr 2013 00:42:25 +0000 (UTC) Cc: 14166@debbugs.gnu.org To: Michael Heerdegen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Apr 11 02:42:25 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UQ5ap-000116-LF for geb-bug-gnu-emacs@m.gmane.org; Thu, 11 Apr 2013 02:42:23 +0200 Original-Received: from localhost ([::1]:35988 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UQ5ap-0005Vr-7E for geb-bug-gnu-emacs@m.gmane.org; Wed, 10 Apr 2013 20:42:23 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:56327) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UQ5ak-0005Vm-Pt for bug-gnu-emacs@gnu.org; Wed, 10 Apr 2013 20:42:20 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UQ5aj-00054y-L4 for bug-gnu-emacs@gnu.org; Wed, 10 Apr 2013 20:42:18 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:40287) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UQ5aj-00054V-IB for bug-gnu-emacs@gnu.org; Wed, 10 Apr 2013 20:42:17 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1UQ5eM-0006ZD-Jv; Wed, 10 Apr 2013 20:46:02 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: <87mwt7wzy6.fsf@web.de> Resent-From: Katsumi Yamaoka Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org, bugs@gnus.org Resent-Date: Thu, 11 Apr 2013 00:46:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 14166 X-GNU-PR-Package: emacs,gnus X-GNU-PR-Keywords: Original-Received: via spool by 14166-submit@debbugs.gnu.org id=B14166.136564113325110 (code B ref 14166); Thu, 11 Apr 2013 00:46:02 +0000 Original-Received: (at 14166) by debbugs.gnu.org; 11 Apr 2013 00:45:33 +0000 Original-Received: from localhost ([127.0.0.1]:44395 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UQ5dt-0006Wt-28 for submit@debbugs.gnu.org; Wed, 10 Apr 2013 20:45:33 -0400 Original-Received: from mail-hampton.hostforweb.net ([216.246.13.138]:37546 helo=hampton.hostforweb.net) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UQ5dp-0006We-3G for 14166@debbugs.gnu.org; Wed, 10 Apr 2013 20:45:30 -0400 Original-Received: from localhost.localdomain ([127.0.0.1]:49209 helo=localhost) by hampton.hostforweb.net with smtp (Exim 4.80) (envelope-from ) id 1UQ5a9-001iUz-5h; Wed, 10 Apr 2013 19:41:41 -0500 X-Face: #kKnN,xUnmKia.'[pp`; Omh}odZK)?7wQSl"4o04=EixTF+V[""w~iNbM9ZL+.b*_CxUmFk B#Fu[*?MZZH@IkN:!"\w%I_zt>[$nm7nQosZ<3eu; B:$Q_:p!',P.c0-_Cy[dz4oIpw0ESA^D*1Lw= L&i*6&( User-Agent: Gnus/5.130006 (=?UTF-8?Q?=E7=9C=9F?= Gnus v0.6) Emacs/24.3.50 (i686-pc-cygwin) Cancel-Lock: sha1:9tcKm1jrATmxR3pppyFS8HWJMOo= X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - hampton.hostforweb.net X-AntiAbuse: Original Domain - debbugs.gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - jpl.org X-Get-Message-Sender-Via: hampton.hostforweb.net: acl_c_authenticated_local_user: root X-Source: X-Source-Args: X-Source-Dir: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:73318 Archived-At: --=-=-= Michael Heerdegen wrote: > Katsumi Yamaoka writes: >> There seem to be several solutions, however ideas I have are not >> so good. For example: >> >> 1. To make `report-emacs-bug' bind `gnus-posting-styles' to nil >> unconditionally while performing `compose-mail'. It has to load >> gnus-msg.el, that provides `gnus-posting-styles', before binding >> it to nil if Gnus is not running yet even if `mail-user-agent' >> is not `gnus-user-agent'. Otherwise, `gnus-posting-styles' will >> be made unbound. Note that a function `gnus-user-agent' uses, >> that is `gnus-msg-mail', is autoloaded, and it involves many other >> Gnus modules loading. >> >> 2. Similar to 1. But load gnus-msg.el and bind `gnus-posting-styles' >> to nil if and only if `mail-user-agent' equals `gnus-user-agent'. >> I think the source code for it will get ugly. >> >> 3. To make `gnus-msg-mail' bind `gnus-posting-styles' to nil if and >> only if `this-command' is `report-emacs-bug'. It won't work if >> `report-emacs-bug' is called non-interactively. >> >> My second best is 2. What do others think? > Just want to mention `gnus-inhibit-posting-styles'. Maybe binding it isThat > more comfortable? Dunno, just an idea. That will cause a problem similar to the one I mentioned in 1. If Gnus is neither running nor loaded when performing `report-emacs-bug', gnus-msg.el will be autoloaded under the condition where `gnus-inhibit-posting-styles' is let-bound (to non-nil), and `gnus-inhibit-posting-styles' will get void afterward. Besides this, I came to realize that a user may want to use `gnus-posting-styles' so as to add something like `Bcc: me', as you do. So, either way is not so good. Oh, I hit on a good idea! That's somewhat kludgy but works. A quick hack is below. It binds the newsgroup name to "report-emacs-bug" temporarily while performing `report-emacs-bug'. So, if you want to add `Bcc: me' to a bug report, you can use this element in `gnus-posting-styles': ("report-emacs-bug" (Bcc "michael_heerdegen@web.de")) WDYT? --=-=-= Content-Type: text/x-patch Content-Disposition: inline --- emacsbug.el~ 2013-02-11 22:45:54.714731000 +0000 +++ emacsbug.el 2013-04-11 00:37:32.109258200 +0000 @@ -162,7 +162,12 @@ (setq message-end-point (with-current-buffer (get-buffer-create "*Messages*") (point-max-marker))) - (compose-mail report-emacs-bug-address topic) + (if (eq mail-user-agent 'gnus-user-agent) + (progn + (require 'gnus) ;; It defines `gnus-newsgroup-name'. + (let ((gnus-newsgroup-name "report-emacs-bug")) + (compose-mail report-emacs-bug-address topic))) + (compose-mail report-emacs-bug-address topic)) ;; The rest of this does not execute if the user was asked to ;; confirm and said no. (when (eq major-mode 'message-mode) --=-=-=--