[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: rmail-toggle-header problem
From: |
Glenn Morris |
Subject: |
Re: rmail-toggle-header problem |
Date: |
Thu, 19 Feb 2009 15:28:19 -0500 |
User-agent: |
Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) |
Richard M Stallman wrote:
> And, the first "From ..." line is also shown. Shouldn't that
> line be hidden? At least, C-c C-y (mail-yank-original) signals
> this error:
>
> I am not sure whether it is better to omit that line
> or change mail-yank-original.
I think Rmail might as well show the leading From line when full
headers are visible. It's simple to change mail-yank-original's
behaviour (see below).
I'm not sure that yanking from the full headers makes a lot of sense,
though. Eg it includes the X-RMAIL headers in the yank. Would you ever
want to include the full headers (all the Received: etc) in a reply?
Separately, I also don't know whether supercite should be changed as
was suggested.
*** rmail.el 19 Feb 2009 03:30:41 -0000 1.510
--- rmail.el 19 Feb 2009 20:23:16 -0000
***************
*** 3222,3232 ****
;;;; *** Rmail Mailing Commands ***
(defun rmail-start-mail (&optional noerase to subject in-reply-to cc
replybuffer sendactions same-window others)
(let (yank-action)
(if replybuffer
! (setq yank-action (list 'insert-buffer replybuffer)))
(setq others (cons (cons "cc" cc) others))
(setq others (cons (cons "in-reply-to" in-reply-to) others))
(if same-window
--- 3222,3244 ----
;;;; *** Rmail Mailing Commands ***
+ ;; If full headers are visible, don't yank the leading From line.
+ ;; Eg supercite complains (but it's not clear if it should or not).
+ ;; http://lists.gnu.org/archive/html/emacs-devel/2009-02/msg00691.html
+ (defun rmail-reply-insert-buffer (buffer)
+ "Like `insert-buffer', but skips the leading From line, if present."
+ (insert-buffer-substring buffer (with-current-buffer buffer
+ (save-excursion
+ (goto-char (point-min))
+ (if (looking-at "^From ")
+ (forward-line 1))
+ (point)))))
+
(defun rmail-start-mail (&optional noerase to subject in-reply-to cc
replybuffer sendactions same-window others)
(let (yank-action)
(if replybuffer
! (setq yank-action (list 'rmail-reply-insert-buffer replybuffer)))
(setq others (cons (cons "cc" cc) others))
(setq others (cons (cons "in-reply-to" in-reply-to) others))
(if same-window
- rmail-toggle-header problem, Kenichi Handa, 2009/02/17
- Re: rmail-toggle-header problem, Richard M Stallman, 2009/02/20
- Re: rmail-toggle-header problem, Chetan Pandya, 2009/02/20
- Re: rmail-toggle-header problem, Stephen J. Turnbull, 2009/02/20
- Re: rmail-toggle-header problem, Chetan Pandya, 2009/02/20
- Re: rmail-toggle-header problem, Stefan Monnier, 2009/02/20