From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/27750 Path: main.gmane.org!not-for-mail From: Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai =?iso-8859-1?q?Gro=DFjohann?=) Newsgroups: gmane.emacs.gnus.general Subject: Re: why no message-goto-gcc with a binding? Date: 05 Dec 1999 23:47:56 +0100 Sender: owner-ding@hpc.uh.edu Message-ID: References: NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1035164719 26161 80.91.224.250 (21 Oct 2002 01:45:19 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 01:45:19 +0000 (UTC) Cc: ding@gnus.org Return-Path: Original-Received: from bart.math.uh.edu (bart.math.uh.edu [129.7.128.48]) by sclp3.sclp.com (8.8.5/8.8.5) with ESMTP id RAA28091 for ; Sun, 5 Dec 1999 17:51:04 -0500 (EST) Original-Received: from sina.hpc.uh.edu (lists@Sina.HPC.UH.EDU [129.7.3.5]) by bart.math.uh.edu (8.9.1/8.9.1) with ESMTP id QAB13777; Sun, 5 Dec 1999 16:50:46 -0600 (CST) Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Sun, 05 Dec 1999 16:50:39 -0600 (CST) Original-Received: from sclp3.sclp.com (root@sclp3.sclp.com [204.252.123.139]) by sina.hpc.uh.edu (8.9.3/8.9.3) with ESMTP id QAA27842 for ; Sun, 5 Dec 1999 16:50:25 -0600 (CST) Original-Received: from waldorf.cs.uni-dortmund.de (waldorf.cs.uni-dortmund.de [129.217.4.42]) by sclp3.sclp.com (8.8.5/8.8.5) with ESMTP id RAA28074 for ; Sun, 5 Dec 1999 17:48:40 -0500 (EST) Original-Received: from marcy.cs.uni-dortmund.de (marcy.cs.uni-dortmund.de [129.217.20.159]) by waldorf.cs.uni-dortmund.de with ESMTP id XAA13340; Sun, 5 Dec 1999 23:48:00 +0100 (MET) Original-Received: from lucy.cs.uni-dortmund.de (lucy [129.217.20.160]) by marcy.cs.uni-dortmund.de id XAA08099; Sun, 5 Dec 1999 23:48:00 +0100 (MET) Original-Received: (from grossjoh@localhost) by lucy.cs.uni-dortmund.de (8.9.3/8.9.3/Debian 8.9.3-6) id XAA10896; Sun, 5 Dec 1999 23:47:56 +0100 X-Authentication-Warning: lucy.cs.uni-dortmund.de: grossjoh set sender to Kai.Grossjohann@CS.Uni-Dortmund.DE using -f Original-To: Emerick Rogul In-Reply-To: Emerick Rogul's message of "03 Dec 1999 11:15:39 -0500" Original-Lines: 51 User-Agent: Gnus/5.0803 (Gnus v5.8.3) Emacs/20.4.93 Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:27750 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:27750 Emerick Rogul writes: > Something to just toggle it on/off would be nice, as well. Shameless plug alert. I've got the following code which computes a good Gcc header (good for me, that is) and offers a toggle function. (defun message-toggle-gcc () (interactive) (save-excursion (save-restriction (let ((pmin (progn (beginning-of-buffer) (point))) (pmax (progn (beginning-of-buffer) (re-search-forward (concat "^" mail-header-separator "$")) (beginning-of-line) (point)))) (beginning-of-buffer) (narrow-to-region pmin pmax) (if (re-search-forward "^gcc: .*" nil t) (progn (beginning-of-line) (kill-line 1)) (goto-char pmax) (insert (concat "Gcc: " (kai-gnus-outgoing-message-group) "\n"))))))) (defun kai-gnus-outgoing-message-group () (cond ((and gnus-newsgroup-name (stringp gnus-newsgroup-name) (not (string= "" gnus-newsgroup-name)) (string-match "^\\(nnml\\|nnimap\\):" gnus-newsgroup-name)) gnus-newsgroup-name) ((and gnus-newsgroup-name (stringp gnus-newsgroup-name) (string-match "^nntodo:" gnus-newsgroup-name)) nil) (t "nnml:inbox"))) The toggle function is really awful and should have used one of those nice message functions for positioning on a header and stuff. But it is very old -- maybe I can defend myself by saying those functions didn't exist back then? kai -- A preposition is not a good thing to end a sentence with.