From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/82619 Path: news.gmane.org!not-for-mail From: Christopher Schmidt Newsgroups: gmane.emacs.gnus.general Subject: gnus-configure-posting-styles: Use with-silent-modifications Date: Mon, 17 Dec 2012 19:59:01 +0000 (GMT) Message-ID: <87ehioa1ro@ch.ristopher.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1355774440 27546 80.91.229.3 (17 Dec 2012 20:00:40 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 17 Dec 2012 20:00:40 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M30885@lists.math.uh.edu Mon Dec 17 21:00:55 2012 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Tkgrv-0003zO-32 for ding-account@gmane.org; Mon, 17 Dec 2012 21:00:55 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1TkgqD-0001ZB-2m; Mon, 17 Dec 2012 13:59:09 -0600 Original-Received: from mx1.math.uh.edu ([129.7.128.32]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1TkgqB-0001Yu-8D for ding@lists.math.uh.edu; Mon, 17 Dec 2012 13:59:07 -0600 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx1.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.76) (envelope-from ) id 1Tkgq9-00031q-PB for ding@lists.math.uh.edu; Mon, 17 Dec 2012 13:59:07 -0600 Original-Received: from ristopher.com ([146.185.21.93] helo=saturn.ch.ristopher.com) by quimby.gnus.org with esmtp (Exim 4.72) (envelope-from ) id 1Tkgq7-0000dg-Rn for ding@gnus.org; Mon, 17 Dec 2012 20:59:04 +0100 Original-Received: by saturn.ch.ristopher.com (Postfix, from userid 0) id 3AFD42016E; Mon, 17 Dec 2012 19:59:01 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=ch.ristopher.com; s=mail; t=1355774341; bh=9/WoH9uMdrwVjr2XQI1vunNq6gR1Jfcp5IYrpdv9S+k=; h=From:To:Subject:Message-ID:MIME-Version:Content-Type:Date; b=vkeLiAUUeL01UKWWVadZe0nIZ4Z3yOhfkr3g8paXExgfhnBkqazxCoeaUniye62yC N6Q73aUE0cjRGu3gnaEFMBEE8TnJaJ+PXjinMzf+TVc9qojA45BSOe1lv3Vp6PMxhZ qz8B02gVtgAySrkwDLbOcSFRufdMppp4ko6RZCT8= Mail-Followup-To: ding@gnus.org X-Spam-Score: 0.7 (/) X-Spam-Report: SpamAssassin (3.3.1 2010-03-16) analysis follows Bayesian score: 0.5003 Ham tokens: 0.005-1--3h-0s--1d--H*RU:sk:saturn., 0.005-1--3h-0s--1d--HX-Spam-Relays-External:sk:saturn., 0.005-1--3h-0s--1d--H*r:sk:saturn., 0.008-1--2h-0s--0d--lambda, 0.012-30--176h-2s--0d--nil Spam tokens: 0.993-1566--62h-8765s--0d--H*r:quimby.gnus.org, 0.989-1443--98h-8297s--0d--H*Ad:D*gnus.org, 0.988-1571--114h-9068s--0d--HX-Spam-Relays-External:quimby.gnus.org, 0.988-1571--114h-9068s--0d--H*RU:quimby.gnus.org, 0.988-1479--110h-8552s--0d--HTo:D*gnus.org Autolearn status: ham -0.0 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay domain 0.8 BAYES_50 BODY: Bayes spam probability is 40 to 60% [score: 0.5003] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:82619 Archived-At: Right at the end of gnus-configure-posting-styles there is this form: (when (or name address) (add-hook 'message-setup-hook `(lambda () (set (make-local-variable 'user-mail-address) ,(or (cdr address) user-mail-address)) (let ((user-full-name ,(or (cdr name) (user-full-name))) (user-mail-address ,(or (cdr address) user-mail-address))) (save-excursion (message-remove-header "From") (message-goto-eoh) (insert "From: " (message-make-from) "\n")))) nil 'local)) When the hook is run, the message buffer will be modified and undo information will be stored in buffer-undo-list. That does not feel right. I think the body forms of this save-excursion should be embedded in a with-silent-modifications. Christopher