From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/6117 Path: main.gmane.org!not-for-mail From: Kai Grossjohann Newsgroups: gmane.emacs.gnus.general Subject: Re: editing the gcc header Date: 03 May 1996 09:54:35 +0200 Sender: grossjoh@dusty.informatik.uni-dortmund.de Message-ID: References: Reply-To: Kai Grossjohann NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 (generated by tm-edit 7.52) Content-Type: text/plain; charset=US-ASCII X-Trace: main.gmane.org 1035146621 2626 80.91.224.250 (20 Oct 2002 20:43:41 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 20 Oct 2002 20:43:41 +0000 (UTC) Cc: ding@ifi.uio.no Return-Path: ding-request@ifi.uio.no Original-Received: from ifi.uio.no (ifi.uio.no [129.240.64.2]) by deanna.miranova.com (8.7.5/8.6.9) with SMTP id BAA26875 for ; Fri, 3 May 1996 01:36:51 -0700 Original-Received: from floyd.informatik.uni-dortmund.de (floyd.informatik.uni-dortmund.de [129.217.4.40]) by ifi.uio.no with ESMTP (8.6.11/ifi2.4) id for ; Fri, 3 May 1996 09:54:43 +0200 Original-Received: from dusty.informatik.uni-dortmund.de by floyd.informatik.uni-dortmund.de with SMTP (Sendmail 8.7.5/UniDo 3.11) id JAA18847; Fri, 3 May 1996 09:54:37 +0200 (MES) Original-Received: by dusty.informatik.uni-dortmund.de id AA20897; Fri, 3 May 96 09:54:36 +0200 Original-To: Jack Vinson In-Reply-To: Jack Vinson's message of 02 May 1996 16:07:34 -0400 Original-Lines: 61 X-Mailer: September Gnus v0.80/Emacs 19.30 Xref: main.gmane.org gmane.emacs.gnus.general:6117 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:6117 >>>>> On 02 May 1996 16:07:34 -0400, Jack Vinson >>>>> said: Jack> Even better. I'd like a key combo to remove the Gcc header Jack> completely. I have the following in my .emacs file: ,----- | (defun message-toggle-gcc () | (interactive) | (save-excursion | (save-restriction | ;; I didn't know about nnheader-narrow-to-headers | ;; when I wrote this :-( | (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"))))))) `----- (This is bound to C-c C-f C-g.) Here, kai-gnus-outgoing-message-group is a function that calculates the `right' group name based on the group I'm in: ,----- | (defun kai-gnus-outgoing-message-group () | (cond ((and gnus-newsgroup-name | (stringp gnus-newsgroup-name) | (string-match "^nnml" gnus-newsgroup-name)) | gnus-newsgroup-name) | (t "nnml:mail.misc"))) `----- Jack> There should also be something like C-c C-f C-g to goto the Jack> Gcc header instead of doing what Kai just suggested. I wanted to have completion for group names, and M-TAB was already taken by bbdb-complete-name. I didn't know how to write a function to be bound to M-TAB that does completion for group names in a Gcc header and bbdb-complete-name in To/Cc/Bcc headers. I'll be happy about any ideas you might have. regards, kai -- Gleep!