Gnus development mailing list
 help / color / mirror / Atom feed
* reply to one message and at the same time forward another
@ 2011-12-03 17:16 Uwe Brauer
  2012-01-03 21:03 ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 8+ messages in thread
From: Uwe Brauer @ 2011-12-03 17:16 UTC (permalink / raw)
  To: ding

Hello

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.

The only possibility which I know is to mark 2 messages and
then use gnus-article-wide-reply-with-original but this is
not what I am looking for.

thanks

Uwe Brauer 




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: reply to one message and at the same time forward another
  2011-12-03 17:16 reply to one message and at the same time forward another Uwe Brauer
@ 2012-01-03 21:03 ` Lars Magne Ingebrigtsen
  2012-01-09 21:17   ` Uwe Brauer
  2012-01-12 12:10   ` some solution but n>1 (was: reply to one message and at the same time forward another) Uwe Brauer
  0 siblings, 2 replies; 8+ messages in thread
From: Lars Magne Ingebrigtsen @ 2012-01-03 21:03 UTC (permalink / raw)
  To: Uwe Brauer; +Cc: ding

Uwe Brauer <oub@mat.ucm.es> 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.

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: reply to one message and at the same time forward another
  2012-01-03 21:03 ` Lars Magne Ingebrigtsen
@ 2012-01-09 21:17   ` Uwe Brauer
  2012-01-27 17:18     ` Lars Ingebrigtsen
  2012-01-12 12:10   ` some solution but n>1 (was: reply to one message and at the same time forward another) Uwe Brauer
  1 sibling, 1 reply; 8+ messages in thread
From: Uwe Brauer @ 2012-01-09 21:17 UTC (permalink / raw)
  To: Lars Magne Ingebrigtsen; +Cc: ding

>> On Tue, 03 Jan 2012 22:03:11 +0100, Lars Magne Ingebrigtsen <larsi@gnus.org> wrote:

   > Uwe Brauer <oub@mat.ucm.es> 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.


Can you give me a hint where to start, I might give it a
try.





^ permalink raw reply	[flat|nested] 8+ messages in thread

* some solution  but n>1 (was: reply to one message and at the same time forward another)
  2012-01-03 21:03 ` Lars Magne Ingebrigtsen
  2012-01-09 21:17   ` Uwe Brauer
@ 2012-01-12 12:10   ` Uwe Brauer
  2012-01-12 13:36     ` strange behaviour of gnus-summary-mail-forward. (was: some solution but n>1) Uwe Brauer
  1 sibling, 1 reply; 8+ messages in thread
From: Uwe Brauer @ 2012-01-12 12:10 UTC (permalink / raw)
  To: ding

>> On Tue, 03 Jan 2012 22:03:11 +0100, Lars Magne Ingebrigtsen <larsi@gnus.org> wrote:

   > Uwe Brauer <oub@mat.ucm.es> 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))))




^ permalink raw reply	[flat|nested] 8+ messages in thread

* strange behaviour of gnus-summary-mail-forward. (was: some solution  but n>1)
  2012-01-12 12:10   ` some solution but n>1 (was: reply to one message and at the same time forward another) Uwe Brauer
@ 2012-01-12 13:36     ` Uwe Brauer
  2012-01-12 15:08       ` strange behaviour of gnus-summary-mail-forward Uwe Brauer
  0 siblings, 1 reply; 8+ messages in thread
From: Uwe Brauer @ 2012-01-12 13:36 UTC (permalink / raw)
  To: ding

>> On Thu, 12 Jan 2012 13:10:52 +0100, Uwe Brauer <oub@mat.ucm.es> wrote:

>> On Tue, 03 Jan 2012 22:03:11 +0100, Lars Magne
>> Ingebrigtsen <larsi@gnus.org> wrote:

   >> Uwe Brauer <oub@mat.ucm.es> 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))))




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: strange behaviour of gnus-summary-mail-forward.
  2012-01-12 13:36     ` strange behaviour of gnus-summary-mail-forward. (was: some solution but n>1) Uwe Brauer
@ 2012-01-12 15:08       ` Uwe Brauer
  0 siblings, 0 replies; 8+ messages in thread
