From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/80889 Path: news.gmane.org!not-for-mail From: Uwe Brauer Newsgroups: gmane.emacs.gnus.general Subject: some solution but n>1 (was: reply to one message and at the same time forward another) Date: Thu, 12 Jan 2012 13:10:52 +0100 Message-ID: <87hb01w27n.fsf_-_@gilgamesch.quim.ucm.es> References: <87wradd18a.fsf@mat.ucm.es> Reply-To: Uwe Brauer NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1326370343 4748 80.91.229.12 (12 Jan 2012 12:12:23 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 12 Jan 2012 12:12:23 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M29171@lists.math.uh.edu Thu Jan 12 13:12:17 2012 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RlJVw-0007sP-Ui for ding-account@gmane.org; Thu, 12 Jan 2012 13:12:17 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1RlJUy-0002y9-AB; Thu, 12 Jan 2012 06:11:16 -0600 Original-Received: from mx1.math.uh.edu ([129.7.128.32]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1RlJUw-0002xy-LQ for ding@lists.math.uh.edu; Thu, 12 Jan 2012 06:11:14 -0600 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx1.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.76) (envelope-from ) id 1RlJUr-0003Hg-Ac for ding@lists.math.uh.edu; Thu, 12 Jan 2012 06:11:14 -0600 Original-Received: from lo.gmane.org ([80.91.229.12]) by quimby.gnus.org with esmtp (Exim 4.72) (envelope-from ) id 1RlJUp-0004qZ-AC for ding@gnus.org; Thu, 12 Jan 2012 13:11:07 +0100 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1RlJUm-0007FF-B9 for ding@gnus.org; Thu, 12 Jan 2012 13:11:04 +0100 Original-Received: from gilgamesch.quim.ucm.es ([147.96.12.99]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 12 Jan 2012 13:11:04 +0100 Original-Received: from oub by gilgamesch.quim.ucm.es with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 12 Jan 2012 13:11:04 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 61 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: gilgamesch.quim.ucm.es X-Hashcash: 1:20:120112:gmane.emacs.gnus.general::Id8huNyouEPeBM9w:00000000000000000000000000000000000001IBq User-Agent: Gnus/5.110018 (No Gnus v0.18) XEmacs/21.5-b31 (linux) Cancel-Lock: sha1:ckNdjvFiLO5bbAwkWL4QqsUOsS4= X-Spam-Score: -4.9 (----) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:80889 Archived-At: >> On Tue, 03 Jan 2012 22:03:11 +0100, Lars Magne Ingebrigtsen wrote: > Uwe Brauer writes: >> Is it possible to combine gnus-summary-reply and >> gnus-summary-mail-forward, such that I can reply (or >> followup) to somebody, including a another mail as forward. > I don't think any such command exists, but it does sound kinda useful, > and probably wouldn't be too difficult to implement. Gnus and Emacs is > in a feature freeze at the moment, though. Ok I have found a very primitive solution, which only works if I mark more than ONE message. Look at the following: O# 3623 [ Uwe Brauer ] 12-Jan 2 1 to be forwarded O# 3624 [ Uwe Brauer ] 12-Jan 2 2 to be forwarded R 3625 [ Uwe Brauer ] 12-Jan 2 to be replied I reply to 3625 and in the reply buffer fire up my new function which I attach below. Everything works as expected. Both messages 3623 and 3624 will be "attached" as forwarded messages in the reply buffer. However: O 3623 [ Uwe Brauer ] 12-Jan 2 1 to be forwarded O# 3624 [ Uwe Brauer ] 12-Jan 2 2 to be forwarded R 3625 [ Uwe Brauer ] 12-Jan 2 to be replied I repeat the same procedure as above but now in the reply buffer, message 3625 (the message I reply to NOT the message I have marked for forwarding) will be attached as a forward message. This is bizarre. Anybody has an idea what is wrong? Thanks Uwe Brauer (defun my-gnus-summary-mail-forward () "This function is to be used within a reply or forward buffer, marked messages (n>1!!!) will be inserted as forwarded messages." (interactive) (if (y-or-n-p (format "Did you mark the msg in the summary buffer? ")) (progn (save-excursion (let ((currentname (current-buffer))) (switch-to-buffer "*Summary nnimap+UCM:INBOX*") (gnus-summary-mail-forward nil) (mail-text) (copy-region-as-kill (point) (point-max)) (switch-to-buffer currentname) (goto-char (point-max)) (yank nil)))) (progn (message "You did NOT mark the msg, you fool!") (beep) (sleep-for 1) (beep) (sleep-for 1) (beep))))