Article View: gnu.emacs.vm.bug
Article #9368Re: forwarding annoyance
From: Bill Mann
Date: Fri, 01 Nov 1991 00:57
Date: Fri, 01 Nov 1991 00:57
78 lines
3361 bytes
3361 bytes
From: jwz%thalidomide@lucid.com (Jamie Zawinski)
Newsgroups: gnu.emacs.vm.bug
Date: 31 Oct 91 17:47:10 EST
X-Windows: The problem for your problem.
It is wrong that the last thing that vm-forward-message does is
(goto-char (point-min))
(end-of-line)))))
This assumes that the To: field is the first line in the buffer, which is not
necessarily true. My mail-setup-hook inserts some other fields (X-Windows,
From, and FCC) before the To field, and leaves the cursor on the appropriate
line (it searches for the first empty header field, typically To or Subject).
vm-forward-message should contain a save-excursion, such that it leaves the
cursor wherever the mail-setup-hook put it.
-- Jamie
I agree:
*** 1.1 1991/09/04 17:41:27
--- vm-reply.el 1991/10/18 14:32:02
***************
*** 215,235 ****
(local-set-key "\C-c\C-y" 'vm-yank-message)
(local-set-key "\C-c\C-v" vm-mode-map)
(setq vm-mail-buffer b)
! (goto-char (point-max))
! (insert "------- Start of forwarded message -------\n")
! (setq start (point))
! (insert-buffer-substring b
! (save-excursion
! (set-buffer b)
! (goto-char (vm-start-of m))
! (forward-line 1)
! (point))
! (vm-text-end-of m))
! (if vm-rfc934-forwarding
! (vm-rfc934-char-stuff-region start (point)))
! (insert "------- End of forwarded message -------\n")
! (goto-char (point-min))
! (end-of-line))))))
(defun vm-mail ()
"Send a mail message from within VM."
--- 215,234 ----
(local-set-key "\C-c\C-y" 'vm-yank-message)
(local-set-key "\C-c\C-v" vm-mode-map)
(setq vm-mail-buffer b)
! (save-excursion
! (goto-char (point-max))
! (insert "------- Start of forwarded message -------\n")
! (setq start (point))
! (insert-buffer-substring b
! (save-excursion
! (set-buffer b)
! (goto-char (vm-start-of m))
! (forward-line 1)
! (point))
! (vm-text-end-of m))
! (if vm-rfc934-forwarding
! (vm-rfc934-char-stuff-region start (point)))
! (insert "------- End of forwarded message -------\n")))))))
(defun vm-mail ()
"Send a mail message from within VM."
Note: I sent a version of this to Kyle a few weeks ago, which included
a bogus attempt on my part to fix another problem. He graciously
straighten me out on my other problem, which was a bug in emacs 18.57
(thanks!). This patch has the bogus part removed and works well for
me. (I am not claiming that Kyle has approved it.)
--
Bill Mann
bill@ksr.com (ksr!bill@uunet.uu.net)
Technical Details
Message-ID:
<BILL.91Oct31195737@gilligan.ksr.com>Path:
arc1-ca.pugleaf.net!gmdzi!zeus.ieee.org!sdd.hp.com!cs.utexas.edu!uunet!ksr!billReferences:
<9110312247.AA09814@thalidomide>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f6829,630509193ada2018 X-Google-Attributes: gidf6829,public X-Google-ArrivalTime: 1991-11-01 05:10:08 PST Path: arc1-ca.pugleaf.net!gmdzi!zeus.ieee.org!sdd.hp.com!cs.utexas.edu!uunet!ksr!bill From: bill@ksr.com (Bill Mann) Newsgroups: gnu.emacs.vm.bug Subject: Re: forwarding annoyance Message-ID: <BILL.91Oct31195737@gilligan.ksr.com> Date: 1 Nov 91 00:57:37 GMT References: <9110312247.AA09814@thalidomide> Sender: news@ksr.com Organization: Kendall Square Research, Waltham, MA Lines: 78 In-reply-to: jwz%thalidomide@lucid.com's message of 31 Oct 91 17:47:10 EST