From: Uwe Brauer @ 2012-01-12 15:08 UTC (permalink / raw)
  To: ding

Oops error in the function I sent: this should work in
general:
(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 gnus-summary-buffer)
	    (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))))




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: reply to one message and at the same time forward another
  2012-01-09 21:17   ` Uwe Brauer
@ 2012-01-27 17:18     ` Lars Ingebrigtsen
  2012-01-27 22:52       ` Dave Goldberg
  0 siblings, 1 reply; 8+ messages in thread
From: Lars Ingebrigtsen @ 2012-01-27 17:18 UTC (permalink / raw)
  To: Uwe Brauer; +Cc: ding

Uwe Brauer <oub@mat.ucm.es> 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.
>
> Can you give me a hint where to start, I might give it a
> try.

I think the best way to implement this would be to allow people
composing the article in the normal way.  But then have a new command in
the summary buffer that would put the article under point into the
Message buffer.

That is, you'd pop to the summary buffer, find the message you want to
include, issue the new command keystroke, and it'd prompt you for
"attach message to buffer *unsent wide repl...*" etc, allowing you to
choose what Message buffer to attach the message to (if there are
several active Message buffers), and then insert the MML the same way `S
O m' and friends do.

-- 
(domestic pets only, the antidote for overdose, milk.)
  http://lars.ingebrigtsen.no  *  Sent from my Rome



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: reply to one message and at the same time forward another
  2012-01-27 17:18     ` Lars Ingebrigtsen
@ 2012-01-27 22:52       ` Dave Goldberg
  0 siblings, 0 replies; 8+ messages in thread
From: Dave Goldberg @ 2012-01-27 22:52 UTC (permalink / raw)
  To: ding


> Uwe Brauer <oub@mat.ucm.es> 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.
>> 
>> Can you give me a hint where to start, I might give it a
>> try.

> I think the best way to implement this would be to allow people
> composing the article in the normal way.  But then have a new command in
> the summary buffer that would put the article under point into the
> Message buffer.

> That is, you'd pop to the summary buffer, find the message you want to
> include, issue the new command keystroke, and it'd prompt you for
> "attach message to buffer *unsent wide repl...*" etc, allowing you to
> choose what Message buffer to attach the message to (if there are
> several active Message buffers), and then insert the MML the same way `S
> O m' and friends do.

That would be a lot better than my approach, which is to set up gnus-summary-line-format to display the article number and use this:

(defun dsg-message-attach-article (group message)
  (interactive
   (list (completing-read
	  "Group: " gnus-active-hashtb nil
	  (gnus-read-active-file-p)
	  nil
	  'gnus-group-history)
	 (read-number "Message: ")))
  (let ((tmp (get-buffer-create (generate-new-buffer-name "*DSGTMP*"))))
    (save-excursion
      (set-buffer tmp)
      (gnus-request-article-this-buffer message group))
    (mml-attach-buffer (buffer-name tmp) "message/rfc822")))

Since I open message buffers in a new frame, picking up the article number is fairly easy.

-- 
Dave Goldberg
david.goldberg6@verizon.net



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2012-01-27 22:52 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-03 17:16 reply to one message and at the same time forward another Uwe Brauer
2012-01-03 21:03 ` Lars Magne Ingebrigtsen
2012-01-09 21:17   ` Uwe Brauer
2012-01-27 17:18     ` Lars Ingebrigtsen
2012-01-27 22:52       ` Dave Goldberg
2012-01-12 12:10   ` some solution but n>1 (was: reply to one message and at the same time forward another) Uwe Brauer
2012-01-12 13:36     ` strange behaviour of gnus-summary-mail-forward. (was: some solution but n>1) Uwe Brauer
2012-01-12 15:08       ` strange behaviour of gnus-summary-mail-forward Uwe Brauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).