Gnus development mailing list
 help / color / mirror / Atom feed
From: Kai Grossjohann <grossjoh@charly.informatik.uni-dortmund.de>
Cc: ding@ifi.uio.no
Subject: Re: editing the gcc header
Date: 03 May 1996 09:54:35 +0200	[thread overview]
Message-ID: <vafiveeyyx0.fsf@ls6.informatik.uni-dortmund.de> (raw)
In-Reply-To: Jack Vinson's message of 02 May 1996 16:07:34 -0400

>>>>> On 02 May 1996 16:07:34 -0400, Jack Vinson
>>>>> <jvinson@cheux.ecs.umass.edu> 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!


      reply	other threads:[~1996-05-03  7:54 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-05-02 18:48 Kai Grossjohann
1996-05-02 20:07 ` Jack Vinson
1996-05-03  7:54   ` Kai Grossjohann [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=vafiveeyyx0.fsf@ls6.informatik.uni-dortmund.de \
    --to=grossjoh@charly.informatik.uni-dortmund.de \
    --cc=ding@ifi.uio.no \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).