all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Glenn Morris <rgm@gnu.org>
To: rms@gnu.org
Cc: emacs-devel@gnu.org, Kenichi Handa <handa@m17n.org>
Subject: Re: rmail-toggle-header problem
Date: Thu, 19 Feb 2009 15:28:19 -0500	[thread overview]
Message-ID: <1sbpsyf9y4.fsf@fencepost.gnu.org> (raw)
In-Reply-To: <E1LZlG5-0001oi-By@fencepost.gnu.org> (Richard M. Stallman's message of "Wed, 18 Feb 2009 07:10:33 -0500")

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 ****
  \f
  ;;;; *** 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 ----
  \f
  ;;;; *** 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




  reply	other threads:[~2009-02-19 20:28 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-18  2:26 rmail-toggle-header problem Kenichi Handa
2009-02-18  5:29 ` Glenn Morris
2009-02-18  6:37   ` Kenichi Handa
2009-02-18 12:10 ` Richard M Stallman
2009-02-19 20:28   ` Glenn Morris [this message]
2009-02-20  1:35     ` Kenichi Handa
2009-02-20  2:12       ` Glenn Morris
2009-02-20  8:34         ` Eli Zaretskii
2009-02-20  8:29       ` Eli Zaretskii
2009-02-20 12:59         ` Kenichi Handa
2009-02-20 13:30     ` Richard M Stallman
2009-02-20 22:21       ` Chetan Pandya
2009-02-21  2:34         ` Stephen J. Turnbull
2009-02-21  1:18       ` Chetan Pandya
2009-02-21  2:21         ` Stefan Monnier
2009-02-21  3:18       ` Glenn Morris
2009-02-21  9:12         ` Eli Zaretskii
  -- strict thread matches above, loose matches on Subject: below --
2009-02-20  9:35 Alfred M. Szmidt
2009-02-22  9:25 Xavier Maillard

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=1sbpsyf9y4.fsf@fencepost.gnu.org \
    --to=rgm@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=handa@m17n.org \
    --cc=rms@gnu.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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.