From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.user/13853 Path: news.gmane.org!not-for-mail From: Cecil Westerhof Newsgroups: gmane.emacs.gnus.user Subject: Automatically filling to-address (tip and question) Date: Tue, 04 May 2010 13:01:02 +0200 Organization: Decebal Computing Message-ID: <877hnkkk29.fsf@linux-lqcw.site> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1273018765 15952 80.91.229.12 (5 May 2010 00:19:25 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 5 May 2010 00:19:25 +0000 (UTC) To: info-gnus-english@gnu.org Original-X-From: info-gnus-english-bounces+gegu-info-gnus-english=m.gmane.org@gnu.org Wed May 05 02:19:24 2010 connect(): No such file or directory Return-path: Envelope-to: gegu-info-gnus-english@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1O9SKM-0002nY-D4 for gegu-info-gnus-english@m.gmane.org; Wed, 05 May 2010 02:19:24 +0200 Original-Received: from localhost ([127.0.0.1]:40624 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O9SKG-0002HB-Fb for gegu-info-gnus-english@m.gmane.org; Tue, 04 May 2010 20:18:56 -0400 Original-Path: usenet.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!newsgate.cistron.nl!newsgate.news.xs4all.nl!194.109.133.85.MISMATCH!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Original-Newsgroups: gnu.emacs.gnus X-Homepage: http://www.decebal.nl/ User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:l0SKpDDvCNk85dTxcJ5iYhWhSAU= Original-Lines: 58 Original-NNTP-Posting-Host: 84.53.123.169 Original-X-Trace: 1272970836 news.xs4all.nl 22944 decebal/[::ffff:84.53.123.169]:19710 Original-X-Complaints-To: abuse@xs4all.nl Original-Xref: usenet.stanford.edu gnu.emacs.gnus:84288 X-BeenThere: info-gnus-english@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Announcements and discussions for GNUS, the GNU Emacs Usenet newsreader \(in English\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: info-gnus-english-bounces+gegu-info-gnus-english=m.gmane.org@gnu.org Errors-To: info-gnus-english-bounces+gegu-info-gnus-english=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.gnus.user:13853 Archived-At: When I post to a mailing list, I always have to use the same e-mail address. As a real programmer I am lazy and do not like to do what can be done by the computer. For this I made the code below. There is one problem. The sequence of the fields is changed. Normally it is: To: Subject: From: Gcc: With my code it becomes: Subject: From: Gcc: To: Can I do something about this? Let me know if the code could be optimised. (defvar gnus-to-addresses nil "A list of group names and to-addesses to use;") (setq gnus-to-addresses '( ("INBOX\\.Info\\.bbdb" . "bbdb-info@lists.sourceforge.net") ("INBOX\\.Info\\.clisp" . "clisp-list@lists.sourceforge.net") ("INBOX\\.Info\\.ffmpeg" . "ffmpeg-user@mplayerhq.hu") ("INBOX\\.Info.\\Floss" . "floss@vrijschrift.nl") ("INBOX\\.Info\\.OpenOffice" . "gebruikers@nl.openoffice.org") ("INBOX\\.Info\\.openSUSE" . "opensuse-factory@opensuse.org") ("INBOX\\.Info\\.org-mode" . "emacs-orgmode@gnu.org") ("INBOX\\.Info\\.slime" . "slime-devel@common-lisp.net") ("INBOX\\.Info\\.spamassassin" . "users@spamassassin.apache.org") ("INBOX\\.KDE" . "kde-i18n-nl@kde.org") ("INBOX\\.NLLGG\\.Leden" . "stamtafel@lists.nllgg.nl") ("INBOX\\.NLLGG\\.Linux" . "linux@lists.nllgg.nl") ("INBOX\\.NLLGG\\.Starter" . "linux-starter@lists.nllgg.nl") )) (defun gnus-set-to-address () "Determine what to-address to use on the current message;" (let ((to-address "")) (if (message-news-p) (setq to-address nil) (when gnus-newsgroup-name (dolist (item gnus-to-addresses) (when (string-match (car item) gnus-newsgroup-name) (setq to-address (cdr item)))))) to-address)) ;; Posting Styles To Various Groups (setq gnus-posting-styles '((".*" (to (gnus-set-to-address)) -- Cecil Westerhof Senior Software Engineer LinkedIn: http://www.linkedin.com/in/cecilwesterhof