[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 21:12:05 -0500 |
User-agent: |
Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) |
Kenichi Handa wrote:
> The reason of toggling is just to see the full headers.
Understood.
> I don't intend to yank the full headers when I type r to reply, and
> type C-c C-y to yank. Actually supercite deletes all headers.
(depends on what supercite options you use)
Rmail should behave sensibly when supercite is not used.
So should it not yank the headers at all? Should it always yank the
"condensed" headers? Should it yank the headers as displayed (the
current behaviour)? Should it exclude "X-RMAIL"? Etc...
I have no opinion, I'm wondering what Rmail users want.
If they don't care, then just changing supercite is fine.
>> Separately, I also don't know whether supercite should be changed as
>> was suggested.
>
> I don't mind how the problem is fixed, but with your patch,
> I get the error "Marker does not point anywhere" when I type
> C-c C-y.
Hmph. insert-buffer pushes a mark, whilst insert-buffer-substring does
not.
*** rmail.el 19 Feb 2009 03:30:41 -0000 1.510
--- rmail.el 20 Feb 2009 02:03:17 -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,3248 ----
;;;; *** 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."
+ (push-mark
+ (save-excursion
+ (insert-buffer-substring buffer (with-current-buffer buffer
+ (save-excursion
+ (goto-char (point-min))
+ (if (looking-at "^From ")
+ (forward-line 1))
+ (point))))
+ (point)))
+ nil)
+
(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
- Re: rmail-toggle-header problem, Glenn Morris, 2009/02/20
- Re: rmail-toggle-header problem, Eli Zaretskii, 2009/02/21