From: Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann)
Cc: ding@gnus.org
Subject: Re: why no message-goto-gcc with a binding?
Date: 05 Dec 1999 23:47:56 +0100 [thread overview]
Message-ID: <vafvh6dqa1v.fsf@lucy.cs.uni-dortmund.de> (raw)
In-Reply-To: Emerick Rogul's message of "03 Dec 1999 11:15:39 -0500"
Emerick Rogul <emerick@cs.bu.edu> 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.
next prev parent reply other threads:[~1999-12-05 22:47 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-12-03 15:45 Randal L. Schwartz
1999-12-03 16:15 ` Emerick Rogul
1999-12-05 22:47 ` Kai Großjohann [this message]
1999-12-05 22:57 ` Emerick Rogul
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=vafvh6dqa1v.fsf@lucy.cs.uni-dortmund.de \
--to=kai.grossjohann@cs.uni-dortmund.de \
--cc=ding@gnus.org \
/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).