Gnus development mailing list
 help / color / mirror / Atom feed
From: Roderick Schertler <roderick@gate.net>
Subject: repeated headers from gnus-reply-to-function
Date: Tue, 19 Mar 1996 16:52:47 -0500	[thread overview]
Message-ID: <3130.827272367@ibcinc.com> (raw)

Here's a fix for a couple of problems with gnus-mail-reply, both
related to gnus-reply-to-function.

  - The first problem is that gnus-mail-reply would lose when it tried
    to append a header in follow-to to an existing header of that name.
    Eg, given

	(setq gnus-followup-to-function
	      (lambda (group)
		'(("cc" . "first-cc")
		  ("cc" . "second-cc"))))

    I'd get a cc: header like

	cc:, second-ccfirst-cc

    (with the ", " inserted in the wrong place).

  - The second problem is that gnus-mh-mail-setup (and MH in general)
    creates empty headers without a trailing space.  When
    gnus-mail-reply would try to add to such a header it wouldn't insert
    the missing space, leaving something like

    	cc:address@home.org

gnus-news-followup doesn't need either of these fixes because it doesn't
try to integrate the follow-to headers with whatever already exists in
the buffer, it just inserts a new header for each follow-to element.  It
might be better to change both of these functions to use
mail-position-on-field or something like that.

--- ChangeLog~	Sun Mar 17 10:46:18 1996
+++ ChangeLog	Tue Mar 19 16:32:57 1996
@@ -1,3 +1,8 @@
+Tue Mar 19 16:26:13 1996  Roderick Schertler  <roderick@gate.net>
+
+	* gnus-msg.el (gnus-mail-reply): Would bug out given multiple
+	follow-to elements for the same header.
+
 Sun Mar 17 13:17:26 1996  Lars Magne Ingebrigtsen  <larsi@eistla.ifi.uio.no>
 
 	* gnus.el (gnus-article-hide-pgp): Would hide one char too many.
--- gnus-msg.el.~1~	Sun Mar 17 10:46:08 1996
+++ gnus-msg.el	Tue Mar 19 16:06:14 1996
@@ -2023,12 +2023,16 @@
 	    (while follow-to
 	      (goto-char (point-min))
 	      (if (not (re-search-forward 
-			(concat "^" (caar follow-to) ": *") nil t))
+			(concat "^" (caar follow-to) ":") nil t))
 		  (progn
 		    (goto-char beg)
 		    (insert (caar follow-to) ": " (cdar follow-to) "\n"))
-		(unless (eolp)
-		  (insert ", "))
+		(if (eolp)
+		    (insert " ")
+		  (skip-chars-forward " ")
+		  (unless (eolp)
+		    (end-of-line)
+		    (insert ", ")))
 		(insert (cdar follow-to)))
 	      (setq follow-to (cdr follow-to)))
 	    (widen)))

-- 
Roderick Schertler
roderick@gate.net


                 reply	other threads:[~1996-03-19 21:52 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=3130.827272367@ibcinc.com \
    --to=roderick@gate.net \
    /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).