From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/80890 Path: news.gmane.org!not-for-mail From: Uwe Brauer Newsgroups: gmane.emacs.gnus.general Subject: strange behaviour of gnus-summary-mail-forward. (was: some solution but n>1) Date: Thu, 12 Jan 2012 14:36:59 +0100 Message-ID: <87k44xujno.fsf_-_@gilgamesch.quim.ucm.es> References: <87wradd18a.fsf@mat.ucm.es> <87hb01w27n.fsf_-_@gilgamesch.quim.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 1326375490 12409 80.91.229.12 (12 Jan 2012 13:38:10 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 12 Jan 2012 13:38:10 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M29172@lists.math.uh.edu Thu Jan 12 14:38:06 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 1RlKqz-0007u5-Hp for ding-account@gmane.org; Thu, 12 Jan 2012 14:38:05 +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 1RlKqQ-0003M4-HE; Thu, 12 Jan 2012 07:37:30 -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 1RlKqL-0003Lr-Pk for ding@lists.math.uh.edu; Thu, 12 Jan 2012 07:37:25 -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 1RlKqG-0003bL-Ce for ding@lists.math.uh.edu; Thu, 12 Jan 2012 07:37:25 -0600 Original-Received: from lo.gmane.org ([80.91.229.12]) by quimby.gnus.org with esmtp (Exim 4.72) (envelope-from ) id 1RlKqD-0006p5-IA for ding@gnus.org; Thu, 12 Jan 2012 14:37:17 +0100 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1RlKqB-0007WP-Sj for ding@gnus.org; Thu, 12 Jan 2012 14:37:15 +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 14:37:15 +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 14:37:15 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 89 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::ZfdFccWgGgrIRLNt:00000000000000000000000000000000000003BTJ User-Agent: Gnus/5.110018 (No Gnus v0.18) XEmacs/21.5-b31 (linux) Cancel-Lock: sha1:/Qd1fPRNm8+sCL5N0rVA4MvZepE= X-Spam-Score: -4.9 (----) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:80890 Archived-At: >> On Thu, 12 Jan 2012 13:10:52 +0100, Uwe Brauer wrote: >> 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 It seems that the problem is caused by the behavior of gnus-summary-mail-forward. If in a summary two messages are marked and the point is on a third message, gnus-summary-mail-forward. Will forward the marked message However is only one message marked and the point is on another message then gnus-summary-mail-forward. Will forward the message the POINTER is on I found this bizarre. The the following kludge "solves" this issue. (goto-char (point-max)) (search-backward "#") (defun my-gnus-reply-mail-forward (&optional arg) "This function is to be used within a reply or forward buffer, marked messages 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*") (goto-char (point-max)) (search-backward "#") (gnus-summary-mail-forward arg) (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))))